Author workflows with the AI assistant
Workflow diffs, the undo stack, changes appearing step by step on the canvas, and how it searches templates and modules.
Braidrun's AI assistant is not a plug-in toolbar - it directly understands the YAML, DAG, and running status of the current page, can change workflow, trigger execution, install skills, and switch languages. Here’s how to get started and use it daily.
Where To Find It
- Floating button in the lower right corner (available on all main pages)
- Shortcut Keys
Alt + G
Inside the drawer is a streaming conversation panel that supports Markdown/code highlighting (12 languages) and slash commands.
What can it do?
- Create/modify/verify/execute workflow
- Create, enable, and deactivate schedules
- Refresh or install skill
- Switch interface language
- Answer systemic questions such as "What does this system support/How to write a certain configuration/How to use a certain API"
Slash Command
/execute # run the current workflow (alias: /run)
/validate # validate YAML without running
/export # download workflow YAML
/new # start a fresh workflow
/undo # roll back the last assistant change (up to 10)
/help # list all slash commandsType a leading "/" in the input to trigger one. Slash commands take priority over free text and call the platform API directly instead of a model — instant, and they cost no tokens. On pages like the editor or the workflow list, matching quick-action buttons also appear above the input.
Diff Preview and Undo Stack
When the assistant modifies the workflow, Workflow Diff will be displayed to help you confirm the structural changes:
- New steps/fields are highlighted green
- Modified fields are marked yellow
- Deleted steps/fields are highlighted in red
After the workflow modification is confirmed, /undo can be used to roll back, and the client will retain at most the 10 most recent workflow snapshots. Scheduling and other resource operations are not included in this undo stack; the session itself can be exported to Markdown with one click.
Working With The Editor
- When you have the assistant build or modify a workflow in the editor, the canvas reveals each change in order: nodes are added and edges drawn one step at a time, so you can watch the workflow take shape. The changes still aren't persisted until you click Save.
- The editor's diagnostics panel can hand off a single issue or all of them with "Fix with AI," and the step properties panel has an entry that opens the assistant with the current step's context already loaded — no copy-pasting YAML yourself.
- Every step the assistant changes also enters the editor's own undo / redo history, so Ctrl / Cmd + Z rolls them back one at a time.
For a full walkthrough of each area of the editor, see Visual Editor.
Preparation: Configure Your AI Assistant
Go before using it for the first time Account Settings → AI Assistant Open and select a model provider (e.g. OpenRouter, OpenAI, Anthropic, DeepSeek), or configure the subscription model in the Claude Code / Codex area. The real secret is placed in Credential Management → My Credentials Maintenance, it will be automatically resolved according to the current account when running. Administrators do not need to pre-configure the AI assistant for regular users.
/api/workflows/assistant/chat And /api/global-agent/chat The currently logged in user's own AI assistant configuration is used. It is not a direct execution entry for the globalAgent field at the top of the workflow.
Claude Code / Codex Model
If you want the AI assistant to call Claude Code or Codex, choose the authentication method in Account Settings → AI Assistant → Claude Code / Codex:
- Claude Code: You can use Anthropic API Key or Claude Subscription Token (provider=claude_code_oauth).
- Codex: you can use an OpenAI API Key, or the auth.json of a Codex subscription (provider=codex_subscription).
- Subscription mode does not write token/auth.json into the AI assistant configuration; it only reads it from your personal credentials or team credentials.
Documentation Knowledge Base
To have the AI assistant answer a system documentation question (e.g. "What is the default timeout for manual_approval"), go to Settings → Platform Persistence Storage → AI Assistant Documentation Knowledge Base Confirm it is enabled. Built-in guides, project master documents, and selected reference docs are indexed by default, and automatic building at startup is enabled by default; you can view the status and manually click "Rebuild Knowledge Base" on the same page.
workflows/templates/**/*.yaml— Templatesworkflows/modules/**/*.yaml— Modules
"Thinking Process" Reasoning Streaming
When the selected model and access method return reasoning content, the AI Assistant drawer displays a collapsible "Thinking Process" card; visibility should not be assumed based on the model name alone. The card shows the reasoning content or summary actually returned by the model interface, which does not mean that the platform can read the internal processes not returned by the model.
- The reasoning_delta event is collapsed by the client and will not refresh the screen (avoiding re-rendering every frame)
- After the streaming reasoning is completed, use the reasoning_complete event to display the summary content returned by this interface
- Click on the thinking card to expand/collapse; it is collapsed by default to avoid occupying the field of view
- /undo only rolls back the AI’s most recent modifications to the workflow, not conversation messages, inference events, or other resource operations.
Models that do not support reasoning will not display any additional cards and behave as before.
Long-Term Memory
The AI assistant is independent per session by default. If you want it to "remember" your preferences ("I like Chinese answers + short markdown", "My ASA workflow always runs early in the morning"), you can turn on Long-Term Memory in the AI Assistant configuration:
- After enabling, user messages and assistant replies will be vectorized and stored in the cross-session ltm:<user_id>:* namespace.
- When the next round of dialogue starts, the top-K relevant memories will be automatically retrieved as context injection
- There is a "Clear Long-term Memory" button in the upper right corner of the sidebar of the AI Assistant. POST /api/global-agent/memory/clear clears all namespaces of the current user with one click; suitable for use when changing devices/switching teams.
The default memory only covers the current running environment and may not be shared during restarts or multi-instance deployments. When cross-instance long-term memory is required, enable managed state storage in the platform running configuration, or have the administrator access custom storage adaptation.
Tips
- If you want the AI to generate YAML: explicitly ask it to output snake_case YAML
- Branch flow: give priority to generating the structure of classifier + condition
- Big change: use natural language to describe the intention, and then break it into multi-step Diff
- Combine Debugger : After the AI changes the workflow, validate and preview it first, then enable debug and perform one real execution with test data
- When selecting a model that supports reasoning, you can directly see the "thinking process", and the debugging prompt design is very useful.