AI agent simulation framework
# Synkro

[](https://pypi.org/project/synkro/)
[](https://pepy.tech/project/synkro)
[](https://www.python.org/downloads/)
[](https://synkro.sh/docs)
[](https://opensource.org/licenses/Apache-2.0)
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
```bash
pip install synkro
```
## Simulate Your Agent
```python
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:
```python
import synkro
dataset = synkro.generate(
"All refunds require a receipt. Max refund is $500.",
traces=100,
)
dataset.save("training.jsonl")
```
Or use the CLI:
```bash
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
- **Google's AI-powered research notebook that ingests your documents and becomes an expert on your content. Generates audio overviews, study guides, FAQs, and interactive discussions from uploaded sources.
Google DeepMind's experimental AI agent that can navigate websites, fill forms, and complete multi-step browser tasks autonomously. Uses Gemini's multimodal understanding to interact with web interfaces.
Google DeepMind's universal AI assistant prototype that can see, hear, and respond in real-time through your device camera and microphone. Demonstrates the future of multimodal AI interaction.
Google Cloud's enterprise platform for building, deploying, and managing AI agents powered by Gemini. Supports multi-agent orchestration, tool integration, and enterprise governance.
Gemini's agentic research capability that autonomously browses the web, synthesizes information from dozens of sources, and produces comprehensive research reports on any topic.
Interactive coding and content creation agent that generates, previews, and iterates on code, documents, and interactive applications in a side panel. Supports HTML/CSS/JS, Python, and more.