Copy this into your coding agent
Paste into Cursor, Codex, Claude Code, or another coding agent in your project.The Rust SDK is a preview. Use the installation source provided in Bench.
The crate is
trybench-sdk, imported as trybench_sdk.Record one interaction
Choose Rust on the SDK setup page. Use Rust 1.88 or later and a Tokio async application.Wrap your application
Replace the callback with a Rig or custom application operation. Outputs must implementserde::Serialize. Pass Some(&context) to child traces and use
.kind("TOOL") for tools. Context is explicit, so concurrent requests remain separate.
For streaming, keep a start_span guard open while reading the stream. Call
set_output on success, set_error on failure, then end. Dropping an unfinished
guard records an error without capturing the exception message.
Content capture defaults to off. Set capture_content = true and provide
SpanInput::input(...) when needed. Built-in filters run before sending; use
Options.redact to remove extra application fields. See privacy and redaction.
Await flush() at request boundaries and shutdown() after active requests finish.
Delivery retries once, then counts the events in stats().dropped.
Set SpanInput.component_id to a real Bench prompt component for
production checks. This crate provides tracing.
Automatic framework adapters and native application evaluation helpers are coming soon.

