list
List AI agent resources in the project.
Response
datalist of objectsRequired
An array of objects containing the list of AI Agent data.
linksobjectRequired
Object containing pagination links
Response Example
Response
1 { 2 "data": [ 3 { 4 "id": "993ed018-9e79-4e50-b97b-984bd5534095", 5 "project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780", 6 "display_name": "Support Assistant", 7 "type": "ai_agent", 8 "created_at": "2024-05-06T12:20:00Z", 9 "updated_at": "2024-05-06T12:25:00Z", 10 "ai_agent": { 11 "prompt": { 12 "text": "You are a helpful customer support assistant." 13 }, 14 "agent_id": "a87db7ed-8ebe-42e4-829f-8ba5a4152f54", 15 "name": "Support Assistant" 16 } 17 } 18 ], 19 "links": { 20 "self": "https://example.signalwire.com/api/fabric/resources/ai_agents?page_number=0&page_size=50", 21 "first": "https://example.signalwire.com/api/fabric/resources/ai_agents?page_number=0&page_size=50" 22 } 23 }
Example
1 from signalwire.rest import RestClient 2 3 client = RestClient( 4 project="your-project-id", 5 token="your-api-token", 6 host="your-space.signalwire.com", 7 ) 8 9 response = client.fabric.ai_agents.list() 10 for agent in response.get("data", []): 11 print(f"{agent['display_name']}: {agent['id']}")