Expand description
AWS Bedrock AgentCore runtime for Paigasus Helikon agents.
AgentCoreServer mounts a single Agent on an
axum router that implements AWS Bedrock AgentCore’s HTTP-protocol container
contract:
GET /ping— a dedicated, always-responsive health-check handler that never shares state with the runner, the agent, or any in-flight invocation, so a slow or stuck invocation can never delay a health check. Returns HTTP 200 with a JSON body of exactly{"status":"Healthy"}or{"status":"HealthyBusy"}— this casing is part of the contract and is not configurable. An optionaltime_of_last_updatefield (Unix seconds) is included only once a genuine status transition has occurred: never on the initial steady state, and never re-stamped by a repeated call reporting the same status, since AgentCore uses an advancing timestamp to judge whether the agent is still making progress. SeePingState.POST /invocations— the endpoint AgentCore calls to run the agent. AcceptsInvocationRequest’s three body shapes ({"messages": [...]},{"prompt": "..."},{"input": "..."}). An optionalX-Amzn-Bedrock-AgentCore-Runtime-Session-Idrequest header (33-256 characters) pins the invocation to a session via the configuredSessionProvider; an absent header gets a fresh, unshared session (one microVM instance is, by AgentCore’s execution model, already one session).Accept: application/jsonselects a buffered200response shaped{"final_output": "...", "usage": {...}}; any other (or absent)Acceptselects the default Server-Sent-Events transport, emitting onedata: <AgentEvent JSON>frame per event with a terminalRunCompleted/RunFailedframe.
AgentCoreServer::serve binds 0.0.0.0:8080 — the fixed port AgentCore’s runtime
contract expects — and logs the app-side cold-start latency ("ready in {ms}ms")
immediately after the listener is bound; AgentCore’s own microVM provisioning
latency is outside this crate’s control and is not part of that measurement.
Session and per-request context handling reuse paigasus-helikon-runtime-axum’s
provider traits (SessionProvider/ContextProvider), so a self-hosted deployment
and an AgentCore deployment of the same agent share one provider vocabulary.
§MCP-protocol mode (feature mcp, default on)
AgentCoreServer::serve_mcp serves the same configured agent as a single MCP
tool over rmcp’s streamable-HTTP transport instead of the HTTP-protocol contract
above — for AgentCore’s MCP runtime type rather than its default HTTP runtime
type. It binds a separate port (0.0.0.0:8000) and mounts the MCP endpoint at
/mcp plus a trivial /ping (not part of MCP; cheap insurance). See
AgentCoreServer::mcp_router for the stateless/allowed-hosts configuration this
requires and why.
Structs§
- Agent
Core Server - Self-hosted HTTP server that mounts a single
Agenton an axum router satisfying the AWS Bedrock AgentCore HTTP-protocol container contract. - Agent
Core Server Builder - Builder for
AgentCoreServer. - Ping
State - Shared health-check state backing the AgentCore
/pingcontract.
Enums§
- Agent
Core Error - Errors produced by the AgentCore server.
- Invocation
Request - Accepted request bodies for
POST /invocations.