# Live input: Steer and Queue

Connect a running agent, choose when it handles messages, and use the same integration without a workspace UI.

Keep your existing model, tools and runtime. A receiver accepts messages independently of the model loop and passes them through the runtime's supported input mechanism.

## Does a message interrupt my model?

You choose the default for ordinary incoming messages:

| Mode | What happens while the agent is busy |
| --- | --- |
| **Steer** | New input joins ongoing work at the next supported runtime boundary. A long-running tool can delay that boundary. |
| **Queue** | New messages wait until the current work finishes. |

Beepgrid does not send cancellation or cancel/replay commands to simulate steering. Native runtime behavior still applies: some runtimes add input between steps, while others may pause or pre-empt generation. Steering is not a guarantee that a running tool will stop immediately.

Replies and approval decisions resume the request they belong to in either mode through the host's result handler. An ordinary message does not silently become an answer or approval. Delivery acknowledgements mean durable receipt, not that the model has read the message or finished its work.

## Connect an existing runtime

Use the [runtime binding guide](https://github.com/beepgrid/beepgrid/blob/main/docs/LIVE-INPUT.md#binding-coverage) to choose the integration for your environment: native harness APIs, ACP, AI SDK, LangChain/LangGraph, Claude Agent SDK or a custom checkpoint hook. Check the installed version and required capabilities. If steering is unsupported, use Queue.

In the workspace, choose **Connect an Agent**, select your environment, save the credential privately and copy **Instructions for your AI** into the coding assistant working on your agent project. The instruction includes the selected guide and connection ID. It asks for the credential file's path, not the token in chat.

For manual integration, install `@beepgrid/sdk` from npm or `beepgrid` from PyPI in your agent project, then follow [manual setup](https://github.com/beepgrid/beepgrid/blob/main/docs/LIVE-INPUT.md#manual-setup) and the section for your runtime. No source checkout is required. These bindings extend your existing host rather than start a second replacement agent.

Plain MCP tools and the sequential [worker starters](https://beepgrid.com/docs/start/connect-agent/#independent-message-workers) remain useful for independent jobs. Adding tools alone does not wake or steer a busy model. When a live receiver owns intake, use `mcp --live-input` so MCP does not also receive or acknowledge the same deliveries.

## Set up without the workspace

The same Steer/Queue modes, runtime bindings, permissions, requests and files work headless. There is no dashboard-only API or extra server to enable.

1. Follow the [programmatic quickstart](https://beepgrid.com/docs/start/headless.md) to run the engine with PostgreSQL.
2. Use a namespace-scoped launcher credential to [enroll a connection](https://github.com/beepgrid/beepgrid/blob/main/docs/LIVE-INPUT.md#headless-setup). Keep the issued worker token in a protected file and retain its instance ID. Do not give the agent your owner or launcher credential.
3. Add the selected binding to the existing agent host, set its worker credential and choose `BEEPGRID_BUSY_MODE=steer` or `queue` in the reference receiver. In custom code, pass the same mode to the receiver or checkpoint integration. Reuse the connection on restart.
4. Verify idle and busy input, Queue ordering, replies/decisions, attachment access and restart recovery. A suspended host also needs its existing wake mechanism.

For AI-guided setup without a browser, install the TypeScript SDK in your agent project, then generate an instruction:

```sh
npm install @beepgrid/sdk
npx beepgrid-setup codex \
  --url https://your-engine.example \
  --instance ins_your_connection --mode steer
```

Replace the environment, origin, instance ID and mode with your setup. This command prints an instruction for your coding assistant; it does not launch a runtime, enroll another connection or read a token. Run `npx beepgrid-setup --help` to list environment IDs. The binding guide explains the matching entry points.

## Hosting and resource use

| Side | What it runs |
| --- | --- |
| **Beepgrid** | The existing Go engine and PostgreSQL handle inbox leasing, long-poll connections and acknowledgements. Steering requires no additional server, broker, database service or model. |
| **Agent host** | A background receiver, private durable inbox and native input/checkpoint calls. Framework integrations run in the existing host; ACP may also use the runtime's adapter subprocess. |
| **Model** | Receiving, storing and acknowledging a message needs no model call. Actually processing new input can use tokens and further model steps. |

There is additional connection, database and disk work, so this is not zero overhead. The reference receiver uses long polling with up to a 15-second wait, rather than HTTP polling before each model step. Pending input is bounded and accepted payloads are scrubbed, while deduplication IDs remain available for recovery.

Local SQLite is an embedded file on the agent host, not another database server. It needs persistent private storage. On ephemeral or serverless hosts, use an existing durable store and wake/checkpoint mechanism. One receiver owns each connection and one writer owns each model session. Capacity depends on concurrent connections, message volume and runtime behavior.
