Overview

The AgentListResponse struct represents the response returned when fetching a paginated list of AI agents.

Definition

pub struct AgentListResponse {
    pub data: Vec<AiAgent>,
    pub has_more: bool,
}

Fields

data
Vec<AiAgent>
required
A vector containing the AI agents for the current page. Each agent is represented by an AiAgent struct.
has_more
bool
required
Indicates whether there are more agents available beyond the current page. Used for pagination.

Usage Example

use wacht::api::agents::*;

let options = ListAgentsOptions {
    page: Some(1),
    per_page: Some(10),
    is_active: Some(true),
    search: None,
};

let response = fetch_agents(Some(options)).await?;

println!("Found {} agents", response.data.len());
if response.has_more {
    println!("More agents available on next page");
}

for agent in response.data {
    println!("Agent: {} - {}", agent.name, agent.description);
    println!("  Model: {}", agent.model);
    println!("  Active: {}", agent.is_active);
}

See Also