Skip to content

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"

../evidence-graph.md ยท ../components/Prompt_Model_Capture.md ยท Known_Agent_Flow.md ยท Receipt_Flow.md ยท ../components/SOC_Engine.md