| Crates.io | claude-role-play |
| lib.rs | claude-role-play |
| version | 0.1.0 |
| created_at | 2025-12-23 03:46:28.501221+00 |
| updated_at | 2025-12-23 03:46:28.501221+00 |
| description | Two-agent role-play demo - Claude agents with different personas conversing |
| homepage | |
| repository | https://github.com/bartolli/anthropic-agent-sdk |
| max_upload_size | |
| id | 2000715 |
| size | 209,376 |
Two AI agents with distinct personas engage in dynamic, director-controlled conversations.
Drop two Claude agents into a scene - a detective and an artist, rivals at a poker table, old friends reuniting - and watch them improvise. A third agent (Haiku) silently analyzes the emotional dynamics, tracking tension, chemistry, and narrative beats.
You're the director. Whisper notes to individual characters. Crank up the tension. Steer the story. Or sit back and let it unfold.
cargo install claude-role-play
Requires Claude Code CLI installed.
Cost note: This demo runs multiple Claude agents per turn (two conversants + analyzer). Recommended for Claude Pro/Max subscribers. API key usage can accumulate quickly.
claude-role-play \
--persona-a detective.txt \
--persona-b artist.txt \
--name-a "Detective Rourke" \
--name-b "Luna" \
--scene "Investigating a mysterious art heist" \
--turns 4 \
--model sonnet
Model options: opus (most capable), sonnet (default), haiku (fastest/cheapest)
Analyzer model: The semantic analyzer defaults to haiku for cost efficiency. Power users can
override with --analyzer-model sonnet for deeper analysis at higher cost.
Create persona files with character descriptions, or use the included examples from the demos/role-play/personas directory.
| Command | Effect |
|---|---|
/start [N] |
Begin or add N turns |
/say luna "msg" |
Whisper a note to Luna (one-time) |
/tension 8 |
Override tension meter (1-10) |
/heat 3 |
Override heat/chemistry meter (1-5) |
/hitl |
Human-in-the-loop mode (pause after each turn) |
/status |
Show current scene state |
Built with anthropic-agent-sdk to demonstrate that Claude Code can power applications beyond coding. This is a reference implementation for:
See WORKFLOW.md for the complete technical architecture.
MIT