> ## Documentation Index
> Fetch the complete documentation index at: https://docs.artaios.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate Agent

Validate an agent configuration without creating it. This is useful for testing configurations before deployment.

## Request Body

Send the complete agent configuration YAML or JSON to validate.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.artaios.ai/api/v1/agent/validate/ \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Test Agent",
      "agent_type": "llm_agent",
      "system_prompt": "You are a helpful assistant.",
      "llm_config": {
        "model": "gpt-4o",
        "temperature": 0.7
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  config = {
      "name": "Test Agent",
      "agent_type": "llm_agent",
      "system_prompt": "You are a helpful assistant.",
      "llm_config": {
          "model": "gpt-4o",
          "temperature": 0.7
      }
  }

  response = requests.post(
      "https://api.artaios.ai/api/v1/agent/validate/",
      headers={"x-api-key": "YOUR_API_KEY"},
      json=config
  )
  validation_result = response.json()
  ```

  ```javascript JavaScript theme={null}
  const config = {
    name: "Test Agent",
    agent_type: "llm_agent",
    system_prompt: "You are a helpful assistant.",
    llm_config: {
      model: "gpt-4o",
      temperature: 0.7
    }
  };

  const response = await fetch('https://api.artaios.ai/api/v1/agent/validate/', {
    method: 'POST',
    headers: {
      'x-api-key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(config)
  });

  const validation = await response.json();
  ```
</CodeGroup>

## Response

### Valid Configuration

```json theme={null}
{
  "valid": true,
  "message": "Configuration is valid"
}
```

### Invalid Configuration

```json theme={null}
{
  "valid": false,
  "errors": [
    {
      "field": "llm_config.model",
      "message": "Invalid model specified"
    }
  ]
}
```

<Tip>
  Always validate your agent configurations before deploying them to production to catch configuration errors early.
</Tip>
