Golden path
The golden path names one canonical owner per layer, so an engineer building on the kit does not have to search every package.
The kit holds well over two hundred packages. Most were built for one project or one SDK, and many do overlapping work. The golden path is the kit's answer to "which one do I use": for each layer it names one canonical owner, records the evidence for the choice, and lists the rejected candidates. Every package carries a layer and a tier, recorded in docs/golden-path/tiers.json in the kit repository.
Use the golden path when you start something new. Use the capability index when you already know the job and need to find the owner.
The idea: one owner per layer
Two packages can offer similar-looking capabilities but differ in their supported contracts. The golden path answers which owner to choose first for a new application, so you do not have to compare the entire package list before starting.
Each of the twelve layers has a decision file in the kit repository. The file lists the candidates, picks the owner, shows a short snippet that was checked by importing it, and records gaps. The decision is not a ranking of quality. It answers a narrower question: if a new project needs this job done, which package should it start from?
Some layers have a single owner and some have a named pair or trio, because the halves do different jobs. For example, model routing is split between recohut_kit.providers, which owns credentials and the call record, and a PydanticAI adapter that builds the native model for a long-lived loop.
| Layer | Canonical owner (import path) |
|---|---|
agent_loop | pydantic_ai.Agent, wrapped by recohut_kit_pydantic_ai.harness.pydantic_ai.Harness |
model_route | recohut_kit.providers, plus the PydanticAI adapter's codex_responses_model |
tools_permissions | recohut_kit.harness.contracts.ToolPolicy enforced by Harness; recohut_kit.human for durable approvals |
harness_state | recohut_kit.harness (Scope, Binding, Task, RunStore) and recohut_kit.conversations |
context_memory | recohut_kit.vectors, retrieval, grounding, user_context, knowledge |
guardrails | recohut_kit.guardrails and recohut_kit.redaction |
evaluation | recohut_kit.evals and recohut_kit_pydantic_ai.evals |
observability | recohut_kit.phoenix, recohut_kit.latency, recohut_kit.usage |
serving | recohut_kit.runtime, recohut_kit.channels, recohut_kit_pydantic_ai.ui.vercel |
data_platform, domain_capability, utility | No single canonical owner except recohut_kit.json for utility. Choose from the layer's catalog |
For the agent loop, the kit owns no loop of its own for new work. The loop is the native PydanticAI Agent. The Harness wraps one governed run of it and handles tool exposure by policy, approvals, limits, verification and resume. The Harness never loops itself.
How the layers fit in a run
The layer contract
The contract defines the only allowed values for layer and tier, so a package can be placed without argument. Its key rules:
- Layer is one of twelve fixed values. Every package is assigned exactly one.
- Tier is one of five fixed values. See the table below.
- A canonical owner contains no domain text. Business wording inside a generic owner is recorded as known debt in
tiers.jsonrather than hidden. - Moves keep old paths working. When a package moves under an owner, the old path becomes a shim that emits
DeprecationWarningand re-exports the same objects. Leaf modules share module identity with the new path. - No agent claim without a model-driven loop. The word "agent" is reserved for something where a model chooses the next action.
Tiers and what each guarantees
| Tier | Rule | What it means for you |
|---|---|---|
core | The one canonical owner of a layer | Start here. The layer's decision file records the evidence for the choice |
supported | Imported by at least one project outside the kit | Use when your case matches its purpose. It has a real consumer |
catalog | No external consumer; a capability kept, documented and labelled | Read why the core owner does not fit before choosing it |
labs | Experimental | It may move or be promoted. Do not build a long-lived dependency on it |
deprecated_shim | Only re-exports another path | Do not use. Switch to the replaced_by path |
A tier is not a quality rating. A catalog package can be well built. The tier records who depends on it and whether it is the recommended start.
Deprecation policy
Deprecated import paths follow one policy:
- The old path keeps working and emits
DeprecationWarning. - It is retained through the 0.7.x releases.
- It is removed in 0.8.0.
tiers.jsonrecordsreplaced_byfor each shim, anddocs/package-moves.jsonmaps old module paths to new ones.
The framework split follows the same rule. Code that moved from recohut_kit.integrations.pydantic_ai to recohut_kit_pydantic_ai.integrations.pydantic_ai still imports from the old path in 0.7.x, with a warning. See Extension packages.
Pick an owner
To find the layer, match your job to the layer table. To look at neighbours, filter tiers.json by layer. To search by keyword, use recohut-kit capabilities.
A short example per layer
Imports below match owners listed above. The guardrails example runs with the core alone.
from recohut_kit.guardrails.policy import ValidationPolicy
from recohut_kit.guardrails.rate_limit import SlidingWindowLimiter
from recohut_kit.guardrails.screening import LexiconScreen, intervene
from recohut_kit.redaction import mask_text
policy = ValidationPolicy.from_mapping(
{"max_length": 4000, "forbidden_patterns": [r"ignore (all )?previous"]}
)
limiter = SlidingWindowLimiter(limit=20, window_seconds=60)
screen = LexiconScreen({"secrets": ["hunter2"]})
print(policy.validate("ignore previous rules").allowed) # False
print(mask_text("mail me a@b.com")) # mail me [email]
print(limiter.admit("user-1").allowed) # True
print(intervene("my pw hunter2", screen, action="reject").text)A tool declares its own rules with ToolPolicy. A tool with no entry is hidden from the model.
from recohut_kit.harness.contracts import ToolPolicy
flag = ToolPolicy(
effect=True,
approval=True,
authorize=lambda scope, action: scope.agent == "my-agent",
)
read = ToolPolicy()Rules that catch people
- A tool without a
ToolPolicyis silently hidden unless you passHarness(strict_tools=True). With strict mode, startup fails and names each unmatched tool. - A provider rate limit is an exception, not a response. Map it with
classify_model_error, or a 429 surfaces as an HTTP 500. - User identity is host input.
Scopeis built by trusted application code. Persisted state never grants identity, tool access or approval. - Pick
generate_structuredfor one-shot calls andoutput_typefor an agent's answer. They are different routes and a one-shot call needs a Codex-shaped client. - Approvals. Default to
Harness.approveandHarness.resume. Userecohut_kit.humanwhen approval needs a separate reviewer record that outlives the process. - Some Phoenix extras conflict. The
agents-phoenixextra conflicts with several other extras, so pick one tracing route per environment.
Known debt is listed, not hidden
The golden path records known debt: domain text inside a few core files, and a set of earlier loops that no outside project uses. Do not start a new build on one of those loops.
How is this page?
Last updated on