synthiaresearch 0.1.2

Rust SDK for the Synthia API
Documentation
# synthiaresearch (Rust)

Rust SDK for the Synthia API — adversarial conversational evals for AI agents.

Synthia interviews your agent to model its users, generates a calibrated dataset
of adversarial scenarios, plays each one in a deterministic simulator, and judges
every rollout. Your agent runs on your infrastructure; only replies and traced
tool calls cross the wire.

The same package name ships on all three registries — `synthiaresearch` on
[crates.io](https://crates.io/crates/synthiaresearch),
[npm](https://www.npmjs.com/package/synthiaresearch), and
[PyPI](https://pypi.org/project/synthiaresearch/) — and the SDKs mirror each
other: same methods, same request bodies, same server contract.

## Status

The client is here: `Synthia`, seeds/user models/datasets/rollouts/traces,
`ToolSandbox`, and job polling. The one piece the JS and Python packages have
that this does not is the `synthia` CLI — Rust has no runtime module loading, so
a binary installed from crates.io cannot import your agent. Drive runs from your
own `main` instead; see the API reference.

## Install

```bash
cargo add synthiaresearch
```

Requires Rust 1.86+. The client is async and expects a
[Tokio](https://tokio.rs) runtime.

## Quickstart

```rust
use synthiaresearch::{EvalOptions, Synthia, SynthiaOptions};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let mut client = Synthia::new(SynthiaOptions::default())?; // reads SYNTHIA_API_KEY
    client.ready().await?;

    let outcome = client.run(&my_agent, EvalOptions::default()).await?;
    println!("{:?}", outcome.pass_rate);
    Ok(())
}
```

Payload types for every schema are generated from the same OpenAPI contract the
JavaScript and Python SDKs generate from, so all three stay in lockstep. Two
deliberate properties of those types:

- **Enums are open.** A status value this SDK predates deserializes to
  `Other(String)` rather than failing the whole response, matching how the
  TypeScript and Python SDKs tolerate a newer server.
- **Unknown fields are ignored,** and structs are `#[non_exhaustive]`, so a
  server-side field addition is never a breaking change.

## Documentation

- [API reference]https://github.com/SynthiaResearch/synthia-sdk/blob/main/docs/reference/README.md
- [CI integration]https://github.com/SynthiaResearch/synthia-sdk/blob/main/docs/ci.md
- [Source]https://github.com/SynthiaResearch/synthia-sdk

## License

MIT