Expand description
Structured run protocol shared by agent implementations and callers.
The structured entry point is RunRequest + RunContext →
RunOutput. The core crate defines the protocol types only; agent
runtime crates can layer text helpers on top.
§Examples
use molo_core::message::Message;
use molo_core::run::{RunContext, RunOutput, RunRequest, RunSummary};
use std::time::Duration;
let request = RunRequest::text("hi");
let context = RunContext::new("request-42").with_timeout(Duration::from_secs(30));
let output = RunOutput {
run_id: context.run_id.clone(),
answer: "Hello".into(),
summary: RunSummary {
rounds: 1,
..RunSummary::default()
},
final_message: Message::assistant("Hello"),
artifacts: vec![],
metadata: Default::default(),
};
assert_eq!(request.input.as_text(), Some("hi"));
assert_eq!(output.run_id, "request-42");
assert_eq!(output.answer, "Hello");
assert_eq!(output.summary.rounds, 1);Structs§
- Artifact
- A handle to an artifact produced by a run.
- RunContext
- Execution controls and host-owned metadata for one run.
- RunOutput
- Structured result of one non-streaming run.
- RunRequest
- Input and model parameters for one run.
- RunSummary
- Execution summary for one run.
- Typed
RunOutput - Typed-output result paired with the raw structured run output.
Enums§
- User
Input - User input accepted by a run.
Type Aliases§
- RunMetadata
- Request, context, or output metadata for one run.