AI Chat — User Guide
Audience: All Dagen users who want to interact with AI agents to build pipelines, explore data, and manage infrastructure through natural conversation.
Overview
The AI Chat page (/chat) is the primary interface for interacting with Dagen's AI agents.
Agent behaviour in this UI is shaped by Agent Intelligence & Skills—instructions, skills (including read_skill), rules, and lessons configured at /agent-intelligence. For AI review of GitHub PRs (separate from chat), see Git Reviews. You can ask questions in plain English, attach files for context, and watch agents execute multi-step data engineering tasks on your behalf.
| Feature | Description |
|---|---|
| Multi-agent selection | Choose from built-in agents (Super Agent, DBT, Spark, etc.) or your own custom agents |
| Model picker | Select the underlying AI model (Claude, Gemini, GPT, etc.) per conversation |
| Execution modes | Control how much autonomy the agent has |
| Canvas | Side panel where agents display visualizations, execution plans, and data previews |
| File attachments | Upload documents, images, SQL, CSV, and more as conversation context |
| Destructive-op consent | Safety gate that requires your approval before DROP, DELETE, or ALTER operations |
Layout (what you see on /chat)
The chat experience is split into a main conversation column and a control column (on smaller screens these may stack).
Main column (conversation)
- Prompt suggestions — One-click starters to kick off common tasks; choosing one sends the text as your message.
- Chat history — Scrollable thread; shows loading while past messages are fetched. While the agent works, the UI reflects waiting for response. New messages auto-scroll into view.
- Chat input — Compose and send; disabled while a response is streaming so you do not interleave partial runs.
Control column (right)
- Agent selector — Pick from available agents (built-ins + custom). Shows loading or error if the agent list fails to load. The selected agent is highlighted.
- Model selector — Pick the LLM backing the agent from models your admin configured (Model Settings). Disabled during streaming.
- Task history — Past sessions for the selected agent only:
- Regenerate title — When a session is active, ask for a new title based on the conversation.
- New chat — Clear thread and start fresh (disabled if no agent or while processing).
- Session list — Each row shows title (or fallback like “Session [id]”) and last updated time; click to load that session’s transcript.
If no agent is selected, history explains that you must pick an agent first.
Streaming: what can appear in the transcript
Chat uses server-sent events (streaming). Besides final answers, you may see:
| Stream element | Meaning |
|---|---|
| Thought | Agent “thinking” / planning text (useful in Guided/Semi). |
| Tool start / tool end | The agent invoked a tool (query, pipeline action, etc.) and finished it. |
| Stream chunks | Token-by-token (or segment) text of the reply. |
| Stream end | Response complete; session id may be assigned or updated. |
| Error | Failure from agent or transport—read the message; retry or narrow the ask. |
You can stop a long run from the UI when available—closing the stream avoids leaving orphaned client state.
Starting a Conversation
- Open AI Chat from the navigation menu (or press
/to navigate to/chat). - Click Select Agent in the toolbar to choose which agent to talk to.
- Super Agent is the default — it delegates tasks to specialist sub-agents automatically.
- Other options include the DBT Agent, Spark Developer, Metadata Discovery, and any custom agents you have created.
- Click Select Model to pick the AI model. Each model has a provider label (e.g., "Anthropic", "Google").
- Type your message in the input box at the bottom (placeholder: "Type something...") and press Enter or click the send arrow.
Execution Modes
The execution mode slider sets how much the agent proceeds without asking. The value is sent to the backend as execution_mode: user_guided, semi_autonomous, or autonomous. Semi-autonomous is the typical default.
| Position | API value | Label | Behaviour |
|---|---|---|---|
| Guided | user_guided |
Guided | Agent presents options and rationale at decision points; you stay in control. |
| Semi | semi_autonomous |
Semi | Agent handles routine decisions; surfaces architectural or critical choices for your review. |
| Auto | autonomous |
Auto | Agent runs end-to-end with minimal interruption; you step in mainly for exceptions or policy issues. |
Drag the slider in the toolbar to switch modes at any time during a conversation.
Safety: Destructive SQL (e.g. DROP, DELETE) is evaluated by guards; the stream may emit a consent step before execution. Prefer Guided or Semi on unfamiliar schemas or dangerous operations. For mature automation, Auto works best together with Agent Intelligence rules and lessons.
Adding Context
Click the + button next to the message input (or the paperclip icon) to attach context:
| Context Type | What It Does |
|---|---|
| Database Connection | Attaches a database connection so the agent can query and explore it |
| Pipeline | Links a data pipeline (dbt, Spark, Data Model) for the agent to work on |
| Workflow | Attaches a workflow for orchestration tasks |
| Data Ingestion | Connects an Airbyte ingestion job |
| Upload Documents | Attaches files directly to the message |
File Attachments
You can drag and drop files onto the chat or use the paperclip icon. Supported formats:
| Category | Extensions |
|---|---|
| Images | .jpg, .jpeg, .png, .gif, .webp |
| Documents | .txt, .md, .pdf, .doc, .docx, .json, .csv, .yml, .yaml, .html, .css, .xml |
| Code | .py, .js, .ts, .sql |
- Maximum file size: 20 MB per file
- Maximum attachments: 10 files per message
Session Management
Your conversations are saved automatically.
- New Chat: Click the New button (plus icon) in the sidebar header to start a fresh session.
- History: Click Show History in the sidebar to browse previous conversations, listed under Recent Tasks.
- Regenerate Title: Hover over a session in the sidebar and click the refresh icon to regenerate its title.
- Resume: Click any session in the history list to continue where you left off.
If no agent is selected, the sidebar shows "Select an agent to see history."
Agent Canvas
The Canvas is a side panel where agents display rich artifacts during a conversation. Click the canvas toggle button in the toolbar to show or hide it.
Artifact types that may appear:
| Artifact | When It Appears |
|---|---|
| Execution Plan | When the agent outlines a multi-step plan before executing |
| Data Preview | When the agent queries data and shows results in a table |
| Progress Tracker | During long-running operations to show step-by-step progress |
| Success / Error | After an operation completes or fails |
- Use the Layout button to switch between stack, grid, and focus views.
- Use the Clear all button to dismiss all artifacts.
When the canvas is empty, it shows "AI visualizations will appear here" with a hint: "Ask the agent to create pipelines, analyze data, or explore schemas."
Destructive Operation Consent
When an agent is about to execute a potentially dangerous SQL statement (DROP TABLE, DELETE, ALTER, etc.), a consent dialog appears.
The dialog shows:
- Operation type in the title (e.g., "Destructive Operation — DROP TABLE")
- A warning message explaining what will happen
- Affected Objects — the tables or schemas impacted
- SQL Statement — the exact SQL that will be executed
- Severity level and Database type
You have two choices:
| Button | Action |
|---|---|
| Deny | Cancels the operation — nothing is executed |
| Approve & Execute | Runs the SQL statement |
Consent flows align with Guided and Semi modes; Auto still respects destructive-operation guards where configured.
Tips for Effective Prompting
- Be specific: "Create a dbt model that joins orders and customers on customer_id" works better than "make a model."
- Mention your database: Attach a database connection as context so the agent knows which schema to target.
- Use follow-ups: The agent retains full session context, so you can say "now add a filter for active users" without repeating yourself.
- Attach files: Upload a CSV to have the agent analyze it, or attach a SQL file for the agent to review and fix.
- Start with Guided mode for unfamiliar operations, then switch to Semi or Auto once you are comfortable.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| "Please select an agent first to start chatting" | No agent is selected | Click Select Agent in the toolbar and choose an agent |
| Agent responds but does not execute anything | Execution mode is set to Guided and the agent is waiting for confirmation | Reply with "yes" or "proceed" to continue |
| Canvas is blank | No artifacts have been generated yet | Ask the agent to create a pipeline or analyze data |
| File upload fails | File exceeds 20 MB or unsupported format | Reduce file size or convert to a supported format |
| Agent appears stuck (spinner keeps spinning) | Long-running operation or backend timeout | Click the stop button (square icon) to cancel, then retry |