Go-native agent runtime for managed-agent sandboxes.
agentcore is an experimental, embeddable runtime for running coding agents in headless sandboxes. It focuses on a small native binary, explicit lifecycle semantics, typed events and low per-session overhead.
- Multi-turn sessions with model/tool loops.
- Typed bidirectional session events.
- Bash and filesystem-oriented coding tools.
- Context compaction with tool-call pairing preservation.
- Cancellation, tool timeouts and panic containment.
- Isolated asynchronous sub-agents (result delivery is still evolving).
MCP, production WebSearch, durable task storage and a stable public API are not implemented yet. See the capability status before relying on compatibility claims.
git clone https://github.com/yanpgwang/agentcore
cd agentcore
go build -o agentcore ./cmd/agentcore
./agentcore \
--session-id local-1 \
--agent-config config.jsonExample config.json:
{
"system_prompt": "You are a helpful coding agent.",
"model": "claude-sonnet-4-6",
"initial_prompt": "List all TODO entries in the project.",
"permission": "always_allow"
}Events are written to stdout as newline-delimited JSON.
Set ANTHROPIC_API_KEY before running. ANTHROPIC_BASE_URL can override the
official Anthropic endpoint for a compatible gateway.
The full documentation is hosted at yanpgwang.github.io/agentcore.
Documentation changes belong in the same commit as the behavior they describe. Public Go APIs are documented in source and rendered by pkg.go.dev.
go test ./...
go test -race ./...
go vet ./...The project is intentionally small. New packages and abstractions are added only after a concrete boundary has been demonstrated by more than one implementation.