Installation
requests >= 2.28.0, pydantic >= 2.0.0.
Initialize the SDK
Complete workflow
The example below runs a full simulation and hardening cycle for an agent.Resources
Each resource is accessible as a property on theASIMEngine instance.
| Resource | Description | Key methods |
|---|---|---|
engine.environments | Manage isolated test environments | create(), get(), list_by_agent(), delete() |
engine.personas | Define or generate user archetypes | create(), list(), generate(), delete() |
engine.scenarios | Define or generate task types | create(), list(), generate(), delete() |
engine.simulations | Manage synthetic test conversations | create(), list(), get(), update(), delete(), generate() |
engine.evaluations | Run evaluations and retrieve scores | create(), list(), get() |
engine.jobs | Track the status of async operations | get_status(), list(), cancel(), get_evaluation_status() |
engine.evaluation_runs | Access RL training rounds | get(), list(), get_round(), sync_round() |
engine.hardening | Analyze failures and improve agent instructions | harden_agent(), continue_run() |
Agent hardening
harden_agent() analyzes failures from a completed evaluation round and returns the original and improved agent configurations. Pass evaluation_ids to target specific failures, or omit it to analyze all failures from the round.
continue_run() starts a new evaluation round (round number + 1) using the improved instructions. Repeat until all simulations pass.