Quick Start Example
Here's a complete example of registering an agent and applying a policy:
// 1. Register a new agent
POST /v1/agents
{
"name": "customer-support-agent",
"type": "autonomous",
"config": {
"model": "gpt-4",
"max_tokens": 2000,
"temperature": 0.7
},
"metadata": {
"environment": "production",
"version": "1.2.0"
}
}
// 2. Create a safety policy
POST /v1/policies
{
"name": "no-sensitive-data",
"rules": [
{
"action": "block",
"condition": "contains_sensitive_data"
}
],
"enabled": true
}
// 3. Apply policy to agent
POST /v1/policies/{policy_id}/apply
{
"agent_id": "{agent_id}",
"priority": "high"
}