| Crates.io | sacp-tokio |
| lib.rs | sacp-tokio |
| version | 11.0.0-alpha.1 |
| created_at | 2025-11-05 00:58:56.987257+00 |
| updated_at | 2026-01-19 18:49:35.187403+00 |
| description | Tokio-based utilities for SACP (Symposium's extensions to ACP) |
| homepage | |
| repository | https://github.com/symposium-dev/symposium-acp |
| max_upload_size | |
| id | 1917223 |
| size | 69,545 |
Tokio-specific utilities for working with ACP agents.
This crate provides helpers for spawning and connecting to ACP agents using the Tokio async runtime:
AcpAgent - Configuration for spawning agent processesJrConnectionExt - Extension trait that adds JrConnection::to_agent() for easy agent spawningThe main use case is spawning an agent process and creating a connection to it in one step:
use sacp::JrConnection;
use sacp_tokio::{AcpAgent, JrConnectionExt};
let agent = AcpAgent::from_str("python my_agent.py")?;
JrConnection::to_agent(agent)?
.on_receive_notification(|notif: SessionNotification, _cx| async move {
println!("Agent update: {:?}", notif);
Ok(())
})
.run_until(|cx| async move {
// Initialize and interact with the agent
let response = cx.send_request(InitializeRequest { ... })
.block_task()
.await?;
Ok(())
})
.await?;
The agent process is managed automatically - it's spawned when you call to_agent(),
and killed when the connection is dropped.
Use sacp-tokio when you need to:
If you're implementing an agent that listens on stdin/stdout, you only need the core sacp crate.
MIT OR Apache-2.0