# Cendor > Production plumbing for LLM applications: seven small, composable libraries for the layer beneath your agent framework — context, cost, guardrails, testing, and audit — in Python (`cendor.*` on PyPI) and TypeScript/JavaScript (`@cendor/*` on npm). Local-first, no server, Apache-2.0. "Honest claims" is the brand: every number on this site is benchmark-backed and regenerates offline. Wrap your client once with `instrument()` and everything else plugs in. Budgets, recording, and audit subscribe to one shared event bus — none monkey-patches your client, none imports another, so adding a library is free at the call site. Each library works alone and pulls only `cendor-core`. Python 3.11+. Six providers (OpenAI Chat + Responses, Anthropic, Hugging Face, Bedrock, Gemini, Ollama) plus OpenTelemetry ingest. Current published versions are listed at https://cendor.ai/releases. Install: `pip install cendor-libs` or `npm i @cendor/libs` (ESM-only, Node LTS + edge). Cross-language artifacts are byte-for-byte interoperable — a cassette recorded in Python replays in TypeScript, an audit chain written in TypeScript verifies in Python; the feature split is documented on the parity page (https://cendor.ai/docs/languages). ## Libraries - [contextkit](https://cendor.ai/libraries/contextkit/): Pack prioritized blocks into a token budget, evict by rule, and get a deterministic receipt of what was kept, shrunk, or dropped. - [squeeze](https://cendor.ai/libraries/squeeze/): Content-aware, deterministic compression for JSON, logs, code, and prose — no LLM, no network — and every original restores byte-for-byte. - [tokenguard](https://cendor.ai/libraries/tokenguard/): Block or downgrade an over-budget call before it runs (pre-flight), plus per-feature and per-user cost attribution for free. A decorator, not a proxy. - [guardrails](https://cendor.ai/libraries/guardrails/): A deterministic gate at four stages (input, tool call, tool output, output) — keyword/regex/URL/length/JSON-schema checks that block, redact, or flag before the model or a tool runs. Microseconds, offline, $0; every decision emits on the bus and acttrace chains it as tamper-evident evidence. Deterministic checks do not stop novel adversarial attacks; PII/secret detection lives in acttrace. - [cassette](https://cendor.ai/libraries/cassette/): Record a whole agent run once — LLM and tool calls — then replay it offline, deterministically, with no API key. - [acttrace](https://cendor.ai/libraries/acttrace/): Offline detection engine (~20 validator-gated categories of secrets, PII, financial, government-ID, and GDPR special-category data) + a Policy that maps each to allow/flag/redact/block, with presets (default/gdpr/pci/strict); enforce it before send with guard() (block or redact-before-send via core's Reroute(messages=)). Plus a tamper-evident, hash-chained, offline-verifiable decision log and compliance evidence packs (EU AI Act, ISO 42001, GDPR, NIST AI RMF). Produces evidence to support compliance, never a guarantee. - [core](https://cendor.ai/libraries/core/): The instrument() seam, the event bus, token counting, offline Decimal prices, and the protocols the tools interlock through — by shape, never by import. ## SDK `pip install cendor-sdk` (Python) or `npm i @cendor/sdk` (TypeScript) — a governed, provider-agnostic agent SDK; imports as `cendor.sdk` / `@cendor/sdk` (same flat namespace). Cost budgets, tamper-evident audit, PII redaction, and record/replay testing are the foundation, not plugins — a governed agent in ~10 lines across 10 provider paths (OpenAI Chat Completions, OpenAI Responses, Anthropic, Gemini, Bedrock, Ollama, Hugging Face, Azure AI Foundry Chat, Azure AI Foundry Responses, Foundry Local; TypeScript ships OpenAI + Anthropic first). Built on the seven libraries; drop down to them at any time. - [SDK](https://cendor.ai/sdk): The governed agent SDK — overview, governance foundation, provider matrix, install. - [SDK docs](https://cendor.ai/docs/sdk): Getting started, agents & the loop, governance, memory, RAG, multi-agent, providers, interop, hardening, eval, FAQ. - [Languages & parity](https://cendor.ai/docs/languages): Python ↔ TypeScript — what's ported, what's Python-only, cross-language interop guarantees. ## Resources - [Documentation](https://docs.cendor.ai): Full docs — start guides, per-library reference, integration guides. - [MCP server](https://cendor.ai/mcp): Connect an agent-mode AI assistant to Cendor's live docs over the Model Context Protocol — remote endpoint `https://mcp.cendor.ai`, or local `npx @cendor/mcp` / `uvx cendor-mcp` (read-only, pull-based, offline). Tools: search_docs, get_page, get_api, example, list_recipes. - [init CLI](https://cendor.ai/docs/assistant-init): `npx @cendor/init` (Node) / `uvx cendor-init` (Python) — one command that writes the assistant rules files, can add the MCP config (`--mcp`), and scaffolds a correct `instrument()` call (`--scaffold`). Offline, no key; ships a `doctor` that static-checks wiring for CI. No library depends on it. - [Cookbook](https://cendor.ai/cookbook/): Copy-paste recipes that run offline (recorded with cassette, no API key). - [Benchmarks](https://cendor.ai/benchmarks/): Reproducible offline measurements with caveats stated as part of the result. - [Compare](https://cendor.ai/compare/): Honest comparisons vs LiteLLM, vcrpy/pytest-recording, LLMLingua, and Langfuse/Helicone/LangSmith — with "use both" where true. - [GitHub](https://github.com/cendorhq/cendor-libs): Source, issues, releases. ## Measured, not promised - 0% token-count error vs the real tokenizer (OpenAI, exact by default — tiktoken ships with core). - 97% smaller logs on repetitive input — compressed reversibly, restored byte-for-byte. - ~12 µs instrument() overhead per call (bus emit, usage extraction, Decimal pricing). - 1 edited byte breaks the audit chain — verify() fails. Reproduce every figure with no network and no API keys: `uv run python benchmarks/run_all.py`. Costs are labeled reported vs estimated in exact Decimal; token counts report which method produced them; acttrace produces evidence to support compliance, never a guarantee. ## See also - [Full documentation, one file](https://cendor.ai/llms-full.txt): Every docs page (libraries + SDK) concatenated for AI assistants — the machine-readable companion to this curated index. - [For AI assistants](https://cendor.ai/docs/for-ai-assistants): The call-shape trap sheet + CI-typechecked examples. The paste-in rules files (Copilot / Cursor / AGENTS.md / Claude Code / Windsurf) live at [/docs/assistant-rules](https://cendor.ai/docs/assistant-rules); the MCP server at [/docs/assistant-mcp](https://cendor.ai/docs/assistant-mcp); the one-command setup at [/docs/assistant-init](https://cendor.ai/docs/assistant-init).