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

# Testing Agents

> Validate agent behavior before deployment

## Chat-Based Testing

Navigate to **Agents** → Select agent → **Start Chat**.

Test with different conversation types:

* **Simple queries**: Basic understanding and responses
* **Complex requests**: Multi-step tasks requiring reasoning
* **Edge cases**: Unusual inputs or boundary conditions
* **Error handling**: Invalid inputs and how agent recovers

Document behavior including tool usage, response quality, and accuracy.

## Creating Test Cases

Define expected behavior for validation:

**What to test**:

* Task completion accuracy
* Tool selection and usage
* Response format consistency
* Error handling
* Response time

**Example test**: "Extract key information about Apple Inc."

* Expected tools: web\_search
* Required fields: name, industry, headquarters
* Success: All fields present and accurate

## Batch Testing

Test agents on sample datasets before production use.

1. Create test dataset with 10-50 records
2. Run agent on test data
3. Review output quality and accuracy
4. Fix issues and retest
5. Deploy when quality meets standards

Compare outputs against expected results to catch issues early.

## Performance Validation

**Speed**: Simple queries \< 2 seconds, complex analysis \< 30 seconds

**Quality**: Check response relevance, accuracy, completeness, and clarity

**Consistency**: Same input should yield similar results across tests

Monitor resource usage and tool call patterns for optimization opportunities.

## Common Issues

**Inconsistent results**: Model variability is normal. Run multiple tests to identify patterns.

**Slow performance**: Review tool usage, consider caching frequent queries, optimize system prompt.

**Accuracy problems**: Refine system prompt instructions, adjust tool configurations, add examples.

**Tool failures**: Verify API credentials, check rate limits, test connectivity.

## Production Testing

**Gradual rollout**: Test on small dataset subset first, then expand gradually.

**Monitor continuously**: Track accuracy, response times, error rates in production.

**User feedback**: Collect and review user reports to identify improvement areas.

## Next Steps

<CardGroup cols={2}>
  <Card title="Chat with Agents" icon="message" href="/guides/agents/chatting-with-agents">
    Start testing through chat
  </Card>

  <Card title="Managing Tools" icon="wrench" href="/guides/agents/managing-tools">
    Test tool configurations
  </Card>

  <Card title="Configuring Models" icon="brain" href="/guides/agents/configuring-models">
    Optimize model settings
  </Card>

  <Card title="Creating Agents" icon="plus" href="/guides/agents/creating-agents">
    Create new agents
  </Card>
</CardGroup>
