Skip to main content

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

RecipeGoalTime
Multi-step agentsTrace one LLM call that fans out into several tool invocations as a single decision unit5 min
LangGraph agentsWire the adjudon-langchain adapter against a LangGraph state machine5 min
OpenAI tracingAuto-instrument the OpenAI Python SDK so every chat completion produces a trace3 min
Anthropic tracingSame pattern for the Anthropic SDK with tool-use coverage3 min
Custom PII patternsAdd organisation-specific regex patterns on top of the always-on PII scrubber5 min
Slack alertsSend a message to Slack on every flagged or escalated decision4 min
Scheduled chain exportPush the daily Hash Chain segment to S3 for offline retention5 min
Migrate from console.logReplace ad-hoc decision-logging in an existing service with audit-grade Adjudon traces5 min

How recipes are structured

Every recipe follows the same shape so the eye finds the runnable block fast:

  1. Goal. One sentence on what the recipe achieves.
  2. You'll need. Account tier required (mostly Sandbox; some need Scale or above for the relevant feature gate), language runtime, dependencies.
  3. Code. A single block that copies cleanly into a project, with adj_test_* keys and the relevant ADJUDON_BASE_URL env var. No glue code is left implicit.
  4. 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.
  5. 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.

Set up your shell
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.