Skip to Content
Recodocs

Tools · Recohut Kit

Recohut Kit

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

Loft the mouse in welding goggles
5 min read

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.redaction without ever importing recohut_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.

install.sh
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:

first_store.py
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() and fetch_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.

LayerMeaningPage
model_routeModel and provider clients, auth, structured outputModel route
agent_loopA loop in which a model chooses the next tool or stepAgent loop
tools_permissionsTool contracts, execution, ledgers, approvals, permission policyTools and permissions
harness_stateTask and session state, scope binding, conversations, persistence used by agentsHarness and state
context_memoryRetrieval, grounding, memory and knowledge stores used to build model contextContext and memory
guardrailsInput and output screening, redaction, policy enforcementGuardrails
evaluationGraders, suites, ledgers, gates, red-teamEvaluation
observabilityTracing, usage, latency, telemetryObservability
servingHTTP and runtime contracts, channels, UI adaptersServing
data_platformStorage engines, warehouses, pipelines, lakehouse, ingestionData platform
domain_capabilityA business-domain capability such as booking, marketing, payments or voiceDomain capability
utilityJSON, files and small shared helpersUtility

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.

TierRule
coreThe canonical owner of a layer on the golden path
supportedImported by at least one project outside the kit, but not core
catalogNo external consumer. A capability kept, documented and labelled
labsExperimental
deprecated_shimOnly 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:

terminal
recohut-kit capabilities approval
recohut-kit capabilities --owner harness --json
search.py
from 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.

pyproject.toml
[project]
dependencies = ["recohut-kit>=0.6.1,<0.8"]

[tool.uv.sources]
recohut-kit = { path = "../recohut-kit" }   # adjust the relative path

After 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