pub struct AgentRun {
pub agent: String,
pub model: String,
pub run_id: String,
pub started_at: String,
pub finished_at: Option<String>,
pub context: BTreeMap<String, String>,
pub tool_calls: Vec<ToolCallTrace>,
pub permissions: Option<PermissionState>,
}Expand description
Agent provenance attached to a StateProposal.
Doctrine: the substrate stays model-agnostic. Agents — Literature
Scout, Notes Compiler, Code Analyst, etc. — sit in the
vela-scientist crate (or external code) and write proposals into
a frontier through the existing protocol. This struct is the
reviewer-facing record of who proposed what, with what model,
during which run — never used as access control or trust
assignment.
Fields§
§agent: StringStable agent name (e.g. “literature-scout”). Pairs with the
proposal’s actor.id == "agent:literature-scout".
model: StringModel identifier (e.g. “claude-sonnet-4-6”). Free-form so the substrate never has to enumerate model names.
run_id: StringRun identifier — typically a UUID or short hash. Lets the reviewer group multiple proposals that came out of the same agent invocation.
started_at: StringISO-8601 wall-clock start of the run.
finished_at: Option<String>ISO-8601 wall-clock end. Optional because some agents stream.
context: BTreeMap<String, String>Free-form context the reviewer should see — e.g. the input folder path, the count of papers processed, the prompt version. Kept as a flat string map so it round-trips cleanly through canonical JSON without imposing a schema.
tool_calls: Vec<ToolCallTrace>v0.49: explicit tool-call traces from this run. Each entry records one tool invocation by content-addressable summary (tool name + input hash + output hash + duration). Lets a reviewer see what the agent actually called without bloating the bundle with raw payloads. Optional + skip-if-empty so existing frontiers round-trip byte-identically.
permissions: Option<PermissionState>v0.49: declared permission state for this run. Lists the
data sources the agent had read access to and the tools it
could invoke. Reviewers compare this declaration against
tool_calls to spot drift. Optional + skip-if-empty so
existing frontiers round-trip byte-identically.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentRun
impl<'de> Deserialize<'de> for AgentRun
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AgentRun
impl StructuralPartialEq for AgentRun
Auto Trait Implementations§
impl Freeze for AgentRun
impl RefUnwindSafe for AgentRun
impl Send for AgentRun
impl Sync for AgentRun
impl Unpin for AgentRun
impl UnsafeUnpin for AgentRun
impl UnwindSafe for AgentRun
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.