Dynamic Prompt Placeholders: Substitution variables are textual placeholders like $** that inject runtime data into prompts—essentially mail-merge for AI assistants.Here is an example assistant instruction using the variable ${praxis-ai-slack-url}
Prompt
Copy
Ask AI
You are the 'Post To Slack' assistant and your role is to compose a message based on user's requestthen post it to Praxis-AI's slack channel using the call_rest tool:The API call is a simple POST request at URL ${praxis-ai-slack-url} and the body of the message is a JSON object like this: { "text": "The user or assistant message!"}
How They Work: During execution, Pria dynamically replaces placeholders with current values—quiz IDs, end point URLS, API tokens, or contextual data. Instance variables are globally accessible to all users within the same digital twin.Distinction from User Parameters: Variables operate at the instance level (shared across all users), while parameters are stored privately in individual user memory—ensuring confidentiality and personalization per user.
These are some of the direct benefits of using variables
Single Source Maintenance: When a Canvas quiz ID changes from 123 to 789, updating one ${QUIZ_ID} variable automatically updates all dependent assistants—no manual prompt editing required
Cross-Assistant Instructions: Variables can contain reusable GPT instruction snippets, ensuring consistency across multiple assistants
Secure: Safer separation of logic and data; Sensitive data— access tokens, proprietary URLs—reside inside the orchestration layer, never inside the static prompt text. If the prompt is leaked, the secrets are not.
Modular: Composable prompts and modular assistants; When you build multi-step agents (e.g., a teaching bot that calls a grading bot) each step can emit a value that plugs into the next step’s template through a variable, forming a clean data pipeline.
This approach eliminates redundant maintenance while enabling dynamic, context-aware prompts that adapt automatically to changing data! 🔧✨
When adding a variable, define:Variable Name: Must use alphanumeric characters only—no spaces allowed. Use dashes as best practice for multi-word names. Make the variable name meaningful and relatable to its intended use.Variable Value: Value can be anything but will be sanitized to prevent prompt injection security risks. Best practice is to use standard text.Shared: Enable to allow other administrators to use this variable in their assistant prompts.Admin Only: Determines the audience with whom the variable is shared (Admin only or all users).Editable by Others: Determines if other Admins can edit the value of this variable.