Flow: Prompt-to-Action Lineage¶
Status: ๐ก partial โ trigger-side (trust-labeled ingest) โ decision โ approval โ receipt lineage is โ implemented; explicit prompt/model-call capture is ๐ Phase 7 (../components/Prompt_Model_Capture.md).
The question this flow answers: "show me the path from the thing that entered the agent's context to the action that executed โ with proof at every hop."
flowchart LR
P[Content enters<br/>POST /v1/ingest โ
<br/>trust label from channel] --> M[Model call ๐<br/>Phase 7 capture]
M --> TP[Tool proposal ๐<br/>proposal hash]
TP --> AH[action_hash โ
<br/>aegis-jcs-1]
AH --> DEC[Decision โ
<br/>Cedar + trust chain]
DEC --> APR[Approval โ
<br/>hash-bound, single-use]
APR --> EXE[Execution โ
<br/>SDK fail-closed]
EXE --> R[Receipt โ
<br/>chained, signed]
R --> TL[Incident timeline โ
<br/>evidence graph]
The hops, with code¶
| Hop | Mechanism | Status |
|---|---|---|
| Content โ trust label | POST /v1/ingest labels by channel (GitHub issue = untrusted_external, โฆ); HMAC-verified webhooks |
โ
src/src/routes/mod.rs |
| Label โ downstream actions | trust_chain::propagate โ most restrictive upstream label wins; tighten-only |
โ
lib/policy/src/trust_chain.rs |
| Prompt โ model call โ tool proposal | first-class captured events with proposal hashes | ๐ Phase 7 |
Proposal โ action_hash |
SDK canonicalization at the tool boundary (today the lineage starts here for the action side) | โ
SDK canon |
action_hash โ decision |
authorize path, decision row keyed to run_id/trace_id |
โ
lib/decision + thin routes/authorize.rs |
| Decision โ approval | approval bound to the same hash | โ
routes/approval.rs |
| Approval โ execution | single-use consume + SDK hash re-check | โ |
| Execution โ receipt | chained receipt carrying action_hash, source_trust, run_id, trace_id, approver |
โ
compute_receipt_hash |
| Receipt โ timeline | GET /v1/runs/:id/timeline, GET /v1/graph/run/:run_id link ingested content, decisions, approvals, receipts, alerts |
โ
src/src/graph.rs |
What the run_id/trace_id spine gives you today¶
Because the SDK sends run_id and trace_id with authorize calls, and receipts + SOC events carry them, an analyst can already walk: ingested GitHub issue (labeled) โ denied decision for the same run โ deny-storm alert โ incident narrative. What's missing until Phase 7 is the interior of the agent: which model call, given which prompt tokens, produced the proposal. W3C traceparent propagation (#1156) additionally stitches SDK โ gateway spans in your tracing backend.
Example investigation¶
curl -s $AEGIS/v1/graph/run/$RUN_ID -H "Authorization: Bearer $TOKEN" | jq
curl -s $AEGIS/v1/runs/$RUN_ID/timeline -H "Authorization: Bearer $TOKEN" | jq
curl -s $AEGIS/v1/incidents/$INC_ID/narrate -H "Authorization: Bearer $TOKEN"
Related docs¶
../evidence-graph.md ยท ../components/Prompt_Model_Capture.md ยท Known_Agent_Flow.md ยท Receipt_Flow.md ยท ../components/SOC_Engine.md