> ## 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.

# The Bindu Gateway

> An end to end story - planner, recipes, DID signing, all wired together.

<Note>
  **Budget about 45 minutes** if you're reading straight through and running the commands. If you skip the commands and just read, \~15 minutes. No prior knowledge of AI agents required - we'll introduce each idea when you need it, and never before.
</Note>

You've heard the words. *Agent. Planner. A2A. Multi-agent orchestration.* By the end of this section you'll have run all of those things yourself, watched them talk to each other, and taught them a new trick.

***

## The roadmap

<CardGroup cols={2}>
  <Card title="Why a gateway exists" icon="compass" href="/bindu/gateway/overview#why-a-gateway-exists">
    The problem an orchestrator solves - and what it is not.
  </Card>

  <Card title="Hello, gateway" icon="rocket" href="/bindu/gateway/quickstart">
    Seven steps. One question. One agent. One streaming response.
  </Card>

  <Card title="Adding a second agent" icon="network-wired" href="/bindu/gateway/multi-agent">
    Three agents, one question - watch the planner choose the order.
  </Card>

  <Card title="Recipes" icon="book-open" href="/bindu/gateway/recipes">
    Teach the planner reusable patterns in plain markdown.
  </Card>

  <Card title="DID signing" icon="shield-halved" href="/bindu/gateway/identity">
    Cryptographic identity for production peer calls.
  </Card>

  <Card title="Going to production" icon="flag-checkered" href="/bindu/gateway/production">
    What to read, what to try, what to pin down.
  </Card>
</CardGroup>

***

## Why a gateway exists

Imagine you've built three AI agents. Each is a small program that listens on an HTTP port and answers specific kinds of questions:

<CardGroup cols={3}>
  <Card title="Research" icon="magnifying-glass">
    Searches the web for facts.
  </Card>

  <Card title="Math" icon="calculator">
    Solves numerical problems.
  </Card>

  <Card title="Poet" icon="feather-pointed">
    Writes short verse.
  </Card>
</CardGroup>

Now a user asks:

> *"Look up the population of Tokyo, then calculate 0.5% of it, then write a four-line poem about that number of people."*

Without a gateway, **you** - the programmer - have to:

<Steps>
  <Step title="Decide the question needs all three agents.">
    Read intent, split the work.
  </Step>

  <Step title="Call the research agent first.">
    Wait for reply.
  </Step>

  <Step title="Parse the answer to extract '36.95 million'.">
    Fragile string munging.
  </Step>

  <Step title="Pass that to the math agent.">
    Wait again.
  </Step>

  <Step title="Parse '184,750'.">
    Hope the format didn't change.
  </Step>

  <Step title="Pass that to the poet agent.">
    Wait one last time.
  </Step>

  <Step title="Collect and return the final poem.">
    Write the user-facing response yourself.
  </Step>
</Steps>

That's not hard for one question. But what about the next hundred questions? Each one needs its own chain, its own parsing, its own error handling. And as soon as a new agent joins the roster, every existing chain might want to use it.

<Tip>
  **The gateway is the thing that does steps 1–7 for you.** You hand it a question and a list of agents. It figures out which agents to call, in what order, with what input. You get back a stream of what happened and, at the end, a final answer.
</Tip>

***

## How does it "figure it out"?

The gateway has one trick: it uses an LLM - a large language model, like Claude or GPT - as a **planner**. The planner sees:

* The user's question.
* A short description of each available agent.
* Its own system prompt (general instructions the gateway operator wrote).

Then it decides, turn by turn, which agent to call next. The output of each call feeds back into the planner's context, and it decides whether to call another agent, write a final answer, or ask the user a clarifying question.

<Info>
  Modern LLMs are surprisingly good at this. Anthropic calls it [tool use](https://docs.anthropic.com/claude/docs/tool-use), OpenAI calls it "function calling" - same idea. The gateway wires your agents up as "tools" the planner can invoke and lets the LLM drive.
</Info>

***

## What the gateway is not

<AccordionGroup>
  <Accordion title="It's not another agent" icon="ban">
    It doesn't generate answers itself. It orchestrates the ones you already have.
  </Accordion>

  <Accordion title="It doesn't host agents" icon="server">
    You give it a list of agents per request. The agents run wherever they run - your laptop, a cluster, a third-party service. The gateway just calls them.
  </Accordion>

  <Accordion title="It doesn't have opinions about your agents" icon="handshake">
    As long as each agent speaks the [A2A protocol](https://github.com/a2aproject/A2A) (a small JSON-RPC 2.0 spec authored by Google), the gateway can call it. Bindu implements A2A natively in both the Python core and the TypeScript gateway, so `bindufy()`-built agents speak it out of the box.
  </Accordion>
</AccordionGroup>

***

## What you'll build by the end

<CardGroup cols={3}>
  <Card title="Agents">
    Three agents running locally, chained automatically to answer a multi-part question.
  </Card>

  <Card title="Recipe">
    A short markdown file that teaches the planner a reusable pattern without writing any code.
  </Card>

  <Card title="Identity">
    A cryptographic identity - outbound calls get signed so downstream agents can verify the calls are really from your gateway.
  </Card>
</CardGroup>

Let's go. Next up: [Hello, gateway](/bindu/gateway/quickstart).

<span className="brand-quote">
  <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">
    Gateway doesn't answer questions -{" "}
    <span className="brand-quote-highlight">it decides who should</span>.
  </span>
</span>
