Ragent is a Rust-based framework designed to facilitate the creation of AI agents capable of interacting with various Large Language Model (LLM) providers and executing tools. This framework is built with extensibility and type safety in mind, providing a robust foundation for AI-driven applications.
- Multi-provider LLM support:
- OpenAI (GPT-4)
- Anthropic (Claude)
- Extensible tool system: Easily add and manage tools.
- Async/await support: Leverage Rust's async capabilities for efficient I/O operations.
- Type-safe tool execution: Ensure safety and correctness in tool operations.
- Built-in error handling: Robust error management for reliable applications.
ragent/
- Core SDK librarysrc/agent.rs
- Agent implementationsrc/client.rs
- LLM client traitssrc/clients/
- LLM provider implementationssrc/tool.rs
- Tool system traitssrc/tools/
- Built-in tools
ragent_test/
- Example application demonstrating the usage of the SDK
- Rust 2021 edition or later
- API keys for supported LLM providers:
- OpenAI API key
- Anthropic API key
-
Clone the repository:
git clone https://github.com/yourusername/ragent.git cd ragent
-
Set up environment variables: Create a
.env
file in theragent_test
directory with your API keys:OPENAI_API_KEY=your_openai_api_key ANTHROPIC_API_KEY=your_anthropic_api_key
-
Build the project: Navigate to the
ragent_test
directory and build the example application:cd ragent_test cargo build
-
Run the example application: Execute the built application to see the framework in action:
cargo run
- Agent Management: Create and manage AI agents with customizable properties such as name, description, and system prompts.
- LLM Integration: Seamlessly interact with multiple LLM providers using a unified client interface.
- Tool Execution: Define and execute tools with type-safe arguments and outputs, ensuring reliable operations.
- Example Application: The
ragent_test
application demonstrates how to use the SDK to perform tasks such as querying LLMs and executing tools.
Contributions are welcome! Please feel free to submit a pull request or open an issue.
This project is licensed under the MIT License. See the LICENSE file for details.