ctxforge — compile raw knowledge into agent-ready context
The context-layer fix. Instead of wiring raw documents straight into an agent's context window (slow, noisy, pattern-matched guesswork), ctxforge compiles a source directory into a structured wiki: per-document summaries, keyword lists, TF-IDF concept clusters with backlinks, a health-check linter, and a small search engine an agent can query over a CLI.
Why
- Context is the bottleneck, not the model. Karpathy: "a large fraction of my recent token throughput goes into manipulating knowledge" — raw sources compiled into a wiki with summaries, backlinks, and concept articles, queried through a CLI.
- Vector retrieval breaks on vocabulary mismatch ("why did the deploy fail"
vs
get_pipeline_run_logs). TF-IDF keyword retrieval over compiled summaries keeps agents on-target without an embedding service or vector DB. - Health checks catch decay: stale sources, missing summaries, orphan docs — the wiki is treated as a product with an update cadence, not a setup step.
Usage
./ctxforge compile ~/notes -o ~/wiki # build wiki (extractive, $0, offline)
./ctxforge compile ~/notes -o ~/wiki --llm # LLM-enriched summaries (optional)
./ctxforge search ~/wiki "reservoir pressure decline" # ranked results
./ctxforge health ~/wiki # stale / orphan / missing-summary lint
CTXFORGE_AGENT_JSON=1 ./ctxforge search ~/wiki "deploy failed" # JSON for agents
LLM enrichment is optional and model-agnostic (any OpenAI-compatible endpoint):
export OLLAMA_URL=http://localhost:11434/v1/chat/completions # local
export CTXFORGE_LLM_URL=https://api.openai.com/v1/chat/completions
export CTXFORGE_LLM_KEY=sk-...
export CTXFORGE_LLM_MODEL=llama3.1
Output
wiki/
index.json # machine-readable: docs, summaries, keywords, concepts, idf
docs/<slug>.md # one per source: summary + keywords + backlinks
concepts/concept-N.md # TF-IDF clusters with defining terms + source links
Search returns ranked paths + summaries; with CTXFORGE_AGENT_JSON=1 it emits
a single JSON line an agent can consume directly.
Metadata
Release files for ctxforge-ai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ctxforge_ai-0.1.0.tar.gz | 7.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ctxforge_ai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.9 kB
Release files / ctxforge_ai-0.1.0.tar.gz
| Download URL | ctxforge_ai-0.1.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d942deb1482f407f83c3681c35534d4fe572f143ed9acb09c31358f2aca8d206
|
|
BLAKE2b-256 checksum How to use checksums |
8249ce45ad50ceed34b0edeb81ee7174300873443d28026761c605f56320f768
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / ctxforge_ai-0.1.0-py3-none-any.whl
| Download URL | ctxforge_ai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e2815ee11814b08570ffa498846a66e1c9cf7ed964659fcda7546cb003ce531
|
|
BLAKE2b-256 checksum How to use checksums |
d10b4071501d4d25202ad8139341534a8d42d206f6a2dc6f5f69f1e51029307b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for ctxforge-ai 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.