List AI agents
GET /ai_agents
/ai_agentsLists the AI agents of the account, the last changed first, without their definition: name, description, state, version, who can use them, which tools they have, how many automations use them and what they spent in the last 30 days.
What an agent is: a helper of the account that is set up once (instructions, tools, limits) and then used wherever it is needed: in an automation step, or asked directly with run_ai_agent.
When to use: To find an agent by name or state before reading it with get_ai_agent, or before asking it something with run_ai_agent. Also to check that an agent with a similar purpose does not exist before creating another one.
When not to use: To read the instructions and tools of one agent use get_ai_agent: the list leaves the definition out. Automations that use an agent are list_workflows; classic automations are list_automations.
Filters: All filters are optional and combine with AND.
search: part of the name, case-insensitive; surrounding spaces are ignored (up to 120 characters).status: only agents in that state. Without it the list has every agent except the archived ones; sendarchivedto see those. Sorting: fixed, last changed first; there is noorderparameter. Pagination:pageanditemsPerPage(default 25, maximum 100), like the rest of the API; the response gives the total inhydra:totalItems.
Permissions: Requires the automations.read capability.
Value for the X-Auth-Token header parameter.
In: header
Query Parameters
Part of the name of the agent, case-insensitive. Up to 120 characters.
length <= 120Only agents in this state. Without it, every agent but the archived ones.
Value in
- "draft"
- "published"
- "archived"
Page number, starting at 1.
1 <= value1Agents per page. Default 25, maximum 100.
1 <= value <= 10025Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://api.easymailing.com/ai_agents?search=investigador&status=published&page=1&itemsPerPage=25" \ -H "X-Auth-Token: YOUR_API_KEY"[ { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "name": "string", "description": "string", "icon": "string", "status": "draft", "published_version": 1, "unpublished_changes": true, "access": "team", "period_cap": {}, "tool_types": [ "string" ], "used_in": 0, "spent_last_30_days": {}, "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4", "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z" }]