Cookbook
The cookbook is the practical cousin of the
API Reference and the
Concept Guides. Each recipe
takes one concrete operator goal — "trace a multi-step
LangGraph agent", "fan out flagged decisions to Slack",
"replace console.log with audit-grade traces" — and
walks through the runnable code end-to-end. Every recipe is
written against test mode with adj_test_* keys; copy the
code, set two environment variables, paste, and you have a
working integration in under five minutes. The Wave 4 acceptance
gate for this section is exactly that: every recipe runs
verifiably in test mode without the reader writing a line of
their own glue code.
What's in here
| Recipe | Goal | Time |
|---|---|---|
| Multi-step agents | Trace one LLM call that fans out into several tool invocations as a single decision unit | 5 min |
| LangGraph agents | Wire the adjudon-langchain adapter against a LangGraph state machine | 5 min |
| OpenAI tracing | Auto-instrument the OpenAI Python SDK so every chat completion produces a trace | 3 min |
| Anthropic tracing | Same pattern for the Anthropic SDK with tool-use coverage | 3 min |
| Custom PII patterns | Add organisation-specific regex patterns on top of the always-on PII scrubber | 5 min |
| Slack alerts | Send a message to Slack on every flagged or escalated decision | 4 min |
| Scheduled chain export | Push the daily Hash Chain segment to S3 for offline retention | 5 min |
Migrate from console.log | Replace ad-hoc decision-logging in an existing service with audit-grade Adjudon traces | 5 min |
How recipes are structured
Every recipe follows the same shape so the eye finds the runnable block fast:
- Goal. One sentence on what the recipe achieves.
- You'll need. Account tier required (mostly Sandbox; some need Scale or above for the relevant feature gate), language runtime, dependencies.
- Code. A single block that copies cleanly into a project,
with
adj_test_*keys and the relevantADJUDON_BASE_URLenv var. No glue code is left implicit. - What just happened. A short walkthrough of what the code did, what trace fields you can expect, where to look in the dashboard for confirmation.
- Going further. One or two natural next steps with cross- links to the API reference or concept guide that explains the underlying mechanism.
The recipes deliberately do not duplicate the
API Reference tables. When a recipe references
/api/v1/traces, the reference page is the canonical
description; the recipe is the working integration that
exercises it.
Test mode
Every recipe runs against test mode — an isolated
sandbox using adj_test_* keys whose traces never count toward
your monthly quota and never trigger billing or webhook
fan-out to your production destinations. Test mode is on by
default for every Sandbox plan; paid plans get test mode
alongside the live mode. Set the key prefix and the recipe
runs without affecting any production state.
export ADJUDON_API_KEY="adj_test_..." # never the live key
export ADJUDON_BASE_URL="https://api.adjudon.com"
Once those two are set, every recipe in this section runs without further configuration.
What is not here
- Tutorials for the basics. "First trace in 60 seconds" lives at Quickstart; the cookbook assumes you have already finished that.
- Conceptual explanations. "Why does the Confidence Engine weight historical precedent at 30%?" lives at Traces & Confidence; the cookbook stays operational.
- Reference tables. Endpoint shapes, response fields, error codes — the API Reference is the source of truth.
If a recipe you need is missing, the integration almost
certainly works against the underlying API surface today —
open a request at
github.com/adjudon/adjudon-docs/issues with the goal in one
sentence and we'll write it.