Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.knoxcall.com/llms.txt

Use this file to discover all available pages before exploring further.

Create agent

POST /admin/ai-gateway/{gatewayId}/agents
Request body
{
  "name": "Customer Support Bot",
  "slug": "support-bot",
  "primary_route_id": "route-...",
  "default_model": "claude-3-5-sonnet-20241022",
  "model_allowlist": ["claude-3-5-sonnet-20241022", "claude-haiku-4-5"],
  "tool_allowlist": ["search_kb", "create_ticket"],
  "output_schema": {
    "type": "object",
    "required": ["response", "category"],
    "properties": {
      "response": { "type": "string" },
      "category": { "type": "string", "enum": ["billing", "technical", "general"] }
    }
  },
  "output_validation_action": "retry",
  "budget_daily_usd": 10.00,
  "streaming_enabled": true,
  "firewall_policy_id": "fp-..."
}
Key fields
FieldTypeDescription
model_allowliststring[]If non-empty, only these models may be requested.
model_denyliststring[]Models that are always blocked regardless of allowlist.
model_rewriteobjectMap of model name → replacement (e.g. {"gpt-4": "gpt-4o"}).
tool_allowliststring[]If non-empty, only these tool names are forwarded upstream.
output_schemaJSON SchemaResponse is validated against this schema.
output_validation_actionblock | retry | warnAction when output schema fails: block returns 422, retry re-calls once with corrective prompt.
fallback_route_idsstring[]Routes to try in order when the primary route returns 5xx.
firewall_policy_idstringLinks the agent to a firewall policy for custom heuristics + canary config.