KyroActor Overview
Simulate human conversations with personality-driven AI actors. Automate end-to-end testing of your conversational AI agents.
@kyro/actor is a human conversation simulator. It creates AI-powered actors that roleplay as human users with defined personalities, following scripted scenarios against your live agents.
Use case
Traditional unit tests for AI agents test prompts in isolation. KyroActor tests the full conversation loop: send a message, wait for the agent's response, evaluate criteria, generate a contextually appropriate follow-up, and repeat — until success/failure/max turns.
How it works
- Load a personality YAML (name, role, background, traits, communication style)
- Load a scenario YAML (first message, max turns, success/failure criteria, exit conditions)
- Connect to your agent via a
Connection(WebSocket or LangChain) - Run the conversation loop:
- Send the first message
- Wait for the agent response
- Check success/failure/exit criteria
- Generate the next actor message via the AI provider
- Repeat
Install
Return value
actor.run() returns a Transcript: