AI Agents API Guide
Learn how to work with AI agents using the Wacht Rust SDK.Prerequisites
Before using any API methods, you must initialize the SDK:List AI Agents
Get all AI agents in your deployment.Basic List
With Filters
Get AI Agent
Retrieve a specific AI agent by ID.Get Agent Details
Retrieve complete details about an AI agent.Create AI Agent
Create a new AI agent with custom configuration.Basic Agent Creation
Agent with Configuration
Update AI Agent
Modify an existing AI agent’s configuration.Delete AI Agent
Permanently delete an AI agent.Builder Methods
ListAgentsBuilder
limit(i32)- Number of results to return (max 100)offset(i32)- Number of results to skipis_active(bool)- Filter by active statussearch(&str)- Search agents by name or description
Request Models
CreateAiAgentRequest
name(String) - Agent name (required)model(String) - Model to use (required)description(Option<String>) - Agent descriptionsystem_prompt(Option<String>) - System instructionstemperature(Option<f64>) - Temperature (0.0 - 2.0)max_tokens(Option<i32>) - Maximum tokens in responsetools(Option<Vec<String>>) - Associated tool IDsknowledge_bases(Option<Vec<String>>) - Associated knowledge base IDs
UpdateAiAgentRequest
All fields are optional - only include what you want to change:name(Option<String>)description(Option<String>)model(Option<String>)system_prompt(Option<String>)temperature(Option<f64>)max_tokens(Option<i32>)tools(Option<Vec<String>>)knowledge_bases(Option<Vec<String>>)is_active(Option<bool>)
Agent Configuration
Agents are configured using direct fields rather than a nested configuration object:Error Handling
All SDK methods return aResult<T, Error>:
Related
- Installation - SDK setup
- Tools Guide - Tool management
- Knowledge Bases Guide - Knowledge base management
- Execution Context Guide - Agent execution
- API Reference - Backend API - Full API docs
