Architecture
agentcore runs inside a managed-agent sandbox. A caller sends client events, the runtime drives the model/tool loop, and typed events describe progress and results.
Agent loop
A Turn may contain multiple model calls and tool calls. Tools currently execute sequentially. The runtime keeps tool request/result pairs together when adding them to conversation history.
Session scheduling
The Scheduler owns active Sessions. Each active Session has one goroutine that serializes user turns and retains its Agent's conversation state.
The active-session map is deliberately not a general Task registry. Completed task retention, durable execution and arbitrary background process tracking are outside the current contract.
Event boundary
Inside Go, this boundary is expressed as typed channels. The command currently serializes events as newline-delimited JSON. A future transport adapter does not need to change the agent loop.
Package boundary
The root agentcore package contains the small public runtime. Built-in tools
live in the tools package, and executable entry points live under cmd/.
There is no internal/kernel or generic plugin layer because no independent
package boundary has yet been demonstrated.