Skip to content

Agents

7 calls. Every request needs the Authorization header: see the overview.

GET /agents

Every definition of the tenant, or of one namespace with { namespace }.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Response: Agent[] (200)

curl -X GET "https://api.maitento.com/agents" \
-H "Authorization: $MAITENTO_AUTH"
DELETE /agents/by-id/{id}

Deletes the definition (refused with a 400 while something still uses it or a run of it is going).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (204)

curl -X DELETE "https://api.maitento.com/agents/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
GET /agents/by-id/{id}

The definition with this id. Throws NotFoundError when there is none.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: Agent (200)

curl -X GET "https://api.maitento.com/agents/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
PUT /agents/by-id/{id}

Updates an agent: a new version when anything changed.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: AgentUpdateRequest

FieldTypeRequiredDescription
namestringyesThe agent’s name, unique within its namespace.
aiModelIduuidyesThe id of the catalogue model the agent runs on.
systemPromptstringyesThe agent’s standing instructions (its system prompt): who it is and how it behaves.
summaryForOtherAgentsstringyesOne line that describes the agent to other agents: a router choosing who answers, or a manager choosing who to hand work to, reads it.
externalOperationReferencesAgentExternalOperationReferenceInput[]The tools the agent may call in every interaction it takes part in.
routedSubAgentsVersionReference[] | nullMakes the agent a router: on every turn it is given, its model picks one of these agents (by their summaries, guided by systemPrompt) to take the turn instead. The first is the fallback. A router has no tools of its own.
allowSwarmbooleanWhether the agent may start sub-interactions where an interaction it takes part in allows them.
allowWebSearchbooleanWhether the agent is given the built-in web search tool. An omitted value is false.
allowWebFetchbooleanWhether the agent is given the built-in web fetch tools. An omitted value is false.

Response: Agent (200)

curl -X PUT "https://api.maitento.com/agents/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"name":"...","aiModelId":"...","systemPrompt":"...","summaryForOtherAgents":"..."}'
GET /namespaces/{namespaceName}/agents

Every definition of the tenant, or of one namespace with { namespace }.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes

Response: Agent[] (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/agents" \
-H "Authorization: $MAITENTO_AUTH"
POST /namespaces/{namespaceName}/agents

Creates an agent (version 1) in the namespace.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes

Request body: AgentCreateRequest

FieldTypeRequiredDescription
namestringyesThe agent’s name, unique within its namespace.
aiModelIduuidyesThe id of the catalogue model the agent runs on.
systemPromptstringyesThe agent’s standing instructions (its system prompt): who it is and how it behaves.
summaryForOtherAgentsstringyesOne line that describes the agent to other agents: a router choosing who answers, or a manager choosing who to hand work to, reads it.
externalOperationReferencesAgentExternalOperationReferenceInput[]The tools the agent may call in every interaction it takes part in.
routedSubAgentsVersionReference[] | nullMakes the agent a router: on every turn it is given, its model picks one of these agents (by their summaries, guided by systemPrompt) to take the turn instead. The first is the fallback. A router has no tools of its own.
allowSwarmbooleanWhether the agent may start sub-interactions where an interaction it takes part in allows them.
allowWebSearchbooleanWhether the agent is given the built-in web search tool. An omitted value is false.
allowWebFetchbooleanWhether the agent is given the built-in web fetch tools. An omitted value is false.

Response: Agent (200)

curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/agents" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"name":"...","aiModelId":"...","systemPrompt":"...","summaryForOtherAgents":"..."}'
GET /namespaces/{namespaceName}/agents/by-name/{name}

The definition with this name in the namespace. Throws NotFoundError when there is none.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Response: Agent (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/agents/by-name/<name>" \
-H "Authorization: $MAITENTO_AUTH"