CIGAR: A Governed Context Runtime for AI Agents
Developer preview is now available on GitHub and PyPI as hol-cigar
AI agents are often explained through their visible behavior: a model receives a prompt, retrieves information, calls a tool, and produces a response.
The harder engineering happens beneath that interface.
- Which sources was the agent allowed to use?
- Which versions did it receive? Why was one source selected while another was excluded?
- What permissions were passed to another agent?
- Was an external action recorded before it was attempted?
- Can the system later reconstruct the evidence and policy environment behind a decision?
These are runtime problems.

CIGAR (Context Intelligence Graph Agentic Runtime) is an open-source project from HOL designed to make context selection, authorization, delegation, external actions, and evidence part of the system contract.
The Honey release is now available as a developer preview in the hol-cigar GitHub repository and as the hol-cigar package on PyPI.
pip install hol-cigar
CIGAR is not a new language model. It is not an agent planner or a visual workflow builder.
It is a governed context-and-evidence runtime for building agent systems that need to know not only what information was used, but also where it came from, whether it was authorized, and how it influenced execution.
CIGAR treats context as a compiled, governed artifact rather than an invisible side effect of prompting.
Why CIGAR exists
Most agent systems begin with a transcript.
As the system works, that transcript accumulates user messages, retrieved documents, tool output, instructions, summaries, memories, and generated files. Eventually something has to decide what remains inside the model’s limited context window.
In many systems the retrieval logic, prompt templates, and/or application code are hidden and not tracked. This can create recurring problems.
A retrieved document may be stale or superseded. A fact may be separated from its source version. Trusted instructions and untrusted content may be placed into the same prompt without a durable distinction between them.
Authorization is also frequently treated as a one-time check. A user may be permitted to fetch a source, but that does not automatically mean the source should be cached, transformed, delegated to another agent, replayed later, or used to authorize an external action.
Multi-agent systems are another challenge that will need protocols like this as more agents start messaging each other across systems. Agents often hand work to each other by forwarding prose or entire transcripts. That makes it difficult to determine what was actually delegated, what capabilities were transferred, and what evidence supports the returned result.
Tool calls introduce operational risk as well. If an agent sends an external request before its intent and authorization are recorded, a timeout can leave the system uncertain about whether the action completed. Retrying blindly could duplicate a payment, message, deployment, or state change.
CIGAR’s goal is to move these concerns out of informal prompt conventions and into explicit runtime protocols.
The central idea: compile context
CIGAR treats context as a compiled, content-addressed artifact.
Instead of continuously appending text to a prompt, the runtime moves information through a series of explicit stages.
Source material is first captured as an immutable snapshot. It is then converted into typed records with provenance, lifecycle information, and relationships to other records.
A caller submits a structured context contract describing what the agent needs, including:
- The purpose of the request
- Required and optional information
- Relevant projects or source groups
- Trust and time constraints
- The intended consumer
- The available context budget
Retrieval operates only over authorized material.
The compiler then reconciles versions, conflicts, source authority, verification state, and supersession relationships before selecting what should enter the final context.
The output includes two important artifacts:
- A ContextBundle contains the information delivered to the model or agent.
- A SelectionManifest records what was considered, what was selected, what was excluded, which transformations were applied, and what could invalidate the result.
This changes context from an opaque string into a system that can be inspected, compared, cached, and replayed.
How Honey CIGAR (0.9.1) currently works
The Honey codebase is implemented as a Rust workspace with separate layers for protocol behavior, context processing, agent coordination, external effects, persistence, and product-facing interfaces.
The dependency structure is intentional with core semantic behavior kept separate from a particular daemon, provider, command-line interface, network transport, etc.
That allows embedded applications and local services / future shared-service deployments to agree on important behavior such as:
- Record identities
- Canonical representations
- Content digests
- Policy ordering
- State transitions
- Compatibility rules
- Stable error behavior
The current context path can be understood as five stages.
1. Ingest immutable source state
Filesystem and Git sources are identified by an exact root and revision.
Parsers and atomizers turn that material into typed records such as claims, symbols, instructions, decisions, task state, and evidence. Those records retain information about where they came from and when they were observed. Sensitive-content and secret checks occur before the material becomes generally available for retrieval.
Publication is atomic: consumers see either the previous complete snapshot or the new complete snapshot, not a partially updated mixture.
2. Apply a context contract
The caller defines the purpose, constraints, required evidence, target consumer, and available budget.
Policy evaluation occurs before retrieval and again at later boundaries. Material that is denied should not become visible indirectly through previews, counts, cache behavior, or explanation output.
3. Retrieve, reconcile, and pack
Approved retrievers generate candidates from authorized partitions.
The compiler reconciles conflicting and overlapping records using explicit source authority, validity time, observation time, verification status, and supersession rules.
Contradictions remain visible as typed conflicts. They are not silently compressed into a single statement.
The compiler then selects representations under an exact budget. Required dependencies and categories are packed first, followed by optional material based on remaining utility.
4. Materialize for the consumer
The semantic bundle is rendered into an approved format for a particular model or agent runtime.
The materializer cannot silently remove required semantic blocks, merge conflicting authority lanes, or truncate content simply to make the prompt fit.
Tokenizer and materializer identities become part of the evidence record, helping operators distinguish context drift from model-output variance.
5. Capture the decision environment
CIGAR can bind together the task, context contract, selection manifest, bundle, policies, component versions, observations, output references, verification receipts, and external effects.
The goal is not to record private chain of thought.
The goal is to preserve the observable environment around the decision.
Governed multi-agent handoffs
CIGAR also defines a more structured approach to agent delegation.
An agent works from an immutable base context with a private overlay containing proposed changes. It does not directly rewrite canonical history.
When work is delegated, the child agent receives a signed and scoped handoff capsule rather than a raw transcript.
The handoff can describe the recipient, task, acceptance criteria, relevant context, requested capabilities, budget, audience, and expiry.
Before the handoff is issued, requested permissions are intersected with the issuer’s actual authority. When the recipient accepts it, authorization begins again under the recipient’s current policy.
The child receives only the context and capabilities that remain permitted.
Its result returns as typed material: claims, evidence, decisions, alternatives, artifacts, uncertainty, blockers, and verification receipts. The parent can then review and merge that material rather than treating it as an automatic authoritative mutation.
This makes delegation an attenuation of authority, not an unrestricted transfer of state.
Intent-first external actions
CIGAR separates reading context from changing the outside world.
Before an external action is dispatched, Honey can record a durable effect intent containing its target, protected arguments, preconditions, expected result, originating decision, authorization, risk level, retry policy, idempotency identity, and possible compensation action.
The journal entry exists before the connector is called.
This is especially important when the result is ambiguous.
If the remote service may have completed the action but the response was lost, CIGAR does not treat the operation as a normal failure and immediately retry it. The effect enters an UNKNOWN state until the runtime can reconcile remote identity, idempotency information, expected postconditions, or audit evidence.
Effect transitions are append-only and hash-chained.
That provides a stronger record than a log entry stating that an agent called a tool.
What early testing showed
The Honey evaluation compared live CIGAR context construction with an existing local context compiler across 100 paired workflow trials.
CIGAR increased the context quality index from 94.81 to 98.21. Citation resolvability and required-source coverage both increased from 89% to 100%.
The cost was higher compilation latency. Mean context-construction time increased from 6.28 seconds to 17.66 seconds, while average source diversity declined. 50 GBs of context was used in this test.
A separate model-stage test examined what happened when a governed selection had already been prepared. Compared with a full raw corpus, the CIGAR-governed selection reduced mean model input by 85.1% and reduced median model latency by 53.5% without reducing exact-answer accuracy in that test suite.
The clearest evidence for CIGAR’s distinct value came from authority-conflict tasks. When identical selected text was provided with or without source-authority labels, the governed condition increased exact-answer accuracy from 46.9% to 80.2%.
This suggests a practical rule:
Use CIGAR when source authority, status, or provenance can change which evidence should govern the answer.
What Honey is today
Honey is a developer preview.
It demonstrates a working architecture for governed context compilation, typed agent handoffs, intent-first external effects, and replayable decision evidence.
It should not yet be treated as a universal replacement for a lightweight local retrieval path.
The most practical current deployment model is a routed approach:
- Use local context for low-risk, latency-sensitive, or exploratory work.
- Evaluate CIGAR in shadow mode alongside existing retrieval.
- Promote specific workflows when provenance, authority, or auditability justify the additional cost.
- Precompile and reuse governed context where possible.
- Keep external effects behind explicit policy and authorization boundaries.
CIGAR’s first purpose is not to make every prompt smaller or every model call faster. Its purpose is to make context selection and agent execution understandable, governable, and reconstructable.
A new layer for agent infrastructure
AI agents are becoming capable of handling larger bodies of information, coordinating with other agents, and taking actions in external systems.
As that capability grows, context cannot remain an invisible implementation detail. Agent systems need to know which information was eligible, which version was selected, what authority governed the choice, what was passed during delegation, and what was recorded before an external action occurred.
CIGAR Honey is an early implementation of that layer.
It provides a protocol-oriented foundation for turning context into an explicit artifact, authority into an enforceable boundary, and execution into a replayable evidence trail.
The project is now available for developers to install, inspect, test, and challenge.
pip install hol-cigar
GitHub: hashgraph-online/hol-cigar PyPI: hol-cigar Release status: Honey Developer Preview
Continue reading
All posts
HOL Guard 2.1: 51,000 Test Cases, HMAC-Backed Reconnect, and a New Command Classification Engine
HOL Guard 2.1 ships a 51,000-case command classification corpus, HMAC-backed dashboard reconnect, signed Codex hook manifests, DNS-pinned archive downloads, and a typed GitHub capability model — all open source, canary-tested on TestPyPI.

MCP Tool Poisoning: How the AI Agent Protocol Became a Supply Chain Attack Surface
The MCP protocol connects AI agents to over 10,000 tools. It also creates a new supply chain attack surface: poisoned tool descriptions that silently hijack agent behavior. Here's the data, the CVEs, and what to do.

Prompt Injection Defense in 2026: What Actually Works When Detection Is Impossible
OpenAI says perfect prompt injection detection is still unsolved. Three academic proofs show why it may never be possible. This is the defense-in-depth architecture that actually works in 2026.
