
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
A Rust implementation of the Agent-to-Agent (A2A) Protocol, providing a type-safe, idiomatic way to build agent communication systems.
Add to your Cargo.toml
:
[dependencies]
a2a-rs = "0.1.0"
# For HTTP client
a2a-rs = { version = "0.1.0", features = ["http-client"] }
# For HTTP server
a2a-rs = { version = "0.1.0", features = ["http-server"] }
# Full feature set
a2a-rs = { version = "0.1.0", features = ["full"] }
use a2a_rs::{HttpClient, Message};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = HttpClient::new("https://api.example.com".to_string());
let message = Message::user_text("Hello, agent!".to_string());
let task = client.send_task_message("task-123", &message, None, None).await?;
println!("Task created: {:?}", task);
Ok(())
}
use a2a_rs::{HttpServer, Message, Task, A2AError};
use a2a_rs::port::{AsyncTaskHandler, AgentInfoProvider};
struct MyAgent;
#[async_trait::async_trait]
impl AsyncTaskHandler for MyAgent {
async fn handle_message(
&self,
task_id: &str,
message: &Message,
session_id: Option<&str>,
) -> Result<Task, A2AError> {
// Process the message and return updated task
Ok(Task::new(task_id.to_string()))
}
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let server = HttpServer::new(
MyAgent,
AgentInfo::default(),
"127.0.0.1:8080".to_string(),
);
server.start().await?;
Ok(())
}
This library follows a hexagonal architecture pattern:
client
- Client-side functionalityserver
- Server-side functionalityhttp-client
- HTTP client implementationhttp-server
- HTTP server implementationws-client
- WebSocket client implementationws-server
- WebSocket server implementationauth
- Authentication support (JWT, OAuth2, OpenID Connect)sqlx-storage
- SQLx-based persistent storagesqlite
- SQLite database supportpostgres
- PostgreSQL database supportmysql
- MySQL database supporttracing
- Structured logging and tracingfull
- All features enabledSee the examples directory for complete working examples:
Full API documentation is available on docs.rs.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
Unknown package
We found that a2a-rs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.