pub struct Agent {Show 24 fields
pub public_id: AgentId,
pub internal_id: Uuid,
pub name: String,
pub display_name: Option<String>,
pub description: Option<String>,
pub system_prompt: String,
pub default_model_id: Option<ModelId>,
pub default_version_id: Option<AgentVersionId>,
pub forked_from_agent_id: Option<AgentId>,
pub forked_from_version_id: Option<AgentVersionId>,
pub root_agent_id: Option<AgentId>,
pub tags: Vec<String>,
pub capabilities: Vec<AgentCapabilityConfig>,
pub initial_files: Vec<InitialFile>,
pub network_access: Option<NetworkAccessList>,
pub max_iterations: Option<usize>,
pub tools: Vec<ToolDefinition>,
pub mcp_servers: ScopedMcpServers,
pub status: AgentStatus,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub archived_at: Option<DateTime<Utc>>,
pub deleted_at: Option<DateTime<Utc>>,
pub usage: Option<TokenUsage>,
}Expand description
Agent configuration for agentic loop. An agent defines the behavior and capabilities of an AI assistant.
Fields§
§public_id: AgentIdExternal identifier (agent_<32-hex>). Shown as “id” in API. Client-supplied or auto-generated.
internal_id: UuidInternal UUID primary key. Used for FK references. Never exposed in API.
name: StringName, unique per org (e.g. “customer-support”).
display_name: Option<String>Human-readable display name shown in UI (e.g. “Customer Support Agent”).
Falls back to name when absent.
description: Option<String>Human-readable description of what the agent does.
system_prompt: StringSystem prompt that defines the agent’s behavior. Sent as the first message in every conversation.
default_model_id: Option<ModelId>Default LLM model ID for this agent. Can be overridden at the session level.
default_version_id: Option<AgentVersionId>Default immutable version used by deployments that choose the default policy.
forked_from_agent_id: Option<AgentId>Source agent for a forked agent.
forked_from_version_id: Option<AgentVersionId>Source version for a forked agent.
root_agent_id: Option<AgentId>Root agent lineage identifier for grouping fork families.
Tags for organizing and filtering agents.
capabilities: Vec<AgentCapabilityConfig>Capabilities enabled for this agent with per-agent configuration. Capabilities add tools and system prompt modifications.
initial_files: Vec<InitialFile>Starter files copied into each new session for this agent.
network_access: Option<NetworkAccessList>Network access list controlling which hosts/URLs agent sessions can reach. Merged with harness and session layers (allowed: intersect, blocked: union).
max_iterations: Option<usize>Maximum number of LLM iterations per turn for this agent.
tools: Vec<ToolDefinition>Client-side tools registered for this agent. These tools are executed by the client, not the server.
mcp_servers: ScopedMcpServersRemote MCP servers scoped to this agent and inherited by its sessions.
status: AgentStatusCurrent lifecycle status of the agent.
created_at: DateTime<Utc>Timestamp when the agent was created.
updated_at: DateTime<Utc>Timestamp when the agent was last updated.
archived_at: Option<DateTime<Utc>>Timestamp when the agent was archived.
deleted_at: Option<DateTime<Utc>>Timestamp when the agent was deleted.
usage: Option<TokenUsage>Cumulative token usage across all sessions for this agent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Agent
impl<'de> Deserialize<'de> for Agent
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>,
Source§impl From<&Agent> for AgentConfigOverlay
impl From<&Agent> for AgentConfigOverlay
Source§impl HasAuditTargetId for Agent
impl HasAuditTargetId for Agent
fn audit_target_id(&self) -> Option<String>
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> 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request