pub struct AgentCoreApp { /* private fields */ }Expand description
A Rig agent served on AgentCore Runtime’s HTTP protocol contract.
Implementations§
Source§impl AgentCoreApp
impl AgentCoreApp
Sourcepub fn max_sessions(self, max: usize) -> Self
pub fn max_sessions(self, max: usize) -> Self
Keep at most max sessions’ conversations, forgetting the oldest.
Sourcepub fn record_content(self, record: bool) -> Self
pub fn record_content(self, record: bool) -> Self
Record prompts and replies on the GenAI spans. AgentCore Evaluations needs them to judge a session; they are off by default, as in Rig, because they put conversation content into your telemetry.
Sourcepub fn router(self) -> Router
pub fn router(self) -> Router
The contract’s routes, /invocations and /ping, as an Axum router.
Sourcepub async fn serve(self) -> Result<(), ServeError>
pub async fn serve(self) -> Result<(), ServeError>
Serve on 0.0.0.0 at PORT (default 8080, what AgentCore sends to)
until the process gets Ctrl-C or SIGTERM.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentCoreApp
impl !UnwindSafe for AgentCoreApp
impl Forget for AgentCoreApp
impl Freeze for AgentCoreApp
impl Move for AgentCoreApp
impl Send for AgentCoreApp
impl Sync for AgentCoreApp
impl Unpin for AgentCoreApp
impl UnsafeUnpin for AgentCoreApp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more