| Crates.io | sacp-proxy |
| lib.rs | sacp-proxy |
| version | 3.0.0 |
| created_at | 2025-10-30 10:34:30.876192+00 |
| updated_at | 2025-11-29 04:18:13.110067+00 |
| description | Framework for building SACP proxy components |
| homepage | |
| repository | https://github.com/symposium-dev/symposium-acp |
| max_upload_size | |
| id | 1908017 |
| size | 123,798 |
Framework for building ACP proxy components that extend agent functionality.
Proxies are modular components that sit between an editor and an agent, intercepting and transforming messages. They enable composable agent architectures where functionality can be added without modifying the base agent.
Editor → Proxy 1 → Proxy 2 → Agent
Use cases:
The simplest proxy just forwards messages unchanged:
use sacp::JrConnection;
use sacp_proxy::{AcpProxyExt, McpServiceRegistry};
JrConnection::new(stdout, stdin)
.name("my-proxy")
.provide_mcp(McpServiceRegistry::default()) // Provide MCP services
.proxy() // Enable proxy mode
.serve()
.await?;
To intercept messages, add handlers before calling .proxy():
JrConnection::new(stdout, stdin)
.name("my-proxy")
.on_receive_request_from_successor(|req: PromptRequest, cx| async move {
// Intercept prompts from the successor (agent or next proxy)
println!("Agent received prompt: {:?}", req.prompt);
// Forward unchanged, or modify before forwarding
cx.send_to_predecessor(req)
})
.provide_mcp(McpServiceRegistry::default())
.proxy()
.serve()
.await?;
Predecessor vs Successor:
Messages flow: Predecessor → This Proxy → Successor
Extension Traits:
AcpProxyExt - Adds proxy-specific methods to JrConnectionJrCxExt - Adds forwarding methods (send_to_predecessor, send_to_successor)See the examples/ directory:
minimal.rs - Simplest possible proxywith_mcp_server.rs - Proxy that adds MCP toolsWhen you call .proxy(), the framework:
You only need to handle the messages you want to intercept or transform.
MIT OR Apache-2.0