Concept · Recipes
Plans named for the legal work they do.
A recipe is a JSON file describing a multi-step plan: an instruction, an expected output schema, optional examples, and an optional grader against a fixture set. The agent reads the matching recipe at session start and uses it as a prior plan when the user's request lines up. The ones shipped with KAOS today have names that map to real work — corpus question-answering, EDGAR research, contract clause extraction, share-purchase deal points, lease and limited-partnership-agreement review, court-opinion analysis, privilege classification.
Why the names matter
A platform that ships recipes named extract, summarize, compare is a chatbot framework. A platform that ships recipes named merger-agreement, spa-deal-points, privilege-classification is shaped for the work the audience already does. The recipes shipped with KAOS lean into that — each name on this page is a real legal task with a documented recall floor against a fixture set.
Recipes are not magic. The agent reads them as plan examples and uses them to structure its own plan when the request matches. The shipped recipes live in the source tree, you can modify them, fork them, or write your own — no platform vendor sits in the loop.
Pick the recipe by the work
Each leaf is a recipe shipped in the agents package, in kaos-agents/kaos_agents/recipes/. Click through to the page where the recipe is exercised in a worked example.
A recipe is a JSON file
A recipe is a structured JSON object — an instruction, a Pydantic-validated schema describing the expected output, optional examples, and an optional grader that checks recall against a fixture set. The agent loads the matching recipe into its plan-examples memory section and uses it as a prior plan when the user's intent lines up.
Extraction recipes ship with documented recall floors. The shape is the one legal extraction actually needs: a top-level extraction request, a nested schema, and a per-field hint that flags which fields must be quoted from the source. The runtime enforces the hint through the typed cited-output wrapper — a field marked verbatim refuses to render unless the model returned source spans for it.
What it looks like in code
from kaos_agents import Agent, AgentPattern, Runner
agent = Agent( instructions="You are a deal-room researcher.", pattern=AgentPattern.RESEARCH, tools=("kaos-source-*", "kaos-pdf-*", "kaos-citations-*"), model="anthropic:claude-haiku-4-5",)runner = Runner(agent, runtime=runtime)
# This question matches the corpus-qa recipe; the agent loads it# as a prior plan and uses it to structure its own search.async for event in runner.run( "What's the change-of-control trigger across these 12 contracts?", session_id="deal-1",): print(event)Read next
The agentic page covers the runner that loads recipes. The memory concept shows where the loaded recipe lives — the plan-examples section — and the other typed sections that surround it.
On learn-kaos: recipes · choose-a-pattern.