Crates.io | openagent |
lib.rs | openagent |
version | 0.1.10 |
created_at | 2025-06-26 16:31:33.247698+00 |
updated_at | 2025-08-07 07:38:56.635666+00 |
description | OpenAI Agent Kit |
homepage | https://hack.ink/openagent |
repository | https://github.com/hack-ink/openagent |
max_upload_size | |
id | 1727549 |
size | 252,957 |
A comprehensive Rust library providing type-safe, async interfaces to OpenAI APIs and advanced agent development capabilities. Build powerful AI applications with support for chat completions, embeddings, file operations, batch processing, and Model Context Protocol (MCP) integration.
🚀 Complete OpenAI API Coverage
🔧 Developer Experience
🎯 Agent Development
Set up your environment:
export OPENAI_API_KEY="your-api-key-here"
The library provides comprehensive examples for all supported APIs. Check out the examples/
directory for complete, runnable code:
chat.rs
- Chat completions with streaming supportembedding.rs
- Text embeddings generationfile.rs
- File upload and managementbatch.rs
- Batch processing for cost optimizationresponse.rs
- Advanced response API with real-time streamingmcp.rs
- Model Context Protocol integrationRun any example with:
cargo run --example chat
cargo run --example response
cargo run --example embedding
# ... etc
The library is organized into several key modules:
api/
- Core API implementations for different OpenAI endpoints
chat.rs
- Chat completions API with streaming supportembedding.rs
- Text embeddings generationfile.rs
- File upload and managementbatch.rs
- Batch processing operationsresponse.rs
- Advanced response API with real-time streamingtype.rs
- Common types and utilitieshttp.rs
- HTTP client abstraction with retry logic and streaming
mcp.rs
- Model Context Protocol integration
tool.rs
- Function calling and tool execution framework
agent.rs
- High-level agent abstraction (work in progress)
error.rs
- Comprehensive error handling
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)If you find this project helpful and would like to support its development, you can buy me a coffee!
Your support is greatly appreciated and motivates me to keep improving this project.
bc1pedlrf67ss52md29qqkzr2avma6ghyrt4jx9ecp9457qsl75x247sqcp43c
0x3e25247CfF03F99a7D83b28F207112234feE73a6
156HGo9setPcU2qhFMVWLkcmtCEGySLwNqa3DaEiYSWtte4Y
Thank you for your support!
We would like to extend our heartfelt gratitude to the following projects and contributors:
Special thanks to the following projects and technologies that make OpenAgent possible:
This project follows the principles of open-source development and aims to contribute back to the Rust ecosystem by providing a reliable, type-safe, and performant library for AI application development.
Licensed under GPL-3.0.