Expand description
Run a Rig agent on AWS Bedrock AgentCore Runtime.
AgentCore runs an agent as an ARM64 container that serves its HTTP
protocol contract on port 8080: POST /invocations with a JSON body,
answered with JSON or server-sent events, and GET /ping. Each runtime
session (the X-Amzn-Bedrock-AgentCore-Runtime-Session-Id header) is one
conversation. AgentCoreApp serves that contract for a Rig agent:
- the session’s conversation is kept between invocations;
- the reply streams as server-sent events when the caller asks for
text/event-stream, and is one JSON object otherwise; - each invocation runs in a span that continues the caller’s trace and
carries the session as
session.id(throughrig_otel), which is what AgentCore Observability and Evaluations group a session’s traces by.
rig_agentcore::AgentCoreApp::new(agent).serve().awaitStructs§
- Agent
Core App - A Rig agent served on AgentCore Runtime’s HTTP protocol contract.
Enums§
- Serve
Error - Why the app stopped serving.
Constants§
- DEFAULT_
MAX_ SESSIONS - How many sessions an app keeps by default. AgentCore gives each session its own microVM, so one process usually sees one; this bounds the memory when the app runs elsewhere.
- DEFAULT_
PORT - The port AgentCore Runtime sends the HTTP protocol to.
- SESSION_
HEADER - The header AgentCore Runtime names the session with.