Chat and the assistant

On this page

“Ask” in the dashboard has two code paths. Plain chat is the chats namespace: the API streams a reply over the full transcripts of the conversations a host attached. The assistant is the agentic namespace: a tool-using loop that runs inside the worker as a package. There is no separate agent service.

For what a host sees, read chat and Ask.

The two paths

Plain chat The assistant
Name in the dashboard “Specific Details” “Agentic” (Beta)
project_chat.chat_mode deep_dive agentic
Package packages/chats packages/agentic
Where the model runs In the API, inside the request In the worker, as a durable workflow
What the model reads The full transcripts of the attached conversations What it fetches with tools
State project_chat, project_chat_message The chat tables, plus project_agentic_run and project_agentic_run_event
Survives a closed page No. The open page saves the reply when it finishes. Yes. The turn runs on the server.

A third mode, overview, is still stored on older chats. Those chats still open, and nothing creates a new one. A chat’s mode is set once and cannot be changed. New chats start as “Specific Details”, and a host opts in to the assistant from the Ask screen.

Both paths need the chat:use policy on the project. See roles and policies in code. On the free tier both share one gate: 2 new chats a month per billing account and 20 user turns per chat. See the free tier in code.

Plain chat

The assistant

How a turn runs

  1. The dashboard creates a run with POST /api/agentic/runs, or adds a message with POST /api/agentic/runs/:run_id/messages. These routes only write the host’s side.
  2. The dashboard opens POST /api/agentic/runs/:run_id/stream. For a queued run that enqueues the agentic.turn job. At most one job per run and turn is queued or running, so two tabs or a reconnect start the turn once.
  3. The worker turns the job into a durable workflow. Each model step is checkpointed, so a turn whose worker dies is resumed elsewhere at its first unfinished step.
  4. The turn appends events to project_agentic_run_event and publishes them. The stream route reads them back as server-sent events, so a page that reconnects continues from its last sequence number.
  5. POST /api/agentic/runs/:run_id/stop stops a run.

Only the person who started a run may follow, continue or stop it.

When a run ends and nobody has the chat open, the person who asked gets an in-app notification.

The loop

The tools

There are 46 tools in release 3.1.0, and 37 when canvases are off for the project. They are defined in packages/agentic/src/agent/tools.ts, which is the list to trust.

Group Examples What they do
Conversations listProjectConversations, findConversationsByKeywords, listConversationFullTranscript, grepConversationSnippets, getLiveConversationStatus List, search and read conversations, summaries and transcripts. Check live recordings.
Documentation and skills listDocs, readDoc, grepDocs, readSkill Read the product documentation and the assistant’s own skill files.
Project getProjectSettings, getProjectTags, getPortalLink, listReports, readReport, readGoal, readChat Read settings, tags, the portal link, reports, the project goal and earlier chats.
Proposals proposeProjectUpdate, proposeTagsUpdate, proposeCustomVerificationTopic, proposeGoal, navigateTo Show a card the host accepts or dismisses. navigateTo shows a shortcut to a page.
Progress ack, updatePlan, sendProgressUpdate The plan and the progress messages. A plan has at most six steps.
Memory readMemory, remember, amendMemory, forgetMemory Read and keep notes across chats.
dembrane team reachOutToDembraneSupport, noteInsight Log a support request, or draft a note for the dembrane team.
Canvas proposeCanvas, editCanvas, pauseCanvasLoop Propose, read and change canvases. Only when canvases are on for the project.

Rules that hold for every tool:

Memory

Memory notes live in agent_memory, in three scopes: user, project and workspace. The assistant writes them with its memory tools. In the dashboard a host can remove a note and cannot add or edit one. Each chat is given the 12 newest notes, up to 3,000 characters.

Documentation and skills

packages/agentic/src/agent/knowledge.ts gives the assistant two read-only sources.

Where to read

File What it holds
packages/chats/src/reply.ts, prompt.ts, service.ts The plain reply, its prompt, and adding conversations to a chat.
packages/agentic/src/runs/routes.ts, service.ts The run routes.
packages/agentic/src/jobs.ts The agentic.turn job and the worker registration.
packages/agentic/src/runs/turn.ts One turn: what is stored, what is streamed, when it stops.
packages/agentic/src/agent/ The loop, the tools, the prompt, the guard.
packages/agentic/src/data/ What the tools read and write.

Related pages

Comments