> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbindu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Going to Production

> What to read, what to try, what to pin down before you ship.

You've seen the gateway end-to-end. This page is the map of what's next.

***

## Reference material

<CardGroup cols={2}>
  <Card title="Gateway API reference" icon="code" href="/gateway-api/introduction">
    The machine-readable contract for `/plan`, `/health`, and `/.well-known/did.json`. Every field, response, and example.
  </Card>

  <Card title="gateway/README.md" icon="book" href="https://github.com/GetBindu/Bindu/blob/main/gateway/README.md">
    The operator's reference: configuration knobs, environment variables, the `/health` payload, troubleshooting, and where vendored code came from.
  </Card>

  <Card title="planner.md" icon="brain" href="https://github.com/GetBindu/Bindu/blob/main/gateway/agents/planner.md">
    The planner LLM's system prompt. If the gateway is doing something you don't expect, start here.
  </Card>

  <Card title="Seed recipes" icon="book-open" href="https://github.com/GetBindu/Bindu/tree/main/gateway/recipes">
    The two shipped recipes - `multi-agent-research` and `payment-required-flow` - plus whatever you wrote. Each is a complete example.
  </Card>
</CardGroup>

***

## Hands-on next steps

<AccordionGroup>
  <Accordion title="Run the full test matrix" icon="flask-vial">
    The `gateway_test_fleet` example has 15 prebuilt test cases (`Q1`..`Q12` plus `Q_MULTIHOP`, `Q_INBOX_REPRO_A`, `Q_INBOX_REPRO_B`) covering edge behaviors — empty question, wrong bearer token on a peer, timeout, ambiguous question, nonexistent skill, multi-hop chains, inbox reproductions:

    ```bash theme={null}
    ./examples/gateway_test_fleet/run_matrix.sh
    ```

    Each produces a full SSE log in `examples/gateway_test_fleet/logs/<case>.sse` - open one and read it end to end. It's unusually readable once you know the event types.
  </Accordion>

  <Accordion title="Write a second recipe" icon="pen-to-square">
    The one from [the recipes chapter](/bindu/gateway/recipes) was generic. Try a tenant-specific policy - *"always prepend a compliance disclaimer to the final message,"* or *"for any question about PII, refuse and point at the legal agent."*
  </Accordion>

  <Accordion title="Add a new agent" icon="plus">
    Copy `examples/gateway_test_fleet/joke_agent.py`, change the instructions, run it on port 3779, add it to a `/plan` request. Watch the planner pick it up without any gateway-side config change.
  </Accordion>

  <Accordion title="Edit the planner's system prompt" icon="wand-magic-sparkles">
    Open `gateway/agents/planner.md` and tighten or loosen its instructions. The agent registry is loaded once at boot and cached — Ctrl+C the gateway and `npm run dev` again to pick up your edits.
  </Accordion>
</AccordionGroup>

***

## Production checklist

If you're moving this past localhost:

<Steps>
  <Step title="Turn on DID signing for every peer.">
    Use [the identity chapter](/bindu/gateway/identity) as your walk-through. Unsigned calls are fine on localhost; they're a vulnerability anywhere else.
  </Step>

  <Step title="Rotate GATEWAY_API_KEY from the dev value to a generated secret.">
    Distribute via your usual secret-management tool - not `.env.local`.
  </Step>

  <Step title="Pin the planner model.">
    Add `model: openrouter/anthropic/claude-sonnet-4.6` (or whichever you want) to `gateway/agents/planner.md` frontmatter so upgrades are explicit, not implicit.
  </Step>

  <Step title="Set preferences.max_steps on every /plan request.">
    A runaway planner that loops 100 times at your expense is a real failure mode. Cap it via `preferences.max_steps` in the request body (and pair with `preferences.timeout_ms` for a wall-clock budget — default 30 min, max 6 h). See the [Gateway API reference](/gateway-api/introduction).
  </Step>

  <Step title="Watch the usage field on the final SSE event.">
    That's where you see token counts per plan. Log them. Alert on outliers.
  </Step>
</Steps>

***

## When you're stuck

<AccordionGroup>
  <Accordion title="Gateway won't boot" icon="circle-exclamation">
    Re-read the env var section of `gateway/README.md`. Partial DID or Hydra config fails fast with a message naming the missing var.
  </Accordion>

  <Accordion title="Planner never calls a tool" icon="wrench">
    The descriptions you gave for `agents[].skills[].description` are probably too short or too vague. Anthropic's docs say tool descriptions are *"by far the most important factor in tool performance"* - 3–4 sentences on intent, inputs, outputs, and when to use it.
  </Accordion>

  <Accordion title="Agent returns &#x22;User not found&#x22;" icon="user-xmark">
    Your `OPENROUTER_API_KEY` is invalid or out of credit.
  </Accordion>

  <Accordion title="event: error with &#x22;Invalid Responses API request&#x22;" icon="code-pull-request">
    You're on an older gateway commit. `git pull`.
  </Accordion>
</AccordionGroup>

***

## That's the whole story

You have a gateway, five agents, the ability to add more, the ability to teach patterns via recipes, and the ability to sign outbound calls for production.

Everything else in this repo is either reference material for one of those five concepts, or internal implementation detail you don't need to read until you're ready to extend the gateway itself.

<Tip>
  **Go build something.**
</Tip>

<CardGroup cols={2}>
  <Card title="Gateway API reference" icon="code" href="/gateway-api/introduction">
    Every field, every response shape.
  </Card>

  <Card title="Bindu Agent API" icon="plug" href="/api/introduction">
    What each agent the gateway calls exposes.
  </Card>

  <Card title="DIDs explained" icon="shield-halved" href="/bindu/learn/did/overview">
    The identity model under `did_signed`.
  </Card>

  <Card title="Discord community" icon="discord" href="https://discord.com/invite/3w5zuYUuwt">
    Ask questions, share recipes.
  </Card>
</CardGroup>

<span className="brand-quote mt-5">
  <img src="https://mintcdn.com/pebbling/x2BFCGEbWywg69kQ/logo/light.svg?fit=max&auto=format&n=x2BFCGEbWywg69kQ&q=85&s=a69e734bb925e661b3c2ca2a20a050a9" alt="Sunflower Logo" width="32" className="clean-icon" data-path="logo/light.svg" />

  <span className="brand-quote-text">
    Now you have everything you need -{" "}
    <span className="brand-quote-highlight">build systems you need</span>.
  </span>
</span>
