agent
title: Agent sidebar_label: Agent (12) sidebar_position: 4 doc_type: reference
Agent
En bref
Invoquez l'agent IA, consultez ses sessions et analysez ses performances.
Prerequis
- Cle API avec le preset MCP et les scopes requis
- Client MCP configure (voir Configuration)
Exemples minimaux
Invoquer un agent et suivre l'execution
- Lancez une tache agent :
{
"name": "agent_invoke",
"arguments": {
"agentId": "uuid-de-lagent",
"task": "Analyse les fournisseurs actifs"
}
}
- Verifiez le statut d'execution :
{
"name": "agent_status",
"arguments": {
"taskId": "uuid-de-la-tache"
}
}
- Consultez l'historique des conversations :
{
"name": "agent_get_history",
"arguments": {
"agentId": "uuid-de-lagent"
}
}
agent_cancel
Annule l'execution d'un agent en cours.
| Scope | mcp.agent.execute |
| Lecture seule | Non |
| Destructif | Oui |
| Idempotent | Non |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
taskId | string | Oui | Identifiant de la tache a annuler |
reason | string | Non | Reason for cancellation |
Reponse
| Champ | Type | Description |
|---|---|---|
taskId | string | |
cancelled | boolean | |
previousStatus | string | |
message | string |
Outils lies :
agent_status,agent_invoke
agent_create_from_template
Cree un agent depuis un template pre-configure.
| Scope | mcp.write |
| Lecture seule | Non |
| Destructif | Non |
| Idempotent | Non |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
customizations | object | Oui | |
name | string | Oui | Name for the new agent |
templateId | string | Oui | |
description | string | Non | Custom description (optional, uses template default if not provided) |
folderId | string (uuid) | Non | Folder ID to place agent in |
removeTools | array | Non | Tools to remove from template defaults |
systemPrompt | string | Non | Override template system prompt |
tools | array | Non | Additional tools to enable |
Reponse
| Champ | Type | Description |
|---|---|---|
success | boolean | |
agentId | string | |
agentName | string | |
templateUsed | string | |
templateCategory | string | |
toolsEnabled | array | |
message | string | |
availableTemplates | array |
Outils lies :
agent_list,agent_get,agent_invoke
agent_get
Recupere les details d'un agent (configuration, outils, historique).
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
agentId | string | Non | Agent ID (UUID) to retrieve |
agentName | string | Non | Agent display name (e.g., "Compliance Analyst Assistant"), case-insensitive |
apiName | string | Non | Agent API name/slug (e.g., "compliance-analyst-assistant") |
Outils lies :
agent_list,agent_invoke,agent_get_history
agent_get_history
Consulte l'historique des conversations d'un agent.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
agentApiName | string | Non | Agent API name (alternative to agentId) |
agentId | string (uuid) | Non | Identifiant de l'agent |
includeMessages | boolean | Non | Include message logs for each session (defaut : true) |
limit | number | Non | Nombre maximum de conversations (defaut : 20) |
messageLimit | number | Non | Maximum messages per session (defaut : 20) |
offset | number | Non | Offset for pagination (defaut : 0) |
sessionId | string (uuid) | Non | Specific session/conversation ID to get history for |
Reponse
| Champ | Type | Description |
|---|---|---|
agentId | string | |
agentName | string | |
agentApiName | string | |
sessions | array | |
pagination | object | |
total | number | |
limit | number | |
offset | number | |
hasMore | boolean |
Outils lies :
agent_get_tool_calls,agent_invoke
agent_get_performance
Affiche les metriques de performance d'un agent.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
agentId | string (uuid) | Oui | Agent definition ID to analyze |
includeErrorAnalysis | boolean | Non | Include error pattern analysis (defaut : true) |
includeLlmBreakdown | boolean | Non | Include per-model LLM statistics (defaut : true) |
includeToolBreakdown | boolean | Non | Include per-tool statistics (defaut : true) |
timeRange | choix (1h, 24h, 7d, 30d) | Non | Time range for metrics aggregation (defaut : "24h") |
Reponse
| Champ | Type | Description |
|---|---|---|
agentId | string | |
timeRange | string | |
period | object | |
start | string | |
end | string | |
sessions | object | |
total | number | |
successful | number | |
failed | number | |
retryable | number | |
cancelled | number | |
successRate | number | |
tools | array | |
llm | array | |
errors | array | |
summary | object | |
healthScore | number | |
recommendations | array |
Outils lies :
agent_get_tool_calls,agent_get_history
agent_get_tool_calls
Liste les appels d'outils effectues par un agent lors d'une execution.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
sessionId | string (uuid) | Oui | Session ID (conversation ID) from agent_invoke |
includeErrors | boolean | Non | Include error details for failed tool calls (defaut : true) |
includeResults | boolean | Non | Include tool call results (output preview) (defaut : true) |
limit | number | Non | Maximum tool calls to return (defaut : 50) |
Reponse
| Champ | Type | Description |
|---|---|---|
sessionId | string | |
agentId | string | |
sessionStatus | string | |
toolCalls | array | |
stats | object | |
totalCalls | number | |
successCount | number | |
errorCount | number | |
totalDurationMs | number | |
successRate | number |
Outils lies :
agent_status,agent_get_history
agent_invoke
Invoque un agent IA pour executer une tache. L'execution est asynchrone.
| Scope | mcp.agent.execute |
| Lecture seule | Non |
| Destructif | Non |
| Idempotent | Non |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
message | string | Oui | Message/prompt to send to the agent |
agentId | string (uuid) | Non | Identifiant de l'agent a invoquer |
apiName | string | Non | Agent API name to invoke (alternative to agentId) |
context | record | Non | Contexte additionnel pour l'agent (optionnel) |
conversationId | string (uuid) | Non | Existing conversation ID for multi-turn chat |
streaming | boolean | Non | Enable streaming response (recommended for long tasks) (defaut : true) |
Reponse
| Champ | Type | Description |
|---|---|---|
taskId | string | |
conversationId | string | |
status | enum | |
streamUrl | string | |
message | string |
Exemple
{
"name": "agent_invoke",
"arguments": {
"agentId": "uuid-de-lagent",
"task": "Analyse les fournisseurs actifs"
}
}
Outils lies :
agent_status,agent_cancel,agent_get_tool_calls
agent_list
Liste les agents IA disponibles dans votre workspace.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
agentType | choix (conversational, task_executor, data_analyzer, custom) | Non | Filter by agent type |
folderId | string (uuid) | Non | Filter by folder ID |
limit | number | Non | Maximum agents to return (defaut : 50) |
offset | number | Non | Offset for pagination (defaut : 0) |
search | string | Non | Search by agent name or description |
status | choix (draft, published, archived) | Non | Filter by agent status |
Reponse
| Champ | Type | Description |
|---|---|---|
agents | array | |
total | number | |
hasMore | boolean |
Exemple
{
"name": "agent_list",
"arguments": {}
}
Outils lies :
agent_get,agent_invoke,agent_get_performance
agent_status
Consulte le statut d'execution d'un agent (en cours, termine).
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
taskId | string | Oui | Task ID from agent_invoke |
Reponse
| Champ | Type | Description |
|---|---|---|
taskId | string | |
status | enum | |
progress | number | |
result | unknown | |
response | string | |
toolCalls | array | |
tool | string | |
metadata | record | |
error | string | |
cancellationReason | string | |
startedAt | string | |
completedAt | string |
Outils lies :
agent_invoke,agent_cancel,agent_get_tool_calls
agent_studio_get_definition
Recupere une definition d'agent specifique.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
agentId | string (uuid) | Non | Agent ID (UUID) |
agentName | string | Non | Agent name (alternative to agentId, case-insensitive lookup) |
Outils lies :
agent_studio_list_definitions,agent_studio_update_definition,agent_invoke
agent_studio_list_definitions
Liste les definitions d'agents (templates de configuration).
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
agentType | string | Non | Filter by agent type |
folderId | string (uuid) | Non | Filter by folder ID |
limit | number | Non | Nombre maximum de resultats (defaut : 20) |
offset | number | Non | Decalage pour la pagination (defaut : 0) |
search | string | Non | Search agents by name or description |
status | choix (draft, published, archived) | Non | Filter by agent status |
Reponse
| Champ | Type | Description |
|---|---|---|
agents | array | |
total | number | |
hasMore | boolean |
Outils lies :
agent_studio_get_definition,agent_studio_update_definition,agent_invoke
agent_studio_update_definition
Met a jour la definition d'un agent.
| Scope | mcp.write |
| Lecture seule | Non |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
agentId | string (uuid) | Oui | ID of the agent to update |
description | string | Non | New agent description |
icon | string | Non | Agent icon identifier |
name | string | Non | New agent name |
status | choix (draft, published, archived) | Non | Agent status |
Reponse
| Champ | Type | Description |
|---|---|---|
agentId | string | |
name | string | |
status | string | |
updatedFields | array | |
updatedAt | string |
Outils lies :
agent_studio_get_definition,agent_studio_list_definitions
Depannage
| Code | Message | Solution |
|---|---|---|
| 403 | Scope insuffisant | Ajoutez mcp.agent.execute a votre cle API. |
Besoin d'aide ?
Ecrivez-nous : Support et contact.