Skip to main content
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:
AgentSpecialty
Dema AgentMain orchestrator — handles most data analysis, reporting, and general questions
Segmentation AgentProduct segment and label management
Dashboard AgentDashboard creation and editing
Web Research AgentExternal web research and market intelligence
MMM AgentMarketing 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.
TabContents
My instructionsInstructions you’ve created (private to you)
Organization instructionsInstructions shared with your organization
From this page you can:
  1. Create a new instruction — give it a name and write the content in Markdown
  2. Toggle an instruction on or off — disabled instructions are not sent to the agent
  3. Edit or delete instructions you own
  4. 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

VisibilityWho can see itWho can edit it
PrivateOnly youOnly you
OrganizationEveryone in your organizationOnly the creator

Tools

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.

Core tools

ToolWhat it does
Data queryFetches metrics and dimensions from your Dema data
Python executorRuns sandboxed Python code for advanced calculations and visualizations
MemoryStores and retrieves data within a conversation for follow-up analysis
Dashboard toolsCreates, updates, and manages dashboard widgets
Segment toolsCreates and manages product segments and labels
Expert feedbackAsks you clarifying questions when the request is ambiguous

Skill tools

ToolWhat it does
Use skillLoads the full content of an enabled skill to guide the agent’s behavior
Create skillCreates a new skill from the conversation (see Skills guide)

Best practices

Writing effective prompts

  1. Be specific — “Show me revenue by channel for the last 4 weeks” works better than “How is revenue doing?”
  2. Provide context — “Compare this to the same period last year” helps the agent frame the analysis
  3. Iterate — Start with a broad question, then drill down in follow-up messages
  4. Reference previous results — “Break that down by market” keeps the agent in context

Getting the most from instructions

  1. Keep them short — Every enabled instruction uses context window space
  2. Be directive — “Always include a summary table” is clearer than “It would be nice to have tables”
  3. Test and iterate — Enable an instruction, run a few conversations, then refine the wording
  4. 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.