The Dema Agent is an AI-powered analytics assistant built into the Dema platform. It can answer questions about your data, create visualizations, build dashboards, manage segments, and run specialized analyses — all through natural conversation.
How the agent works
When you start a conversation, the Dema Agent uses your merchant context (currency, timezone, storefronts, available data) along with any instructions and skills you’ve enabled to tailor its behavior.
The agent has access to a suite of tools that let it:
- Query your data and generate charts
- Create and manage dashboards
- Build and update product segments and labels
- Execute Python code for advanced analysis
- Research the web for market context
- Run Marketing Mix Model (MMM) analyses
Specialized agents
Behind the scenes, the Dema Agent operates as a hub-and-spoke system with specialized sub-agents:
| Agent | Specialty |
|---|
| Dema Agent | Main orchestrator — handles most data analysis, reporting, and general questions |
| Segmentation Agent | Product segment and label management |
| Dashboard Agent | Dashboard creation and editing |
| Web Research Agent | External web research and market intelligence |
| MMM Agent | Marketing Mix Modeling analysis and scenario planning |
The main Dema Agent automatically hands off to a specialized agent when the task requires it, and returns control once the sub-task is complete. This happens transparently — you simply ask your question and the right agent handles it.
Conversations
Every interaction with the agent happens inside a conversation. Conversations are persistent — you can return to a previous conversation and pick up where you left off.
Starting a conversation
Navigate to the Agents section in the Dema app. You’ll land on a blank conversation where you can type your question or request.
Conversation memory
Within a conversation, the agent remembers:
- Previous messages and context
- Data it has fetched or computed
- Dashboards, segments, or other artifacts it has created
For best results, keep related questions in the same conversation so the agent can build on previous context. Start a new conversation when switching to an unrelated topic.
Instructions
Instructions (also called system prompts) are always-on directives that shape the agent’s behavior across all conversations. When an instruction is enabled, its full content is injected into every conversation.
What instructions are good for
- Communication preferences (language, tone, level of detail)
- Company-specific guidelines (“Always report in EUR”, “Use fiscal year starting April 1”)
- Formatting rules (“Show tables with percentages rounded to one decimal”)
- Standard operating procedures the agent should always follow
Managing instructions
Go to Agents → Settings → Instructions to view and manage your instructions.
| Tab | Contents |
|---|
| My instructions | Instructions you’ve created (private to you) |
| Organization instructions | Instructions shared with your organization |
From this page you can:
- Create a new instruction — give it a name and write the content in Markdown
- Toggle an instruction on or off — disabled instructions are not sent to the agent
- Edit or delete instructions you own
- View organization instructions and toggle them for your account
Instructions are injected into the agent’s context window on every message. Keep them concise — a few well-written sentences are more effective than long documents.
Visibility
| Visibility | Who can see it | Who can edit it |
|---|
| Private | Only you | Only you |
| Organization | Everyone in your organization | Only the creator |
The agent has access to a variety of tools that it selects automatically based on your request. You don’t need to invoke tools manually — just describe what you need and the agent picks the right tool.
| Tool | What it does |
|---|
| Data query | Fetches metrics and dimensions from your Dema data |
| Python executor | Runs sandboxed Python code for advanced calculations and visualizations |
| Memory | Stores and retrieves data within a conversation for follow-up analysis |
| Dashboard tools | Creates, updates, and manages dashboard widgets |
| Segment tools | Creates and manages product segments and labels |
| Expert feedback | Asks you clarifying questions when the request is ambiguous |
| Tool | What it does |
|---|
| Use skill | Loads the full content of an enabled skill to guide the agent’s behavior |
| Create skill | Creates a new skill from the conversation (see Skills guide) |
Best practices
Writing effective prompts
- Be specific — “Show me revenue by channel for the last 4 weeks” works better than “How is revenue doing?”
- Provide context — “Compare this to the same period last year” helps the agent frame the analysis
- Iterate — Start with a broad question, then drill down in follow-up messages
- Reference previous results — “Break that down by market” keeps the agent in context
Getting the most from instructions
- Keep them short — Every enabled instruction uses context window space
- Be directive — “Always include a summary table” is clearer than “It would be nice to have tables”
- Test and iterate — Enable an instruction, run a few conversations, then refine the wording
- Disable what you don’t need — Only keep active instructions that consistently improve your experience
If you find yourself giving the same guidance to the agent across multiple conversations, that’s a good candidate for an instruction or a skill.