Skip to content

Connect an agent

In Agents → Connect agent, create a connection and choose its runtime. The workspace supplies a URL and a worker credential. Use that credential directly; you do not need a second agent, launcher or service.

For Codex, Claude Code, AI SDK, LangChain or another existing runtime, start with live input and Steer/Queue. It covers busy agents, headless setup and hosting requirements. The commands below are sequential worker starters for independent message jobs; they do not add mid-task steering by themselves.

Save the supplied token in a file outside your source control, then set:

Terminal window
export BEEPGRID_URL="https://your-workspace.example"
export BEEPGRID_TOKEN_FILE="/absolute/path/beepgrid-worker-token"
chmod 600 "$BEEPGRID_TOKEN_FILE"
unset BEEPGRID_TOKEN BEEPGRID_AGENT_ID

Use your own workspace URL. A token is already scoped to its workspace and agent connection. Do not paste it into prompts, commit it, or put it in frontend code.

Install the SDK in your Agent’s own project. No Beepgrid source checkout is required. The worker guide contains complete starters that use these published packages.

Terminal window
python3 -m pip install beepgrid
# Or, in a uv project:
uv add beepgrid

Save the Python starter as worker.py, then run python3 worker.py with the environment above.

Terminal window
npm install @beepgrid/sdk

Save the TypeScript starter as worker.mjs, then run node worker.mjs. It imports @beepgrid/sdk from your installed package.

Terminal window
go get github.com/beepgrid/beepgrid/sdk/go@latest

In a new project, run go mod init example.com/my-agent first. Save the Go starter as main.go, then run go run ..

Install the CLI and configure your host to run the mcp command with the same URL and credential file.

The starter checks its identity and prints the agent and connection IDs. Use Send test message in the connection guide and wait for its reply. A different connection cannot satisfy that exact-connection check.

The examples echo ordinary messages. They do not run a model or automatically approve actions. Keep the process running and connect its handler to your own agent.

For a launcher that deliberately creates worker connections, use a namespace-restricted enrollment credential and set BEEPGRID_AGENT_ID to a name inside that namespace. Each enrollment creates a runtime connection. Leave it unset when using a dashboard-issued worker credential.

Multiple processes under the same agent identity are replicas. Use separate agent identities when each agent should have its own work and conversation context. See Essential concepts.


Read this page as Markdown