Input Parameters

The Company Research & Analysis Agent uses a simple input schema that triggers the CrewAI research process.

Input Schema

{
  "title": "Company Research Agent Input",
  "type": "object",
  "schemaVersion": 1,
  "properties": {
    "domain": {
      "title": "Company Domain",
      "type": "string",
      "description": "Domain name of the company to research (e.g., apple.com)",
      "editor": "textfield"
    }
  },
  "required": ["domain"]
}

Parameters

domain
string
required

The domain name of the company you want to research. This will be used by the AI agents to:

  1. Search for company news
  2. Find professional profiles
  3. Gather LinkedIn data
  4. Collect Crunchbase information
  5. Extract PitchBook details

Examples:

  • apple.com
  • microsoft.com
  • tesla.com

Input Processing

The domain input goes through several processing steps:

  1. Validation
async def validate_domain(domain: str) -> str:
    """
    @param domain - Raw domain name input
    @returns Cleaned and validated domain name
    @throws ValueError if domain is invalid
    """
    if not domain:
        raise ValueError("Domain is required")
    
    # Remove protocol and www
    domain = re.sub(r'^(https?://)?(www\.)?', '', domain.lower())
    
    # Remove trailing path
    domain = domain.split('/')[0]
    
    if not validators.domain(domain):
        raise ValueError(f"Invalid domain: {domain}")
    
    return domain
  1. AI Agent Assignment The validated domain is passed to the Research Specialist agent, which coordinates with other agents to gather information.

Environment Variables

The following environment variables are required:

APIFY_TOKEN
string
required

Your Apify API token for accessing web scraping capabilities

GOOGLE_API_KEY
string
required

Google API key for the Gemini model used by AI agents

Error Cases

The agent will fail with an error message if:

  1. Domain Validation

    • No domain is provided
    • Domain format is invalid
    • Domain cannot be resolved
  2. API Access

    • Invalid or missing API tokens
    • Rate limits exceeded
    • API service unavailable
  3. AI Processing

    • LLM service unavailable
    • Invalid response format
    • Processing timeout

Example Usage

Basic Input

{
  "domain": "apple.com"
}

Input with Auto-Cleaning

{
  "domain": "https://www.microsoft.com/en-us"
}
// Will be processed as: "microsoft.com"

The input system is designed to be user-friendly. It automatically cleans and normalizes the domain input, allowing users to provide URLs in various formats.