Tools · Recohut Kit
Recohut Kit
Small independent Python components for models, tools, state, retrieval, guardrails, evaluation and serving, organised into twelve layers.

Recohut Kit is a Python library of small components that you use one at a time. Each component has an explicit constructor, a small contract and a native handle to the SDK underneath it. The kit does not ask you to adopt a framework: you import the one owner you need, such as a SQLite store, a provider client or a tool policy, and leave the rest alone.
Recohut Kit is Recohut's own engineering toolkit. It is not published as a public package; we use it to build the systems we deliver. These pages describe how it is designed.
This page is the front door. It covers what the kit is, how to install it, a first example you can run, and a map of the twelve layers that organise every package.
What the kit is
Think of Recohut Kit as a collection of parts for an AI application, rather than the application itself. Choose the part that owns the problem you have — model calls, evidence, permissions, state or evaluation — then compose it with the rest of your system.
- Python 3.12 or later. The package metadata declares
requires-python = ">=3.12". - Optional dependencies by capability. The base install declares no dependencies. Install the extras needed by the modules you use. Some modules load those dependencies when imported or when their store is constructed.
- Independent components. Packages do not form one framework. You can use
recohut_kit.redactionwithout ever importingrecohut_kit.harness. - Native handles stay reachable. Backends expose the underlying client through
unwrap(), and native options, filters and scores keep their native meanings.
The current Kit checkout includes separate Python extensions for PydanticAI, Strands and Databricks. Extension packages shows the available distributions and install paths.
Install
Use Python 3.12 or later and an authorized checkout at the documented Kit revision. Run the install from that checkout in your active Python environment.
uv pip install .For an optional backend, select its extras from the same checkout. For example, uv pip install '.[postgres,sqlalchemy,alembic]' installs PostgreSQL, SQLAlchemy and Alembic support.
Start in five minutes
The core includes a bound SQLite transaction. This example needs no extra and no network:
from recohut_kit.storage.sqlite import SQLiteDatabase
store = SQLiteDatabase(":memory:")
with store.connect(), store.transaction():
store.execute("CREATE TABLE notes (text TEXT)").close()
store.execute("INSERT INTO notes VALUES (?)", ("hello",)).close()
print(store.fetch_one("SELECT text FROM notes"))The output is {'text': 'hello'}. Three habits from this example apply across the kit:
- Keep SQL parameters separate from SQL text.
- Close cursors returned by
execute().fetch_one()andfetch_all()close them for you. - Every backend implements a small category contract and exposes its native handle through
unwrap().
Recent additions
- Progressive disclosure lets a host expose compact results first and retrieve more detail under its policy and evidence budget. See Context and memory.
- Deterministic review gates record which checks passed, blocked the result, or need human review. See Evaluation.
- Native Word body reading can return table-cell text alongside paragraphs with explicit input and output bounds. See Document readers.
The twelve layers
Every package belongs to exactly one layer. The layer says what job the package does in an agent system, and the golden path names one canonical owner per layer. Start from the layer you need, not from the package list.
| Layer | Meaning | Page |
|---|---|---|
model_route | Model and provider clients, auth, structured output | Model route |
agent_loop | A loop in which a model chooses the next tool or step | Agent loop |
tools_permissions | Tool contracts, execution, ledgers, approvals, permission policy | Tools and permissions |
harness_state | Task and session state, scope binding, conversations, persistence used by agents | Harness and state |
context_memory | Retrieval, grounding, memory and knowledge stores used to build model context | Context and memory |
guardrails | Input and output screening, redaction, policy enforcement | Guardrails |
evaluation | Graders, suites, ledgers, gates, red-team | Evaluation |
observability | Tracing, usage, latency, telemetry | Observability |
serving | HTTP and runtime contracts, channels, UI adapters | Serving |
data_platform | Storage engines, warehouses, pipelines, lakehouse, ingestion | Data platform |
domain_capability | A business-domain capability such as booking, marketing, payments or voice | Domain capability |
utility | JSON, files and small shared helpers | Utility |
How the layers stack in an agent system
A request enters through serving, passes guardrails, and reaches a governed run. Inside the run, the model loop chooses tools, and every layer below supplies one concern. Evaluation and observability sit beside the run and read what it records.
domain_capability and data_platform are the layers that touch the outside world: the business operation a tool performs and the store a retrieval reads. utility is shared plumbing and carries no policy.
Tiers
Every package has one tier. The tier tells you how far to trust it as a starting point.
| Tier | Rule |
|---|---|
core | The canonical owner of a layer on the golden path |
supported | Imported by at least one project outside the kit, but not core |
catalog | No external consumer. A capability kept, documented and labelled |
labs | Experimental |
deprecated_shim | Only re-exports another path. Retained through 0.7.x and removed in 0.8.0 |
Find a capability
The kit has more than two hundred top-level owners. Search them with the command line or from Python:
recohut-kit capabilities approval
recohut-kit capabilities --owner harness --jsonfrom recohut_kit import capability_index
hits = capability_index.search("approval")
print([hit["owner"] for hit in hits][:3])
print(capability_index.get("harness")["import_path"])Capability index explains every output field.
Use from another project
A project depends on the bare package and declares its own SDK versions. The kit's extras exist for the kit's own checks and are a convenience, not a requirement.
[project]
dependencies = ["recohut-kit>=0.6.1,<0.8"]
[tool.uv.sources]
recohut-kit = { path = "../recohut-kit" } # adjust the relative pathAfter the kit changes without a version bump, run uv sync --reinstall-package recohut-kit in the consuming project.
Where proof lives
The index, the tiers and the layer pages describe what the code is and where it sits. They are not stability ratings. Notebook sets and verification ledgers in the kit repository hold the evidence for what has been run.
Where to go next
How is this page?
Last updated on