Protocol Buffer definitions and generated Rust code for the Transducer distributed executor service.
Transducer is a distributed executor system for Claude Code workloads. The name comes from automata theory: a finite-state machine that transforms input into output. Transducer agents connect to an orchestrator and execute work using Claude Code, transforming work assignments into execution results.
Orchestrator (Server) Transducer Agents (Clients)
┌─────────────────────┐ ┌─────────────────────────┐
│ gRPC Server │◄──────►│ gRPC Client │
│ - Push work │ mTLS │ - Register │
│ - Track progress │ │ - Heartbeat │
│ - Collect results │ │ - Execute via Claude │
└─────────────────────┘ └─────────────────────────┘
Add to your Cargo.toml:
[dependencies]
transducer-api = "0.1"use transducer_api::{
TransducerServiceClient, RegisterRequest,
TransducerCapabilities, TransducerMetadata,
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = TransducerServiceClient::connect("http://localhost:4003").await?;
let response = client.register(RegisterRequest {
transducer_id: "my-agent".into(),
capabilities: Some(TransducerCapabilities {
supported_work_types: vec!["fix_issue".into(), "custom".into()],
max_concurrent: 2,
available_tools: vec!["bash".into(), "read".into(), "edit".into()],
can_access_network: true,
can_write_files: true,
model_id: "claude-sonnet-4-20250514".into(),
max_context_tokens: 200_000,
}),
metadata: Some(TransducerMetadata {
hostname: hostname::get()?.to_string_lossy().into(),
region: "local".into(),
..Default::default()
}),
}).await?;
println!("Registered as: {}", response.into_inner().transducer_id);
Ok(())
}use transducer_api::{TransducerService, TransducerServiceServer};
use tonic::{Request, Response, Status};
struct MyOrchestrator;
#[tonic::async_trait]
impl TransducerService for MyOrchestrator {
async fn register(
&self,
request: Request<transducer_api::RegisterRequest>,
) -> Result<Response<transducer_api::RegisterResponse>, Status> {
let req = request.into_inner();
Ok(Response::new(transducer_api::RegisterResponse {
success: true,
transducer_id: req.transducer_id,
error: String::new(),
ttl_secs: 60,
}))
}
// Implement other methods...
}| Method | Description |
|---|---|
Register |
Register a transducer with the orchestrator |
Heartbeat |
Bidirectional stream for health and control signals |
ReceiveWork |
Server-push stream of work assignments |
ReportProgress |
Report execution progress mid-flight |
SubmitResult |
Submit completed work results |
ListTransducers |
List registered transducers (admin) |
GetStats |
Get aggregate statistics (admin) |
Deregister |
Gracefully deregister a transducer |
TransducerCapabilities- Describes what a transducer can doTransducerMetadata- Labels and routing informationWorkAssignment- Work to be executedExecutionConfig- Per-execution configurationTokenUsage- Token consumption metrics
Transducer supports SPIFFE/SPIRE mTLS authentication for zero-trust workload identity. In production:
- Transducers obtain X.509 SVIDs from the local SPIRE agent
- The orchestrator verifies transducer identity via the trust bundle
- All communication is encrypted and mutually authenticated
- transducer-agent - Rust implementation of a transducer agent
MIT OR Apache-2.0