@@ -106,31 +106,31 @@ pub fn estimate_token_count(count: usize) -> usize {
106106#[ derive( Debug , Clone , PartialEq , Setters , Serialize , Deserialize , JsonSchema ) ]
107107#[ setters( strip_option, into) ]
108108pub struct Agent {
109+ /// Unique identifier for the agent
110+ pub id : AgentId ,
111+
112+ /// Human-readable title for the agent
113+ pub title : Option < String > ,
114+
115+ /// Human-readable description of the agent's purpose
116+ pub description : Option < String > ,
117+
109118 /// Flag to enable/disable tool support for this agent.
110119 pub tool_supported : Option < bool > ,
111120
112- // Unique identifier for the agent
113- pub id : AgentId ,
114-
115121 /// Path to the agent definition file, if loaded from a file
116122 pub path : Option < String > ,
117123
118- /// Human-readable title for the agent
119- pub title : Option < String > ,
120-
121- // Required provider for the agent
124+ /// Required provider for the agent
122125 pub provider : ProviderId ,
123126
124- // Required language model ID to be used by this agent
127+ /// Required language model ID to be used by this agent
125128 pub model : ModelId ,
126129
127- // Human-readable description of the agent's purpose
128- pub description : Option < String > ,
129-
130- // Template for the system prompt provided to the agent
130+ /// Template for the system prompt provided to the agent
131131 pub system_prompt : Option < Template < SystemContext > > ,
132132
133- // Template for the user prompt provided to the agent
133+ /// Template for the user prompt provided to the agent
134134 pub user_prompt : Option < Template < EventContext > > ,
135135
136136 /// Tools that the agent can use
@@ -168,16 +168,31 @@ pub struct Agent {
168168 pub max_requests_per_turn : Option < usize > ,
169169}
170170
171+ /// Lightweight metadata about an agent, used for listing without requiring a
172+ /// configured provider or model.
173+ #[ derive( Debug , Default , Clone , PartialEq , Setters , Serialize , Deserialize , JsonSchema ) ]
174+ #[ setters( strip_option, into) ]
175+ pub struct AgentInfo {
176+ /// Unique identifier for the agent
177+ pub id : AgentId ,
178+
179+ /// Human-readable title for the agent
180+ pub title : Option < String > ,
181+
182+ /// Human-readable description of the agent's purpose
183+ pub description : Option < String > ,
184+ }
185+
171186impl Agent {
172187 /// Create a new Agent with required provider and model
173188 pub fn new ( id : impl Into < AgentId > , provider : ProviderId , model : ModelId ) -> Self {
174189 Self {
175190 id : id. into ( ) ,
191+ title : Default :: default ( ) ,
192+ description : Default :: default ( ) ,
176193 provider,
177194 model,
178- title : Default :: default ( ) ,
179195 tool_supported : Default :: default ( ) ,
180- description : Default :: default ( ) ,
181196 system_prompt : Default :: default ( ) ,
182197 user_prompt : Default :: default ( ) ,
183198 tools : Default :: default ( ) ,
0 commit comments