AGiXT Rust SDK
This is the official Rust SDK for AGiXT, providing a type-safe way to interact with the AGiXT API.
Features
- Full API coverage for AGiXT
- Async/await support using Tokio
- Type-safe request and response handling
- Comprehensive error handling
- Built-in support for authentication and session management
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Quick Start
use AGiXTSDK;
async
Authentication
use AGiXTSDK;
async
Core Features
Providers
// Get all available providers
let providers = client.get_providers.await?;
// Get providers for a specific service
let chat_providers = client.get_providers_by_service.await?;
// Get provider settings
let settings = client.get_provider_settings.await?;
Agents
// Create a new agent
client.add_agent.await?;
// Get agent configuration
let config = client.get_agent_config.await?;
// Update agent settings
use HashMap;
let mut settings = new;
settings.insert;
client.update_agent_settings.await?;
Conversations
// Create a new conversation
let conversation = client.new_conversation.await?;
// Add a message to the conversation
client.new_conversation_message.await?;
// Get conversation history
let history = client.get_conversation.await?;
Error Handling
The SDK uses a custom error type that covers various error cases:
All methods return a Result<T, Error> type, allowing for proper error handling:
match client.get_providers.await
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.