# CAMEL Role-Playing

> Instantiate two agents as AI-User and AI-Assistant with inception prompts — they converse autonomously until the task is solved or the turn budget runs out.

- **Category**: Agentic AI
- **Subcategory**: Multi-Agent
- **Canonical URL**: https://designpattern.fyi/patterns/camel_role_playing/

---

## Description
**Intent**: Have two agents role-play a user-assistant interaction to autonomously complete a task neither could solve alone.
**Context**: You want an autonomous system to carry out a task that would naturally unfold as collaboration between a goal-setter and an executor — a product owner working with a developer, an instructor working with a learner. There's no real user in the loop; both sides need to be played by agents, and the work has to converge through their interaction.
**Solution**: Use inception prompts to instantiate two agents (AI-User and AI-Assistant) with their roles fixed and the task specified. They converse until the task is completed or the turn budget is exhausted. The output is the final assistant message; the conversation log is the debugging artifact.



## Use Cases
- The task benefits from explicit user-assistant turn-taking that a single agent loop misses.
- Inception prompts can fix the two roles and the task tightly enough to keep the conversation on-track.
- A turn budget caps conversation length so unproductive loops terminate.






## Trade-offs


### Advantages

- Fully synthetic task-solving without any human-in-the-loop overhead.

- Useful for generating training data from autonomous agent interactions.




### Considerations & Drawbacks

- 2× inference cost per task — both sides burn tokens.

- Role drift over long conversations; agents can lose track of their fixed personas.







---
**Reference**: [Original Source](https://www.agentpatternscatalog.org/patterns/camel-role-playing/)

