Skip to main content

Agent

Struct Agent 

Source
pub struct Agent {
Show 44 fields pub specs: Option<Vec<AgentSpec>>, pub auto_approve_tools: Option<Vec<String>>, pub command_relationships: Option<AgentCommandRelationships>, pub access_control: Option<AgentAccessControl>, pub metadata: Option<Map<String, Value>>, pub agent_id: String, pub tenant_id: String, pub name: String, pub description: Option<String>, pub version: Option<String>, pub model: AgentModelConfig, pub prompts: Option<AgentPrompts>, pub mcp: Option<Map<String, Value>>, pub policies: Option<Map<String, Value>>, pub skills: Option<Vec<Map<String, Value>>>, pub thinking: Option<Map<String, Value>>, pub effort_policy: Option<Map<String, Value>>, pub resource_limits: Option<Map<String, Value>>, pub memory: Option<Map<String, Value>>, pub guardrails: Option<Map<String, Value>>, pub approval_required_tools: Option<Vec<String>>, pub built_in_tools: Option<Vec<String>>, pub image_generation: Option<Map<String, Value>>, pub knowledge_base_id: Option<String>, pub knowledge_base_ids: Option<Vec<String>>, pub visibility: Option<AgentUpdateVisibility>, pub status: Option<AgentStatus>, pub status_changed_at: Option<String>, pub status_reason: Option<String>, pub autonomy: Option<AgentAutonomy>, pub tool_overrides: Option<Vec<AgentToolOverride>>, pub public_config: Option<AgentPublicConfig>, pub bridge: Option<AgentBridgeState>, pub fallback_model: Option<Map<String, Value>>, pub execution_mode: Option<AgentExecutionMode>, pub worker_reuse: Option<bool>, pub schedule: Option<Map<String, Value>>, pub a2a: Option<Map<String, Value>>, pub risk_classification: Option<Map<String, Value>>, pub workspace_id: Option<String>, pub context_strategy: Option<AgentContextStrategy>, pub context_window_size: Option<i64>, pub created_at: String, pub updated_at: Option<String>,
}
Expand description

Agent model.

Fields§

§specs: Option<Vec<AgentSpec>>

SPECs installed on this agent, with version pin and granted permissions.

§auto_approve_tools: Option<Vec<String>>

Tools this agent may call without a human-in-the-loop prompt.

§command_relationships: Option<AgentCommandRelationships>

Command hierarchy (MVP: opcon only).

§access_control: Option<AgentAccessControl>

Security clearance and compartment access.

§metadata: Option<Map<String, Value>>

Free-form caller-supplied metadata.

§agent_id: String§tenant_id: String§name: String§description: Option<String>§version: Option<String>§model: AgentModelConfig§prompts: Option<AgentPrompts>§mcp: Option<Map<String, Value>>§policies: Option<Map<String, Value>>§skills: Option<Vec<Map<String, Value>>>§thinking: Option<Map<String, Value>>§effort_policy: Option<Map<String, Value>>§resource_limits: Option<Map<String, Value>>§memory: Option<Map<String, Value>>§guardrails: Option<Map<String, Value>>§approval_required_tools: Option<Vec<String>>

Tool names requiring human approval before execution

§built_in_tools: Option<Vec<String>>

Built-in tool names enabled for this agent

§image_generation: Option<Map<String, Value>>

Image generation configuration

§knowledge_base_id: Option<String>

Deprecated in packages/types/agent.ts:296; kept for pre-migration records. Use knowledge_base_ids. Documenting only the singular is why a client reading this schema could link one base to an agent that supports several.

§knowledge_base_ids: Option<Vec<String>>

Every knowledge base linked to the agent. search_kb searches all of them by default.

§visibility: Option<AgentUpdateVisibility>

Who can reach the agent. The publication screen is built on this field.

§status: Option<AgentStatus>

Governance state, distinct from a run’s status.

§status_changed_at: Option<String>§status_reason: Option<String>§autonomy: Option<AgentAutonomy>§tool_overrides: Option<Vec<AgentToolOverride>>

Per-tool trust, overriding the agent’s default approval policy.

§public_config: Option<AgentPublicConfig>§bridge: Option<AgentBridgeState>

Present only on GET /agents/{id}, and only for a bridge agent. Computed at read time from the machines currently registered, never stored on the record.

§fallback_model: Option<Map<String, Value>>

Fallback model configuration

§execution_mode: Option<AgentExecutionMode>§worker_reuse: Option<bool>§schedule: Option<Map<String, Value>>

Cron schedule configuration

§a2a: Option<Map<String, Value>>

Agent-to-Agent protocol configuration

§risk_classification: Option<Map<String, Value>>

EU AI Act risk classification

§workspace_id: Option<String>

Workspace this agent belongs to

§context_strategy: Option<AgentContextStrategy>§context_window_size: Option<i64>

Number of recent MESSAGES to keep — not a token budget, and read only when context_strategy is sliding_window. Default 20. Under any other strategy it is ignored entirely.

Said explicitly because the name reads like a token ceiling and was used as one: the Head Agent tier template set it to 65536/131072/262144 as if it capped context, and a client posted those values believing they sized the window. The window is the model’s — see model.capabilities.max_context_tokens — and what bounds history per call is resource_limits.max_tokens_per_run together with the platform’s history-budget ratio.

§created_at: String§updated_at: Option<String>

Trait Implementations§

Source§

impl Clone for Agent

Source§

fn clone(&self) -> Agent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Agent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Agent

Source§

fn default() -> Agent

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Agent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Agent

Source§

fn eq(&self, other: &Agent) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Agent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Agent

Auto Trait Implementations§

§

impl Freeze for Agent

§

impl RefUnwindSafe for Agent

§

impl Send for Agent

§

impl Sync for Agent

§

impl Unpin for Agent

§

impl UnsafeUnpin for Agent

§

impl UnwindSafe for Agent

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more