Role Creator
The Role Creator generates production-ready system prompts for AI assistants. Describe the persona you want, and the operator uses a meta-prompt architecture with optional few-shot examples to craft a detailed, structured system message. The generated role can be pushed directly to an Agent LOP for immediate use.
Key Features
Section titled “Key Features”- Meta-prompt architecture — uses a customizable meta-prompt to instruct the LLM on how to generate high-quality system prompts
- Few-shot examples — includes editable example personas to guide the LLM’s output style and structure
- Quality level control — scales output from concise (2-3 paragraphs) to comprehensive (10+ paragraphs)
- Tool-aware generation — reads tool definitions from a target Agent and incorporates tool usage guidance into the generated role
- Direct agent integration — pushes the generated role to an Agent LOP via DAT reference or text copy
Input/Output
Section titled “Input/Output”Inputs
Section titled “Inputs”None. The operator is configured entirely through its parameter panel.
Outputs
Section titled “Outputs”- Output — the generated system prompt text
- History — a log of all generations with timestamps, token usage, model, response time, and the full output
- Meta Prompt — the meta-prompt template used to instruct the LLM (editable)
- Examples — the few-shot example roles included when Use Examples is enabled (editable)
- Info — usage instructions and tips
Use the Display menu on the Role Creator page to switch the node viewer between these outputs.
Usage Examples
Section titled “Usage Examples”Generate a Basic Role
Section titled “Generate a Basic Role”- On the Role Creator page, enter a description in the Role Description field. Be specific about capabilities, tone, and constraints — for example: “A technical support specialist for Python programming who gives patient, educational explanations to beginners.”
- Optionally fill in Context Info with additional details like target audience or domain.
- Set Quality Level to control output depth — Concise for quick roles, Comprehensive for extensive guidance with edge cases.
- Pulse Generate Role.
- The generated system prompt appears in the node viewer (set Display to Output).
Push a Role to an Agent
Section titled “Push a Role to an Agent”- On the Role Creator page, set Target Agent to point to your Agent LOP.
- Choose a Copy Mode:
- Reference DAT — the Agent’s system message parameter references the Role Creator’s output DAT, so any future regeneration automatically updates the Agent.
- Copy Text — copies the generated text directly into the Agent’s existing system message DAT.
- Pulse Copy to Agent to push the current output, or enable Auto Copy to push automatically after every generation.
Generate Tool-Aware Roles
Section titled “Generate Tool-Aware Roles”If your target Agent has tool LOPs connected (such as Search, Web Viewer, or custom tools):
- Set the Target Agent parameter to your Agent LOP.
- Enable Include Tool Context.
- Pulse Generate Role. The operator reads all tool definitions from the Agent’s tool sequence and includes them in the generation prompt, so the resulting system message contains guidance on when and how to use each tool.
Best Practices
Section titled “Best Practices”- Be specific in your description. “A helpful assistant” produces generic output. “A concise code reviewer for Python and TypeScript who flags security issues and suggests performance improvements” produces a much more effective role.
- Use Context Info for audience and constraints. Separate the “what” (Role Description) from the “who and where” (Context Info) for cleaner generation.
- Start with Balanced quality and move to Detailed or Comprehensive only when the role needs extensive edge-case handling.
- Edit the Meta Prompt to change how roles are generated globally. Switch Display to Meta Prompt to view and edit the template directly.
- Edit the Examples to steer output style. Switch Display to Examples to view and modify the few-shot examples. Toggle Use Examples off if you prefer zero-shot generation.
- Use Reference DAT copy mode for iterative workflows — regenerate the role and the Agent picks up the new version automatically without manual copying.
Troubleshooting
Section titled “Troubleshooting”- Empty output after pulsing Generate Role — check that Role Description is not empty. The operator skips generation if the description field is blank.
- “Could not determine API Server or Model” in the logger — verify your model configuration on the Model page. Ensure an API server is selected and a model is chosen.
- Copy to Agent does nothing — confirm the Target Agent parameter points to a valid Agent LOP. The target must have a
Systemmessagedatparameter (all Agent LOPs do). - Tool context section is empty — the target Agent must have tool LOPs connected and active in its tool sequence. Verify tools are wired and not disabled on the Agent.
Parameters
Section titled “Parameters”Role Creator
Section titled “Role Creator”op('role_creator').par.Status Str Current operator status
- Default:
"" (Empty String)
op('role_creator').par.Active Toggle Indicates if generation is in progress
- Default:
False
op('role_creator').par.Generate Pulse Generate the AI role definition
- Default:
False
op('role_creator').par.Roledescription Str Describe the AI role, capabilities, tone, and constraints in detail
- Default:
"" (Empty String)
op('role_creator').par.Contextinfo Str Additional context: domain expertise, use cases, target audience
- Default:
"" (Empty String)
op('role_creator').par.Useexamples Toggle Include example roles for few-shot learning
- Default:
False
op('role_creator').par.Targetagent OP Agent operator to receive the generated role
- Default:
"" (Empty String)
op('role_creator').par.Copytoagent Pulse Copy generated role to target agent
- Default:
False
op('role_creator').par.Autocopy Toggle Automatically copy to agent after generation
- Default:
False
op('role_creator').par.Includetoolcontext Toggle Include tool definitions from target agent to create tool-aware system prompts
- Default:
False
op('role_creator').par.Examplesdat OP DAT containing example role definitions
- Default:
"" (Empty String)
op('role_creator').par.Metapromptdat OP DAT containing the meta-prompt template
- Default:
"" (Empty String)
op('role_creator').par.Maxtokens Int - Default:
256- Range:
- 0 to 1
- Slider Range:
- 16 to 4096
op('role_creator').par.Temperature Float - Default:
0.0- Range:
- 0 to 1
- Slider Range:
- 0 to 1
op('role_creator').par.Modelcontroller OP - Default:
"" (Empty String)
op('role_creator').par.Search Toggle - Default:
False
op('role_creator').par.Modelsearch Str - Default:
"" (Empty String)
Provider Model Documentation
Consult the documentation for your chosen provider to find supported models, API key information, and usage limits.
View LiteLLM Supported Providers →
Changelog
Section titled “Changelog”v2.0.02025-12-06
## Complete Rewrite
This is a complete rewrite of the role generation operator with a focus on transparency and user configurability. Previous versions are archived in custom_operators/role_creator/archive/.
Core Features
- Meta Prompt System - Fully editable meta-prompt DAT controls all generation instructions
- Few-Shot Examples - Editable examples DAT for customizing generation style
- Quality Levels - Concise, Balanced, Detailed, Comprehensive output options
- Tool Context Integration - Include agent tool definitions for tool-aware system prompts
- Agent Integration - Direct copy to target agent with reference or text modes
- Generation History - Full history table with complete description and output (no truncation)
Design Principles
- Full Transparency - All generation bias is in user-editable DATs, not hidden in code
- No Truncation - History stores complete inputs and outputs
- Single Page UI - All parameters on one "Role Creator" page with clear sections
- Async Generation - Non-blocking API calls via ChatTD
Parameter Layout (Role Creator page)
1. Status section - Status (readonly, expression-linked), Active
2. Actions section - Generate Role
3. Input section - Role Description, Context Info, Quality Level
4. Generation Options - Use Examples
5. Agent Integration - Target Agent, Copy to Agent, Auto Copy, Copy Mode, Include Tool Context
6. Display section - Output/History/MetaPrompt/Examples/Info viewer selector
7. Advanced section - Examples DAT, Meta Prompt DAT references
Editable DATs
meta_prompt_dat- Complete control over generation instructionsexamples_dat- Few-shot examples for style guidanceinfo_dat- Help textoutput_dat- Generated role output