Fit your budget
Set a token limit for the selected context, including citations. Reserve space separately for your prompt and model response.
CIGAR · v0.10.0 beta 1
CIGAR selects relevant information from your documents and code, keeps source citations, and fits it into the context budget you set.
Open source · Rust-powered · Apache-2.0
Add your sources
Pass in the documents or code your agent needs.
Set a question and budget
CIGAR selects relevant information that fits.
Use the cited context
Send the result to your model with its source references.
WHY CIGAR
Set a token limit for the selected context, including citations. Reserve space separately for your prompt and model response.
Trace selected information back to its document or code. Inspect what your agent receives before it calls the model.
Replace a source as it changes. The local graph updates its index without rebuilding everything.
TRY V0.10.0 BETA 1
The new Python and TypeScript SDKs run the same Rust context graph locally. No server or API key needed.
Beta for Apple-silicon Macs (macOS ARM64). For evaluation; not yet production-ready.
Python 3.14
python3.14 -m pip install 'hol-cigar==0.10.0b1'from cigar_sdk import LocalContextGraph
with LocalContextGraph("website-example") as graph:
graph.replace_source("docs/retry.md", [
{
"id": "retry",
"source": "docs/retry.md",
"text": "Retry only idempotent operations.",
}
])
result = graph.compile({
"query": "idempotent retry",
"max_tokens": 512,
"reserve_tokens": 64,
})
assert graph.verify(result["snapshot"]) == result
assert result["snapshot"]["stats"]["rendered_tokens"] <= 448
print(result["rendered"])Run: python3.14 local-context.py
Node 24.10–24.x · ESM
npm install '@hol-org/[email protected]'import { LocalContextGraph } from "@hol-org/cigar/context";
const graph = await LocalContextGraph.create("website-example");
try {
await graph.replaceSource("docs/retry.md", [
{
id: "retry",
source: "docs/retry.md",
text: "Retry only idempotent operations.",
},
]);
const result = await graph.compile({
query: "idempotent retry",
max_tokens: 512,
reserve_tokens: 64,
});
await graph.verify(result.snapshot);
if (result.snapshot.stats.rendered_tokens > 448) {
throw new Error("Context exceeded its budget");
}
console.log(result.rendered);
} finally {
await graph.close();
}Run: node local-context.mjs
Your app chooses the sources and calls the model. CIGAR prepares the context. Release notes and platform details
CIGAR RELEASES
See what changed in each version, check compatibility, and find the packages and release notes.