Provenance Tracing Skill (Taishige)
Usage
- Called by each government office at key operation nodes (or pushed asynchronously via the event bus), writing into the evidence chain.
- Provides retrieval interfaces by
trace_id / time window / government office dimension, supporting the audit panel and rollback localization.
Input
event: operation event, including actor(government office name),action、target、timestamp、trace_id
payload: (optional) structured artifact reference associated with the event
Output
evidence_chain: traceable evidence chain linked by trace_id
vector_index: vector index entries for semantic retrieval
query_api: interface description for retrieving historical evidence by condition
Dependencies
- Qdrant (vector storage, accessed via MCP)
- SQLite (structured event persistence, local fallback)
- Event reporting protocol of each government office (unified schema)
Failure Handling
- Vector database write failure → cache the event locally in SQLite, asynchronously backfill after recovery, without blocking the main flow.
- Single event schema invalid → record and discard that entry, without affecting the writing of the whole chain.
- Retrieval timeout → return the most recent successful snapshot and annotate
stale。
Reuse Value
- Observability foundation: any multi-Agent system can directly mount it and gain out-of-the-box auditing and replay capabilities.
- Review fit: a natural scoring point for the "Engineering Implementation and Operational Validation and Security Auditing (20%)" dimension of the Agent Infra track.
Runnable package execution (runnable package)
- Real entry point:
scripts/run_provenance.py
- Execution is equivalent to
core.runtime.AgentSession.run_stage("provenance"), calling memory.taishige.TaiShiGeAgent.writeback(flowing back the full-link events and four-color cards into the evidence chain, pure Python and offline-capable).
- Run:
python skills/provenance/scripts/run_provenance.py
- Artifacts:
examples/snse_survey/provenance/(trace.jsonl + trace_summary.json, containing every Junjichu dispatch and government office execution event).