AI agent simulation framework — test and ship with confidence
Project description
Synkro
Synkro reads your policy documents, auto-generates diverse test scenarios, runs multi-turn conversations against your agent with a simulated user, and verifies every response against the policy rules. No hand-written test cases. No manual review.
Installation
pip install synkro
Simulate Your Agent
import synkro
def my_agent(messages):
resp = openai.chat.completions.create(model="gpt-4o", messages=messages)
return resp.choices[0].message.content
results = synkro.simulate(
agent=my_agent,
policy="All refunds require a receipt. Max refund is $500.",
scenarios=10,
turns=3,
)
print(results.pass_rate) # 0.85
print(results.passed) # 8 of 10 passed
for r in results:
if not r.passed:
print(r.scenario.description, r.issues)
Works with any agent — just pass a callable that takes messages and returns a string. Sync or async.
Generate Training Data
Use the same pipeline to generate training datasets for fine-tuning:
import synkro
dataset = synkro.generate(
"All refunds require a receipt. Max refund is $500.",
traces=100,
)
dataset.save("training.jsonl")
Or use the CLI:
synkro generate policy.pdf --traces 50
# Quick demo with built-in policy
synkro demo
Features
- Agent simulation — Test agents against auto-generated, policy-grounded scenarios
- Policy verification — Every conversation verified for rule compliance, contradictions, hallucinations
- Training data generation — Conversation, Instruction, Evaluation, and Tool Calling datasets
- Coverage tracking — Track scenario diversity like code coverage, identify gaps
- Any LLM — OpenAI, Anthropic, Google, Ollama, vLLM
- Any document — PDF, DOCX, TXT, Markdown, URLs
Documentation
Full documentation at synkro.sh/docs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synkro-0.5.76.tar.gz.
File metadata
- Download URL: synkro-0.5.76.tar.gz
- Upload date:
- Size: 395.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7913532ee089e2af520b952914c6bd3d558f16e625130a2c02434e7c92e2a26
|
|
| MD5 |
84b6ac10d13fa938c4cc432a96c2f058
|
|
| BLAKE2b-256 |
74d98518c150ba262da2a6be9f0840d0c59fb3bede2144bf9022f1195d1b8950
|
File details
Details for the file synkro-0.5.76-py3-none-any.whl.
File metadata
- Download URL: synkro-0.5.76-py3-none-any.whl
- Upload date:
- Size: 353.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
192e9aa81309e062b50ae738c7d078e4e7907879f5750d8e655db0c881adf711
|
|
| MD5 |
eb44a77ec972b0bd8c277423315fdb55
|
|
| BLAKE2b-256 |
96b113cad9db682e78d3568f638885fd3fcdb5dd08567aacb9a1129ff1dd5132
|