pub struct PromptAgentDefinition {
pub name: String,
pub model: String,
pub instructions: Option<String>,
pub description: Option<String>,
pub tools: Vec<ToolDefinition>,
}Expand description
The serializable definition of a Foundry Prompt Agent: a name, a model, optional instructions/description, and its tools.
Maps to upstream’s PromptAgentDefinition (the declarative shape a Prompt
Agent is created from, and that Agent.to_prompt_agent() emits). Used
here to build a FoundryAgent (FoundryAgent::from_definition) and to
read one back (FoundryAgent::to_prompt_agent).
ToolDefinition itself does not implement Serialize/Deserialize (a
function tool carries a dyn Tool local executor, which isn’t
serializable), so tools round-trips through a private wire shape
capturing only the declarative fields a definition needs — see
tool_definition_wire. A tool
deserialized back out of a PromptAgentDefinition always has
executor: None: a definition describes what a tool is, not a live
local implementation to call it.
Fields§
§name: StringThe agent’s name.
model: StringThe model deployment this agent runs on.
instructions: Option<String>The system prompt / instructions.
description: Option<String>A human-readable description of what the agent does.
tools: Vec<ToolDefinition>The tools available to the agent.
Implementations§
Trait Implementations§
Source§impl Clone for PromptAgentDefinition
impl Clone for PromptAgentDefinition
Source§fn clone(&self) -> PromptAgentDefinition
fn clone(&self) -> PromptAgentDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more