Aller au contenu

Graphe d’exécution d’un agent

GET/api/public/v1/agents/{agent_id}/execution-graph beta

The agent's window as a set-membership graph: runs, surfaces, tools, artifacts. The window is an explicit from/to range of any span (window.key is then custom) or the deprecated rolling window key; with neither, the last 7 days. from wins over window; to without from or from after to is a 422.

Fenêtre de terminal
curl --fail-with-body -X GET 'https://app.openlatch.ai/api/public/v1/agents/<agent_id>/execution-graph' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Rôle dans l’organisationCe point de terminaison
ownerAutorisé
adminAutorisé
editorAutorisé
viewerAutorisé

Une clé porte le rôle que son propriétaire détient dans l’organisation. Voir Authentification.

Portée de clé d’API : agents:read

ParamètreTypeDescription
agent_idstringObligatoire.
ParamètreTypeDescription
windowstring — one of 24h, 7d, 30dDeprecated: send from (and optionally to) instead. A rolling window ending now — 24h, 7d or 30d. Ignored when from is sent.
fromstring (date-time) or nullStart of an explicit range (ISO 8601), any distance in the past. Wins over window. Snapped down to 10 seconds; the response's window.key is then custom.
tostring (date-time) or nullEnd of the explicit range (ISO 8601), exclusive. Requires from, must not be before it (equal bounds are an empty window); defaults to now and is clamped to it. Snapped down to 10 seconds like from.
expandarray of string — one of session, tool, artifact or null
session_pageinteger or null
session_page_sizeinteger or null
tool_pageinteger or null
tool_page_sizeinteger or null
artifact_pageinteger or null
artifact_page_sizeinteger or null
ChampTypeDescription
action_tables_availablebooleanObligatoire.
agentobjectObligatoire. The agent the graph belongs to — the existing `AgentRead` subset.
agent.agent_idstringObligatoire.
agent.display_namestring or nullObligatoire.
agent.first_seen_atstring (date-time)Obligatoire.
agent.latest_archstring or nullObligatoire.
agent.latest_osstring or nullObligatoire.
agent.platformstringObligatoire.
baseline_suppressedbooleanObligatoire.
edgesarray of objectObligatoire.
edges[].idstringObligatoire.
edges[].session_idsarray of stringObligatoire.
edges[].sourcestringObligatoire.
edges[].targetstringObligatoire.
edges[].weightnumberObligatoire.
layer_pageobjectObligatoire.
nodesarray of objectObligatoire.
nodes[].baseline_coveragenumberObligatoire.
nodes[].baseline_observationsintegerObligatoire.
nodes[].confidencestring — one of high, medium, lowObligatoire.
nodes[].coveragenumberObligatoire.
nodes[].entityobjectObligatoire.
nodes[].idstringObligatoire.
nodes[].labelstringObligatoire.
nodes[].layerstring — one of agent, session, surface, tool, artifactObligatoire.
nodes[].metricsobject or nullObligatoire.
nodes[].observationsintegerObligatoire.
nodes[].session_idsarray of stringObligatoire.
nodes[].tierstring — one of hot, warm, rare, novel, fadingObligatoire.
totalsobjectObligatoire. Window-wide figures. Never page-scoped (D50).
totals.baseline_eventsintegerObligatoire.
totals.baseline_sessionsintegerObligatoire.
totals.eventsintegerObligatoire.
totals.mean_run_cost_tokensnumber or nullObligatoire.
totals.sessionsintegerObligatoire.
totals.toolless_sessionsintegerObligatoire.
totals.unidentified_actionsintegerObligatoire.
windowobjectObligatoire. `{key, from, to, as_of}`.
window.as_ofstring (date-time)Obligatoire.
window.fromstring (date-time)Obligatoire.
window.keystringObligatoire.
window.tostring (date-time)Obligatoire.
{
"action_tables_available": false,
"agent": {
"agent_id": "agt_01jbwa2k1vfrn9y42xhgxhmzj2",
"display_name": "release-bot",
"first_seen_at": "2026-01-15T14:32:05Z",
"latest_arch": "string",
"latest_os": "string",
"platform": "string"
},
"baseline_suppressed": false,
"edges": [
{
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"session_ids": [
"ses_01jbwa2k1vfrn9y42xhgxhmzj2"
],
"source": "string",
"target": "string",
"weight": 0.25
}
],
"layer_page": {},
"nodes": [
{
"baseline_coverage": 0.25,
"baseline_observations": 3,
"confidence": "high",
"coverage": 0.25,
"entity": {
"distinct_artifacts": 3,
"distinct_tools": 3,
"layer": "agent"
},
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"label": "string",
"layer": "agent",
"metrics": {
"cost_tokens": 3,
"cost_tokens_uncached": 3,
"cost_usd": "string",
"duration_ms": 3,
"requirements": {
"business_value": 0.25,
"compliance": 0.25,
"economics": 0.25,
"security": 0.25
},
"session_duration_ms": 3,
"verdicts": {
"allow": 3,
"ask": 3,
"block": 3,
"optimize": 0,
"undecided": 3
}
},
"observations": 3,
"session_ids": [
"ses_01jbwa2k1vfrn9y42xhgxhmzj2"
],
"tier": "hot"
}
],
"totals": {
"baseline_events": 3,
"baseline_sessions": 3,
"events": 3,
"mean_run_cost_tokens": 0.25,
"sessions": 3,
"toolless_sessions": 3,
"unidentified_actions": 3
},
"window": {
"as_of": "2026-01-15T14:32:05Z",
"from": "2026-01-15T14:32:05Z",
"key": "string",
"to": "2026-01-15T14:32:05Z"
}
}