Run your coding agent (Kiro, Claude Code, Codex, etc.) remotely on Amazon Bedrock AgentCore Runtime instead of bundling it inside the OAB container.
- No coding CLI in your OAB image — smaller, faster pulls, simpler upgrades
- True isolation — each agent session runs in its own Firecracker microVM
- Persistent workspace —
/mnt/workspacesurvives across turns (14-day retention) - Background execution — agents survive pod restarts
- Multi-agent routing — one OAB routes to N runtimes by config
# config.toml
[discord]
bot_token = "${DISCORD_BOT_TOKEN}"
[agentcore]
runtime_arn = "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-kiro-agent"That's it. OAB auto-spawns the native AgentCore bridge.
- An AgentCore Runtime with your coding agent deployed (see Deploying a Kiro Runtime below)
- AWS credentials on the OAB pod with
bedrock-agentcore:InvokeAgentRuntimeCommandShellpermission - Runtime deployed after June 5, 2026 (interactive shells support required)
┌─ ECS / Kubernetes Pod ────────────────────────────────────────┐
│ openab (PID 1) │
│ └─ openab agentcore-bridge (child process) │
│ ├─ stdin ◄── JSON-RPC from OAB │
│ ├─ stdout ──► JSON-RPC to OAB │
│ └─ WebSocket ──► AgentCore (SigV4 signed) │
└───────────────────────────────────────────────────────────────┘
│ InvokeAgentRuntimeCommandShell (wss://)
▼
┌─ AgentCore MicroVM ───────────────────────────────────────────┐
│ PTY shell (persistent per shellId) │
│ └─ kiro-cli acp --trust-all-tools (long-lived) │
│ ├─ stdin ◄── JSON-RPC (initialize, session/prompt) │
│ └─ stdout ──► JSON-RPC (responses, notifications) │
│ │
│ /mnt/agent (14-day persistent storage) │
│ └─ .local/share/kiro-cli/data.sqlite3 (OAuth) │
│ /tmp/kiro-cli/data.sqlite3 (local copy — SQLite locks work) │
└───────────────────────────────────────────────────────────────┘
[agentcore]
runtime_arn = "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent" # required
shell_command = "kiro-cli acp --trust-all-tools" # default; any ACP agent
cancel_strategy = "stop" # "stop" (default) or "noop"| Field | Required | Default | Description |
|---|---|---|---|
runtime_arn |
yes | — | AgentCore Runtime ARN (region is extracted from it) |
shell_command |
no | kiro-cli acp --trust-all-tools |
ACP agent command to run in the PTY |
cancel_strategy |
no | stop |
What to do on cancel: stop terminates the session, noop ignores |
If you need full control, use [agent] directly:
[agent]
command = "openab"
args = ["agentcore-bridge", "--runtime-arn", "arn:aws:...", "--region", "us-east-1"]- Explicit
[agent]withcommand = "..."always wins —[agentcore]is ignored OPENAB_AGENT_COMMANDenv var alone does NOT count as explicit —[agentcore]overrides it- If neither
[agent].commandnor[agentcore]is set, falls back toOPENAB_AGENT_COMMANDoropenab-agent
Use ghcr.io/openabdev/openab-agentcore — a minimal image (~20MB) with only the OAB binary. No Python, no coding CLI bundled.
docker pull ghcr.io/openabdev/openab-agentcore:latestNote: AWS does not currently offer a pre-built managed Kiro runtime. You build and deploy the container yourself. This applies to all coding agents (Claude Code, Codex, Cursor, etc.) — AgentCore hosts your container, it doesn't provide one. This may change as AgentCore evolves.
A ready-to-build Kiro runtime is at agentcore/runtimes/kiro/. Or build your own:
FROM public.ecr.aws/amazonlinux/amazonlinux:2023
RUN dnf install -y git curl python3 python3-pip unzip && dnf clean all
RUN useradd -m -d /home/agent -u 1000 agent
# Install kiro-cli
USER agent
RUN curl -fsSL https://cli.kiro.dev/install | bash
USER root
RUN pip3 install boto3
COPY healthcheck.py /app/healthcheck.py
COPY run.sh /app/run.sh
RUN chmod +x /app/run.sh
ENV PATH="/home/agent/.local/bin:${PATH}"
WORKDIR /app
EXPOSE 8080
USER agent
CMD ["python3", "/app/healthcheck.py"]# Push image
aws ecr create-repository --repository-name agentcore-kiro --region us-east-1
docker buildx build --platform linux/arm64 -t <ACCOUNT>.dkr.ecr.us-east-1.amazonaws.com/agentcore-kiro:latest . --push
# Create runtime
aws bedrock-agentcore-control create-agent-runtime \
--agent-runtime-name kiro_agent \
--agent-runtime-artifact '{"containerConfiguration":{"containerUri":"<ACCOUNT>.dkr.ecr.us-east-1.amazonaws.com/agentcore-kiro:latest"}}' \
--role-arn "arn:aws:iam::<ACCOUNT>:role/agentcore-execution-role" \
--network-configuration '{"networkMode":"PUBLIC"}' \
--protocol-configuration '{"serverProtocol":"HTTP"}' \
--region us-east-1aws bedrock-agentcore-control create-workload-identity --name kiro-coding-agent --region us-east-1
aws bedrock-agentcore-control create-api-key-credential-provider \
--name kiro-api-key --api-key "$KIRO_API_KEY" --region us-east-1The runtime fetches the key at boot — no plaintext secrets in env vars or config.
┌─────────┐ ┌─────────┐ ACP ┌───────────────────┐ WebSocket ┌─────────────────────┐
│ Discord │──────▶│ OAB │───────▶│ agentcore-bridge │────────────▶│ AgentCore Runtime │
│ Slack │ │ │ stdio │ (Rust, in-tree) │ (PTY/WS) │ (Firecracker μVM) │
└─────────┘ └─────────┘ └───────────────────┘ │ ┌───────────────┐ │
│ │ kiro-cli acp │ │
│ │ (long-lived) │ │
│ └───────────────┘ │
└─────────────────────┘
- OAB spawns
openab agentcore-bridgeas a subprocess (ACP stdio protocol) - Bridge opens a SigV4-signed WebSocket to AgentCore (
InvokeAgentRuntimeCommandShell) - Inside the persistent PTY shell,
kiro-cli acp --trust-all-toolsruns as a long-lived process - JSON-RPC messages flow bidirectionally: OAB ↔ bridge ↔ WebSocket ↔ kiro-cli
- Same
shell_idper thread ensures session continuity across messages
Each Discord/Slack thread maps to a deterministic runtimeSessionId. AgentCore keeps the same microVM alive for 15 minutes (configurable up to 8 hours). The persistent filesystem means:
- Kiro's conversation history survives across turns (via
--resume) - Git repos, node_modules, build caches all persist
- No re-clone on every message
Minimum permissions for the OAB pod:
{
"Effect": "Allow",
"Action": ["bedrock-agentcore:InvokeAgentRuntimeCommandShell"],
"Resource": ["arn:aws:bedrock-agentcore:us-east-1:<ACCOUNT>:runtime/*"]
}| Local ACP (default) | AgentCore | |
|---|---|---|
| Agent location | Same container | Remote microVM |
| Image size | ~500MB+ | ~50MB (agentcore variant) |
| Session state | In-memory (lost on restart) | Persistent filesystem (14 days) |
| Parallelism | Shared CPU | Independent microVM per session |
| Cold start | None | ~5-15s first invoke |
| Cost | Always-on pod | Pay per CPU-second |