The Agent Object
An agent represents an AI identity with spending policies and wallets.
Attributes
Unique identifier for the agent
Optional description of the agent’s purpose
Organization ID that owns this agent
Associated wallet ID (if wallet created)
Spending limits for this agent
Spending policy rules Whitelist of allowed merchants
Blacklist of blocked merchants
Amount requiring human approval
KYA (Know Your Agent) level: none, basic, verified, attested
KYA status: pending, active, suspended
Whether the agent is active
Custom metadata key-value pairs
ISO 8601 timestamp of agent creation
ISO 8601 timestamp of last update
Create Agent
curl -X POST https://api.sardis.sh/api/v2/agents \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "shopping-agent",
"description": "Handles e-commerce purchases",
"spending_limits": {
"per_transaction": "500.00",
"daily": "2000.00",
"monthly": "20000.00"
},
"policy": {
"blocked_categories": ["gambling", "adult_content"],
"auto_approve_below": "100.00"
},
"create_wallet": true
}'
Request Body
Spending limits (defaults applied if omitted)
Whether to automatically create a wallet
Response
{
"agent_id" : "agent_abc123def456" ,
"name" : "shopping-agent" ,
"description" : "Handles e-commerce purchases" ,
"owner_id" : "org_xyz789" ,
"wallet_id" : "wallet_ghi789jkl012" ,
"spending_limits" : {
"per_transaction" : "500.00" ,
"daily" : "2000.00" ,
"monthly" : "20000.00" ,
"total" : "100000.00"
},
"policy" : {
"allowed_merchants" : null ,
"blocked_merchants" : [],
"allowed_categories" : null ,
"blocked_categories" : [ "gambling" , "adult_content" ],
"require_approval_above" : null ,
"auto_approve_below" : "100.00"
},
"kya_level" : "basic" ,
"kya_status" : "active" ,
"is_active" : true ,
"metadata" : {
"framework" : "langchain" ,
"version" : "0.1.0"
},
"created_at" : "2025-03-03T10:00:00Z" ,
"updated_at" : "2025-03-03T10:00:00Z"
}
List Agents
curl https://api.sardis.sh/api/v2/agents?limit= 10 & offset = 0 \
-H "Authorization: Bearer sk_live_your_api_key"
Query Parameters
Number of agents to return (max: 100)
Response
[
{
"agent_id" : "agent_abc123" ,
"name" : "shopping-agent" ,
"description" : "Handles e-commerce purchases" ,
"owner_id" : "org_xyz789" ,
"wallet_id" : "wallet_ghi789" ,
"spending_limits" : { ... },
"policy" : { ... },
"kya_level" : "basic" ,
"kya_status" : "active" ,
"is_active" : true ,
"metadata" : {},
"created_at" : "2025-03-03T10:00:00Z" ,
"updated_at" : "2025-03-03T10:00:00Z"
}
]
Get Agent
curl https://api.sardis.sh/api/v2/agents/agent_abc123 \
-H "Authorization: Bearer sk_live_your_api_key"
Path Parameters
Update Agent
curl -X PATCH https://api.sardis.sh/api/v2/agents/agent_abc123 \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"spending_limits": {
"daily": "3000.00"
},
"policy": {
"auto_approve_below": "200.00"
}
}'
Request Body
All fields are optional. Only provided fields will be updated.
Delete Agent
Deleting an agent is permanent and cannot be undone. Associated wallets are not deleted.
curl -X DELETE https://api.sardis.sh/api/v2/agents/agent_abc123 \
-H "Authorization: Bearer sk_live_your_api_key"
Get Agent Limits
Retrieve current spending limits and usage.
curl https://api.sardis.sh/api/v2/agents/agent_abc123/limits \
-H "Authorization: Bearer sk_live_your_api_key"
Response
{
"agent_id" : "agent_abc123" ,
"spending_limits" : {
"per_transaction" : "500.00" ,
"daily" : "2000.00" ,
"monthly" : "20000.00" ,
"total" : "100000.00"
},
"wallet" : {
"wallet_id" : "wallet_ghi789" ,
"addresses" : {
"base" : "0x1234..."
},
"mpc_provider" : "turnkey"
}
}
KYA (Know Your Agent)
Get KYA Status
curl https://api.sardis.sh/api/v2/agents/agent_abc123/kya \
-H "Authorization: Bearer sk_live_your_api_key"
Response
{
"agent_id" : "agent_abc123" ,
"kya_level" : "basic" ,
"kya_status" : "active" ,
"manifest" : {
"capabilities" : [ "saas_subscription" , "api_credits" ],
"max_budget_per_tx" : "500.00" ,
"daily_budget" : "2000.00" ,
"framework" : "langchain"
},
"trust_score" : 0.85
}
Upgrade KYA Level
curl -X POST https://api.sardis.sh/api/v2/agents/agent_abc123/kya/upgrade \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"target_level": "verified",
"anchor_verification_id": "persona_verif_xyz"
}'
Target KYA level: basic, verified, or attested
Owner KYC verification ID (required for verified)
SHA-256 hash of agent code (required for attested)
Common Use Cases
Create Agent with Natural Language Policy
from sardis_sdk import SardisClient
client = SardisClient( api_key = "sk_live_your_api_key" )
# Parse natural language policy
policy = client.policies.parse(
natural_language = "Allow max $500 per day on AWS and OpenAI, block gambling"
)
# Create agent with parsed policy
agent = client.agents.create(
name = "saas-agent" ,
policy = policy.to_dict()
)
Create Multi-Agent System
# Create a group for shared budget
group = client.groups.create(
name = "marketing-team" ,
budget = {
"daily" : "5000.00" ,
"monthly" : "50000.00"
}
)
# Create agents in the group
for agent_name in [ "social-media-agent" , "ad-buyer-agent" , "analytics-agent" ]:
agent = client.agents.create(
name = agent_name,
spending_limits = { "per_transaction" : "500.00" }
)
client.groups.add_agent(group.group_id, agent.agent_id)