CAMEL Role-Playing
also known as Inception Prompting, AI-User AI-Assistant
Have two agents role-play a user-assistant interaction to autonomously complete a task neither could solve alone.
This pattern helps complete certain larger patterns —
- specialisesRole Assignment★★— Assign each agent a named role (researcher, writer, critic, planner) with a role-specific prompt, tool palette, and acceptance criteria.
Context
A team wants an autonomous system to carry out a task that, if done by humans, would unfold as a collaboration between someone stating goals and someone executing — a product owner working with a developer, an instructor working with a learner. There is no real user in the loop; both sides need to be played by agents, and the work has to converge through their interaction.
Problem
A single-agent loop has no opposite voice to clarify or push back, and tends to mix goal-setting and execution in the same prompt until both blur. An adversarial debate setup is the wrong shape when what is actually wanted is collaborative role-play, not winning an argument. Without fixed roles and a bounded conversation, two free-form agents drift toward sameness, repeat themselves, and never converge on a working artefact.
Forces
- Roles drift toward sameness without inception prompting.
- Conversation length must be bounded.
- Tasks need to be specified as something the role-play can converge on.
Example
A research team wants an agent to design and prototype a small data-pipeline tool, but a single agent loop keeps drifting between requirements and implementation. They cast it as a CAMEL role-play: a 'product owner' agent and a 'developer' agent autonomously play out a user-assistant dialogue, with the product owner stating goals and constraints and the developer iterating. Neither alone could keep the conversation grounded; the role pairing produces working scaffolding without a human in the loop.
Diagram
Solution
Therefore:
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 budget exhausted. The output is the final assistant message; the conversation log is debugging artefact.
What this pattern forbids. The AI-User role may only ask, never answer; AI-Assistant may only answer, never ask user-style questions.
And the patterns that stand alongside it, or against it —
- alternative-toConversational Multi-Agent★— Have agents converse turn by turn until a completion criterion fires; agent roles drive the conversation forward.
- alternative-toAgent Persona Profile★— Treat agent identity as a structured profile object — persona, primary motivator, allowed actions, knowledge bindings — rather than a free-form role sentence in the system prompt.
Neighbourhood
Click any neighbour to follow the language. Scroll to zoom, drag to pan.