cURL
curl --request GET \ --url https://api.example.com/agents/{agentId}
{ "success": true, "data": { "data.agentId": "<string>", "data.name": "<string>", "data.status": "<string>", "data.bio": "<string>", "data.lore": [ {} ], "data.topics": [ {} ], "data.adjectives": [ {} ], "data.style": {}, "data.settings": {}, "data.plugins": [ {} ], "data.enabled": true, "data.createdAt": 123, "data.updatedAt": 123 } }
Retrieve details about a specific agent
GET /agents/{agentId}
active
inactive
curl -X GET http://localhost:3000/agents/550e8400-e29b-41d4-a716-446655440000 \ -H "Content-Type: application/json"
curl -X GET http://localhost:3000/agents/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
{ "success": true, "data": { "agentId": "550e8400-e29b-41d4-a716-446655440000", "name": "Alice", "status": "active", "bio": "A helpful AI assistant specializing in customer support", "lore": [ "Has extensive training in customer service", "Specializes in resolving user issues quickly", "Known for empathy and understanding" ], "topics": [ "customer support", "product knowledge", "troubleshooting" ], "adjectives": [ "helpful", "patient", "knowledgeable", "friendly" ], "style": { "all": [ "Be concise and clear", "Show empathy for user concerns", "Provide actionable solutions" ], "chat": [ "Use a warm, conversational tone", "Ask clarifying questions when needed" ] }, "settings": { "model": "gpt-4", "embeddingModel": "text-embedding-3-small" }, "plugins": ["bootstrap"], "enabled": true, "createdAt": 1709510400000, "updatedAt": 1709596800000 } }
const agentId = "550e8400-e29b-41d4-a716-446655440000"; const response = await fetch(`http://localhost:3000/agents/${agentId}`, { method: 'GET', headers: { 'Content-Type': 'application/json' } }); const { success, data } = await response.json(); if (success) { console.log(`Agent: ${data.name}`); console.log(`Status: ${data.status}`); console.log(`Bio: ${data.bio}`); }
import requests agent_id = "550e8400-e29b-41d4-a716-446655440000" response = requests.get(f'http://localhost:3000/agents/{agent_id}') data = response.json() if data['success']: agent = data['data'] print(f"Agent: {agent['name']}") print(f"Status: {agent['status']}") print(f"Bio: {agent['bio']}")
interface Agent { agentId: string; name: string; status: 'active' | 'inactive'; bio?: string; lore?: string[]; topics?: string[]; adjectives?: string[]; style?: { all?: string[]; chat?: string[]; post?: string[]; }; settings?: Record<string, any>; plugins?: string[]; enabled?: boolean; createdAt?: number; updatedAt?: number; } interface GetAgentResponse { success: boolean; data: Agent; } const agentId = "550e8400-e29b-41d4-a716-446655440000"; const response = await fetch(`http://localhost:3000/agents/${agentId}`); const { success, data }: GetAgentResponse = await response.json(); if (success) { console.log(`Agent: ${data.name}`); }
{ "success": false, "error": "Agent not found" }
{ "success": false, "error": "Invalid agent ID format" }
{ "success": false, "error": "Failed to retrieve agent" }