RFC-010: Autonomous Intelligence Governance Protocol (AIGP) — 11. Interaction Record (Telemetry)
AIGP Specification › RFC-010: Autonomous Intelligence Governance Protocol (AIGP) › 11. Interaction Record (Telemetry)
← 10. Gandalf Integration · Section index · 12. OpenAPI Contract →
11. Interaction Record (Telemetry)
@dataclassclass GandalfInteractionRecord: interaction_id: str timestamp: str user_ref: str # email or hash depending on consent consent_level: str # NONE | ANONYMOUS | REDACTED | FULL
prompt: dict # {prompt_id, prompt_version, model_id} input: dict # {input_hash, raw_stored: bool} knowledge_base: dict # {kb_id, top_score, avg_score, kb_version} brew: dict # {confidence, issues: []} dryrun: dict # {atomicity, safety, recommendation, blast_radius} outcome: dict # {executed, success, steps_total, steps_succeeded}
def to_aigp_record(self) -> dict: """Format as AIGP-compatible record for governance-server.""" return { "protocol_version": "2.0", "message_type": "RECORD", "app_id": "APP_PRJ", "use_case": "gandalf_spell_execution", "aigp_mode": self.AIGP_MODE, "gandalf_metadata": { "brew_confidence": self.brew.get("confidence", 0), "dryrun_recommendation": self.dryrun.get("recommendation", ""), "atomicity": self.dryrun.get("atomicity", ""), "steps_total": self.outcome.get("steps_total", 0), "steps_succeeded": self.outcome.get("steps_succeeded", 0), }, }← 10. Gandalf Integration · Section index · 12. OpenAPI Contract →