> ## Documentation Index
> Fetch the complete documentation index at: https://company-research-agent.pratikdani.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Input Parameters

> Input schema and parameters for the Company Research & Analysis Agent

# Input Parameters

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

## Input Schema

```json theme={null}
{
  "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

<ParamField path="domain" type="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`
</ParamField>

## Input Processing

The domain input goes through several processing steps:

1. **Validation**

```python theme={null}
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
```

2. **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:

<ParamField path="APIFY_TOKEN" type="string" required>
  Your Apify API token for accessing web scraping capabilities
</ParamField>

<ParamField path="GOOGLE_API_KEY" type="string" required>
  Google API key for the Gemini model used by AI agents
</ParamField>

## 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

```json theme={null}
{
  "domain": "apple.com"
}
```

### Input with Auto-Cleaning

```json theme={null}
{
  "domain": "https://www.microsoft.com/en-us"
}
// Will be processed as: "microsoft.com"
```

<Note>
  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.
</Note>
