Coding Agents
By the end of this tutorial, you’ll have a coding agent running against your own repository, connected to the Band platform and accepting tasks from a chat room.
Prerequisites
Complete the Setup tutorial first. You should have an agent created on the platform and an agent_config.yaml with your credentials.
You’ll also need the CLI for whichever adapter you plan to use:
- For Claude SDK: Claude Code CLI (
npm install -g @anthropic-ai/claude-code) andANTHROPIC_API_KEYin your environment - For Codex: Codex CLI (
npm install -g @openai/codex, thencodex login)
Both require Node.js 20+.
Install the SDK
Install the SDK with both coding agent adapters:
From PyPI
From cloned repo
Agent Config
For local development, your agent_config.yaml only needs credentials. The load_agent_config() function reads the agent ID and API key; everything else (model, custom instructions, approval settings) is configured in Python.
The key name (my_agent) is what your Python code passes to load_agent_config() to identify which agent’s credentials to load.
Create Your Agent
Create agent.py in your project directory. Pick the tab for your adapter — Claude SDK runs Claude Code under the hood, Codex runs OpenAI’s Codex CLI.
Claude SDK
Codex
custom_section is injected into the agent’s system prompt — use it for repo-specific guidance like which directories to focus on, how to run tests, or what conventions to follow. For multi-line instructions, pass a longer string:
enable_execution_reporting sends tool-use logs back to the platform so you can review what the agent did after a session.
To point the agent at a directory other than the one you run from, pass cwd:
See the Claude SDK Adapter and Codex Adapter tutorials for the full set of adapter parameters.
Run the Agent
Run from your project directory:
You should see:
The agent is now connected to the platform and waiting for messages.
Test Your Agent
Open a Chat Room
Go to Band and create a new chat room or open an existing one. Add your agent as a participant under the Remote section.
See the Response
The agent reads the files in its working directory, performs the task, and responds in the chat room. Depending on the task, you’ll see a summary of what it found or did, along with any file changes it made. If approval mode is enabled (Codex), the agent asks for permission before editing files or running commands.
Approval Mode
Codex can require human sign-off before running commands or editing files:
In manual mode, the agent posts an approval prompt with a token. Participants reply with /approve <token> or /decline <token> in the chat room. Use /approvals to list pending requests.
Claude SDK uses permission_mode instead of approval_mode. See the Claude SDK Adapter tutorial for details.
Docker Deployment
For production or persistent deployments, run coding agents in Docker. The Docker runners handle repo cloning, retry logic, signal handling, and graceful shutdown.
Config
Unlike local development where adapter config lives in Python, the Docker runner reads everything from YAML:
role maps to a prompt file at prompts/planner.md that gets injected into the system prompt. index: true generates context files (project structure, patterns, dependencies) that give the agent a head start on understanding the codebase.
Working Directory
The runner resolves the working directory from the first available source:
Run
See examples/coding_agents/ in the SDK repo for a complete multi-agent compose setup.
Running from the SDK repo (for SDK contributors)
If you’re iterating on SDK examples directly rather than installing the SDK as a dependency, use uv --directory so the SDK’s dependencies resolve correctly while your shell stays in your project:
The coding agent operates on files in your shell’s working directory, not the SDK directory. For production use, install the SDK as a dependency in your own project instead.