All documentation pages

    8 min read

    AI Copilot Reference

    Providers and keys, chat and agent mode, the tools the agent can use and which ones ask first, slash commands, DLWAY.md memory, hooks, custom agents and commands, MCP servers, undo and spending limits.

    Open the Copilot

    Open the Explorer and choose AI Copilot in the sidebar, or press Ctrl+Shift+A. It has two modes, Chat and Agent, a message box with slash commands, a transcript that shows each tool call as a card, and a cost footer.

    Connect a provider

    Under Settings → AI Copilot → Provider and model, create a connection:

    • Anthropic, Google Gemini, OpenAI and DeepSeek, each with its own endpoint and key
    • Anthropic-compatible or custom OpenAI-compatible services, where you enter the base URL yourself. For a service that speaks Anthropic's Messages API (for example Kimi Code), enter its base URL and the model name and key that service issued. Agent mode works with these.

    Choose the model and use Test connection. The key is yours and is kept in your browser. Model calls pass through the DLWAY server as a stateless relay, and the agent's tools (reading and editing files, running code) run in your browser, not on the server.

    The built-in model list names Claude Opus 4.8 (most capable), Claude Sonnet 5 (recommended) and Claude Haiku 4.5 (fastest); you can switch model mid-conversation with /model.

    Chat and Agent

    • Chat answers questions about your code and data in the context of the open files.
    • Agent runs a loop in your browser: it plans, calls tools, reads the results and continues until the task is done or it reaches the maximum iterations per turn. The server route only relays model calls.

    What the agent can use

    Tools are grouped by how much they can change:

    • Read only (no prompt): read file, list files, glob, grep, git status and diff, diagnostics, open in editor, web fetch, web search, read notebook, read the todo list, and the pipelines tools that list, inspect, summarise runs, and show operations and assets.
    • Edits (asks, unless you auto-approve edits): write file, edit file, multi-edit, edit notebook, and save a pipeline draft (a draft is saved, never published or run).
    • Execution (asks): run Python (in the browser, or on an attached kernel) and run a pipeline, which starts real work.
    • Spawning (asks): start a subagent (the task tool) to work on a side task with its own context.
    • Planning: the agent can present a plan with exit_plan and wait for your approval before changing anything. In plan mode only read-only tools are available.

    The todo list keeps multi-step work visible while it runs.

    Permission modes

    Under Settings → AI Copilot → Agent mode, choose how far the agent acts alone:

    • Ask before every mutation
    • Auto-approve edits, ask for execution
    • Auto-approve everything

    Read-only tools never ask. When a card asks, you can allow once, deny with a reason or "always allow" that tool for the session. Denying a call tells the agent so, and it adapts.

    Undo, checkpoints and context

    • Checkpoints and diffs: before the first change to a file in a turn, the original is captured. /undo reverts the last turn's changes, and each edit shows a diff.
    • Compaction: when the conversation grows large, /compact (or automatic compaction) summarises it to free context.
    • Images: you can attach images for models that read them.
    • Resume: /resume returns to a previous session.

    Slash commands

    Type / to open the list. The built-ins are:

    • /help, /clear, /new, /compact, /cost, /model, /status, /memory, /permissions, /resume, /todo, /undo, /settings, /export
    • /init: generate a DLWAY.md project memory file
    • /review: review the changes against git HEAD
    • /fix, /explain, /test, /doc: act on the active file

    Project memory: DLWAY.md

    A DLWAY.md file at the project root is read at the start of every conversation, so the agent knows your conventions. A DLWAY.md inside a folder is picked up when the agent touches files there. Memory files can include other files with @path/to/file. User memory in the Agent mode settings applies across every project.

    Hooks

    Hooks run automatically around the agent's actions. Declare them in a ## Hooks section of DLWAY.md, with a subsection per trigger and a bullet per action:

    code
    ## Hooks ### After write_file- Run `print("file written")`- Check types ### Before run_python- Block if the input contains `os.remove` ### On SessionStart- Remind me to check the data version

    Events are PreToolUse, PostToolUse, UserPromptSubmit, Stop, SubagentStop, PreCompact, SessionStart, SessionEnd and Notification. A hook can run Python, run diagnostics, block a call that contains a keyword, or show a message. A browser has no shell, so a hook that names a command-line tool such as a linter can only show its text; it does not pretend to run it. Hooks time out after ten seconds.

    Custom agents and commands

    • Custom agents are Markdown files in .dlway/agents/. The front matter sets a name, description, the tools the agent may use and an optional model; the body is its system prompt.
    • Custom commands are Markdown files in .dlway/commands/. The file name becomes the slash command, an argument-hint can be given, and $ARGUMENTS in the body is replaced by what you type after the command.

    MCP servers

    Settings → AI Copilot → MCP servers adds extra tools over the Model Context Protocol. The browser can use servers that speak SSE over HTTP; stdio servers need a subprocess, which a browser does not have. The server must send CORS headers that allow the Studio's origin, and many servers built for command-line clients do not do that out of the box. MCP tools are not offered in plan mode.

    Costs

    Settings → AI Copilot → Spending limits shows what Copilot has cost so far and lets you set a daily and a monthly budget in US dollars. /cost prints the token and cost breakdown of the current session.

    Privacy

    Only the text of your messages and the tool results you allow are sent to the provider you chose. Nothing is sent until you send a message. See Privacy and storage.