Use Jev
Connect a live decision model with the TypeSafe SDK.
Provider reference
Bring your own model and configure policies or failures.
Try it offline
This quickstart returns a fixed billing answer so you can test the wiring without credentials.1
Define the decision and routes
Keep the questions independent of the provider. Change
version when you change the question or answer space.lib/triage.py
2
Register an offline provider
Lifecycle creates the registry at application startup. The fixture is keyed by decision name and version.
lifecycle/decisions.py
3
Call it from an agent tool
Put this file in your agent’s The fixture returns
tools/ directory, then run harnest serve . and ask the agent to triage a ticket.tools/triage_ticket.py
{"action": "route", "route": "billing_agent"}. Replace the fixture with Jev or your own provider to classify real messages.Decide when to evaluate
A decision runs only when your code callscontext.decisions.evaluate(...). A graph can call it at a fixed step, or an LLM can choose a tool that calls it. Registering a provider does not start a background loop. The Jev example evaluates each incoming ticket before its LLM drafts a reply.
Control public output
Both settings leave the result available to your code and the LLM. This policy does not redact values copied into tool results, final responses, or LLM text. The quickstart tool above returns its route as tool output;
tool_activity controls that output separately. See Output policy for the lifecycle factory and transport behavior.
Choose what happens next
Outcomes are recommendations for your code to handle. They do not dispatch agents, execute tools, or bypass approvals. The example’s
0.8 threshold is illustrative; tune it against your provider and labeled examples.context.decisions inside the invocation that obtained it. For standalone code and tests, construct Decisions directly. See the provider reference for registration, batching, failures, and telemetry.