> For the complete documentation index, see [llms.txt](https://docs.ibexa.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ibexa.ai/developers/rest-api/executions/get-execution.md).

# Get Execution

Get agent execution by ID.

Users can only access agents within their organisation.

```json
{"openapi":"3.1.0","info":{"title":"Ibexa Agentic Marketing Platform","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/login/access-token"}}}},"schemas":{"ExecutionResponseSchema":{"properties":{"id":{"type":"integer","title":"Id","description":"Execution ID"},"agent_id":{"type":"integer","title":"Agent Id","description":"Agent ID"},"agent_name":{"type":"string","title":"Agent Name","description":"Name of the agent that was run"},"args":{"additionalProperties":true,"type":"object","title":"Args","description":"Optional args to pass to the agent during execution"},"status":{"$ref":"#/components/schemas/ExecutionStatus","description":"Execution status"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration","description":"Execution duration in seconds"},"trigger":{"anyOf":[{"$ref":"#/components/schemas/ExecutionTriggerSchema"},{"type":"null"}],"description":"How the run was started"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/ExecutionUserSchema"},{"type":"null"}],"description":"User who created the execution — the user the run is triggered on behalf of, for scheduled and webhook runs as well as manual ones"},"updated_by":{"anyOf":[{"$ref":"#/components/schemas/ExecutionUserSchema"},{"type":"null"}],"description":"User who last updated the execution"},"conversation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Conversation Id","description":"Associated conversation ID"},"result":{"anyOf":[{},{"type":"null"}],"title":"Result","description":"Execution result"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"Execution started time"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"Execution finished time"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Execution created time"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Execution updated time"},"usage":{"anyOf":[{"$ref":"#/components/schemas/ExecutionUsageSchema"},{"type":"null"}],"description":"Token usage and cost, available once execution succeeds"},"credits":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Credits","description":"Total credits consumed by this execution, or null if none were recorded."},"language_model":{"anyOf":[{"$ref":"#/components/schemas/ExecutionLanguageModelSchema"},{"type":"null"}],"description":"The model the agent runs on"},"mcp_servers":{"items":{"$ref":"#/components/schemas/ExecutionMCPServerSchema"},"type":"array","title":"Mcp Servers","description":"Verified MCP servers attached to the agent. These are what the agent can reach, not necessarily what this run called. Served only by this endpoint, never by the executions list"},"mcp_servers_count":{"type":"integer","title":"Mcp Servers Count","description":"Number of entries in `mcp_servers`","default":0},"tool_calls":{"type":"integer","title":"Tool Calls","description":"How many tool calls the run made. Excludes the platform's own system tools (file access, conversation context). 0 for a run that failed, whose conversation is discarded with it","default":0},"llm_calls":{"type":"integer","title":"Llm Calls","description":"How many times the run reached a model. Counted the same way as `tool_calls` and with the same limits: a model call that requested nothing but system tools is not counted, and a failed run reports 0","default":0},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"A short outcome-focused recap of what this run did, written by a model after the run ends. Null while it is still being written — it is generated in the background once the run finishes, so it is never present the moment the run completes and appears on a later read. Also null for a run that produced no conversation, and for cancelled and failed runs, which are not summarised. Describes the run as it ended and is not revised if the conversation is continued afterwards. Served only by this endpoint, never by the executions list"}},"type":"object","required":["id","agent_id","agent_name","args","status","duration","created_by","updated_by","conversation_id","result","started_at","finished_at","created_at","updated_at"],"title":"ExecutionResponseSchema","description":"Pydantic schema for agent execution response."},"ExecutionStatus":{"type":"string","enum":["PENDING","STARTED","SUCCESS","FAILURE","CANCELED"],"title":"ExecutionStatus","description":"Status values for an execution."},"ExecutionTriggerSchema":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"ID of the individual trigger that fired this run, or null once that trigger has been deleted"},"definition_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Definition Id","description":"ID of the trigger definition — the kind of trigger — as listed by GET /triggers/definitions"},"type":{"$ref":"#/components/schemas/TriggerType","description":"Coarse bucket of the trigger that started this execution (MANUAL, SCHEDULER, WEBHOOK, or UNKNOWN if unattributed), derived from `definition_id`. UNKNOWN covers runs created before the platform began recording their origin, and runs it starts directly rather than through a trigger"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Human-readable name of the trigger definition, or null when the catalog does not know it"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What this kind of trigger does"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"The trigger's own settings — a schedule's cadence, a webhook's delivery options. Webhook secrets are never included. Null once the trigger has been deleted: only the kind of trigger is recorded on the execution, the settings live on the trigger itself"}},"type":"object","required":["id","definition_id","type","label"],"title":"ExecutionTriggerSchema","description":"How an execution was started, with the firing trigger's own settings."},"TriggerType":{"type":"string","enum":["MANUAL","SCHEDULER","WEBHOOK","UNKNOWN"],"title":"TriggerType","description":"Coarse bucket a snapshotted `trigger_definition_id` maps to.\n\nScheduler alone has six definition ids (one per cadence), all of which\nbucket to SCHEDULER — this is \"how was it started\", not \"which specific\ntrigger fired\" (see `top_triggers_by_execution_count` for the latter)."},"ExecutionUserSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","email","full_name"],"title":"ExecutionUserSchema","description":"Basic user info embedded in execution responses."},"ExecutionUsageSchema":{"properties":{"tokens_input":{"type":"integer","title":"Tokens Input"},"tokens_output":{"type":"integer","title":"Tokens Output"},"tokens_cache_read":{"type":"integer","title":"Tokens Cache Read"},"tokens_cache_write":{"type":"integer","title":"Tokens Cache Write"},"tokens_audio_input":{"type":"integer","title":"Tokens Audio Input"},"tokens_audio_output":{"type":"integer","title":"Tokens Audio Output"},"cost_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost Amount"},"cost_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Currency"}},"type":"object","required":["tokens_input","tokens_output","tokens_cache_read","tokens_cache_write","tokens_audio_input","tokens_audio_output","cost_currency"],"title":"ExecutionUsageSchema","description":"Token usage and cost data for a completed execution."},"ExecutionLanguageModelSchema":{"properties":{"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model identifier as the provider names it, e.g. 'gpt-4o'"},"provider_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Name","description":"Name of the configured provider"},"provider_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Type","description":"Provider family, e.g. 'openai' or 'anthropic'"}},"type":"object","required":["model_id","provider_name","provider_type"],"title":"ExecutionLanguageModelSchema","description":"The model the execution's agent runs on."},"ExecutionMCPServerSchema":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id","description":"MCP server ID"},"name":{"type":"string","title":"Name","description":"MCP server name"},"identifier":{"type":"string","title":"Identifier","description":"MCP server identifier"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What the server provides, from its catalog entry. Null for a server added by hand rather than installed from the catalog"}},"type":"object","required":["id","name","identifier","description"],"title":"ExecutionMCPServerSchema","description":"An MCP server the execution's agent can reach."}}},"paths":{"/api/v1/executions/{execution_id}":{"get":{"tags":["executions","public"],"summary":"Get Execution","description":"Get agent execution by ID.\n\nUsers can only access agents within their organisation.","operationId":"executions-get_execution","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"integer","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionResponseSchema"}}}},"401":{"description":"User not authenticated","content":{"application/json":{}}},"403":{"description":"User lacks permission","content":{"application/json":{}}}}}}}}
```
