Every agent goes through a comprehensive validation pipeline before deployment. This ensures reliability, safety, and optimal performance.
When you create or update an agent, it passes through these validation stages:
Validates the structure and types of your agent configuration:
Analyzes your system prompt for quality and safety:
Ensures your agent configuration meets safety requirements:
Verifies that requested capabilities are compatible:
Performs a test invocation to verify the agent works:
Error: INVALID_SCHEMA
Field: agentType
Expected: "assistant" | "coordinator" | "specialist" | "scheduled"
Received: "bot"Fix: Use one of the valid agent types listed in the error message.
Error: PROMPT_TOO_SHORT
Field: systemPrompt
Minimum: 50 characters
Received: 23 charactersFix: Expand your system prompt with clear role definition, capabilities, and constraints.
Error: UNSAFE_TOOL_CONFIG
Tool: execute-javascript
Issue: High-risk tool without approval requirement
Required: Add to guardrails.requireApprovalFor arrayFix: Add the high-risk tool to your requireApprovalFor list in guardrails.
Warning: DELEGATION_TARGET_NOT_FOUND
Agent: content-reviewer
Status: Not found in agency
Impact: Delegation will fail at runtimeFix: Create the target agent first, or remove it from allowedAgents.
You can validate an agent configuration before creating it using the validation endpoint:
POST /api/agents/validate
Content-Type: application/json
{
"name": "my-agent",
"displayName": "My Agent",
"agentType": "assistant",
// ... full agent config
}
// Response (Success)
{
"valid": true,
"warnings": [
{
"code": "MISSING_GUARDRAILS",
"message": "Consider adding guardrails for production use"
}
]
}
// Response (Failure)
{
"valid": false,
"errors": [
{
"code": "INVALID_SCHEMA",
"field": "agentType",
"message": "Invalid agent type 'bot'"
}
]
}