Skip to main content

Editor Integration

What happens when you Ctrl+Click on $prompts.Extract_Facts in your workflow YAML? Without editor integration, nothing. You'd manually search for the prompt file, scroll to find the right {prompt} block, and lose your train of thought. With the Agent Actions LSP, you jump directly to the definition—just like navigating code.

The Language Server Protocol (LSP) brings IDE-quality navigation to your agentic workflows. It's bundled with agent-actions, so you get it automatically with uv pip install agent-actions.

What You Get

FeatureWhat It DoesExample
Go to DefinitionCtrl+Click to jump to source$prompts.Extract → prompt file, line 42
HoverPreview content without leaving current fileHover on impl: flatten_questions → see function signature
AutocompleteSuggestions as you typeType $prompts. → list of available prompts
OutlineDocument symbols in sidebarSee all actions in a workflow, all prompts in a file
Syntax HighlightingColored {prompt} tags and Jinja2Visual distinction for template syntax

The LSP understands agent-actions references and resolves them to file locations:

PatternExampleJumps To
Promptprompt: $quiz_gen.Extract_Raw_QAprompt_store/quiz_gen.md{prompt Extract_Raw_QA}
Toolimpl: flatten_questionstools/**/flatten_questions.py@udf_tool def
Schemaschema: question_schemaschema/question_schema.yml (or .yaml/.json)
Actiondependencies: extract_qa or dependencies: [a, b]Same file → - name: extract_qa
Workflowworkflow: other_workflowagent_workflow/other_workflow/agent_config/*.yml
Seed File$file:exam_syllabus.jsonseed_data/exam_syllabus.json

Installation

The LSP comes bundled with agent-actions. Install the package and you get agac-lsp:

uv pip install agent-actions

# Verify it's available
agac-lsp --help

VS Code Setup

Build and install the VS Code extension:

# From the agent-actions repository
cd editors/vscode

# Install dependencies and build
npm install
npm run compile

# Package the extension
npx vsce package --allow-missing-repository

# Install to VS Code
code --install-extension agent-actions-lsp-0.3.0.vsix

After installation, reload VS Code (Cmd+Shift+P → "Developer: Reload Window").

Option B: Development Mode

For extension development or testing:

  1. Open the extension folder:

    code editors/vscode
  2. Install dependencies:

    npm install && npm run compile
  3. Press F5 to launch Extension Development Host

  4. Open your agent-actions project and test Ctrl+Click

Requirements

The extension needs agac-lsp in your PATH. If you installed agent-actions in a virtual environment:

# Option 1: Activate the environment before opening VS Code
source .venv/bin/activate
code .

# Option 2: Add the venv bin to PATH in your shell config
export PATH="$HOME/projects/my-project/.venv/bin:$PATH"

VS Code Workflow Navigator

Beyond LSP features, the VS Code extension includes a Workflow Navigator that provides real-time visibility into your workflow execution.

The Explorer sidebar shows all workflows and actions in execution order:

IconStatusMeaning
✓ (green)CompletedAction finished successfully
↻ (yellow, spinning)RunningAction currently executing
✗ (red)FailedAction encountered an error
○ (gray)PendingAction waiting to run
⊘ (blue)SkippedAction was skipped

Features:

  • Click any action to jump to its definition in the YAML config
  • Expand actions to see output folders
  • Multi-workflow support for projects with multiple workflows
  • Status summary shows completed/total count

DAG Visualization

View your workflow as an interactive directed acyclic graph:

Keyboard Shortcut: Cmd+Shift+D (Mac) / Ctrl+Shift+D (Windows/Linux)
Command Palette: "Agent Actions: Show Workflow DAG"

Features:

  • Action dependencies shown as directed edges
  • Status-colored nodes (green=completed, yellow=running, red=failed, gray=pending)
  • Click any node to navigate to its config definition
  • Toggle between vertical and horizontal layouts
  • Auto-updates as workflow runs

CodeLens Actions

In workflow YAML files (agent_config/*.yml), each action definition shows inline links:

actions:
- name: extract_facts # 🔎 Preview Output | ✅ completed
prompt: $prompts.Extract_Facts
dependencies: [load_data]
LinkAction
🔎 Preview OutputPreview action output from storage backend
Status indicatorShows current status, click to open DAG

Query Results Panel

The Query Results Panel provides an interactive view of your action's output data, displaying results from the storage backend in a rich table or JSON format.

Features:

  • Table View: HTML table with sticky column headers, row counts, and column counts
  • JSON View: Formatted JSON display with metadata
  • View Toggle: Switch between table and JSON modes via toolbar buttons
  • Pagination: Navigate through large datasets with next/previous page controls (50 rows per page)
  • Theme Integration: Automatically adapts to VS Code light/dark themes

How to Access:

  1. From Tree View: Right-click any action in the Workflow Navigator → "Preview Data"
  2. From CodeLens: Click 🔎 Preview Output above action definitions in YAML files
  3. From Command Palette: Cmd+Shift+P → "Agent Actions: Preview Data"

The panel opens in a new editor tab beside your current file, allowing side-by-side comparison with your workflow configuration.

Pagination Controls:

  • Click Next Page / Previous Page buttons in the panel header
  • Page size: 50 rows
  • Shows current offset and total row count

Requirements: For data preview to work, the extension needs to locate the agent_actions Python module. In most cases this happens automatically, but for monorepos or complex setups, you may need to set agentActions.modulePath:

{
"agentActions.modulePath": "/path/to/agent-actions"
}

Caching: Preview data is cached for 5 seconds by default to improve performance. Adjust with:

{
"agentActions.previewCacheTTL": 5000 // milliseconds, 0 to disable
}

File Decorations

Action folders in agent_io/target/ display badges:

  • Execution order number (1, 2, 3...) as badge
  • Status-colored text matching the action's current state

This helps you quickly identify which output belongs to which action.

Status Bar

The bottom status bar shows workflow progress at a glance:

$(graph) MyWorkflow: 5/10 | [6] process_results
  • Completed/total count
  • Currently running action name (if any)
  • Click to focus the Workflow Navigator panel

Keyboard Shortcuts

CommandMacWindows/LinuxDescription
Show Workflow DAGCmd+Shift+DCtrl+Shift+DOpen visual DAG panel
Go to ActionCmd+Shift+ACtrl+Shift+AQuick-pick to jump to any action
Refresh WorkflowCmd+Shift+RCtrl+Shift+RManually refresh workflow state

Command Palette

All commands are also available via the Command Palette (Cmd+Shift+P / Ctrl+Shift+P):

CommandDescription
Agent Actions: Show Workflow DAGOpen visual DAG panel
Agent Actions: Go to Action...Quick-pick to jump to any action
Agent Actions: Refresh WorkflowManually refresh workflow state
Agent Actions: Preview DataOpen data preview for selected action
Agent Actions: Open Action ConfigNavigate to action's YAML definition
Agent Actions: Show Workflow NavigatorFocus the sidebar tree view
Agent Actions: Open DocumentationOpen the Agent Actions docs site
Agent Actions: Open SettingsJump to Agent Actions settings

Settings

Configure the Workflow Navigator in VS Code settings:

{
"agentActions.pythonPath": "",
"agentActions.modulePath": "",
"agentActions.showStatusBar": true,
"agentActions.autoRevealSidebar": false,
"agentActions.showCodeLens": true,
"agentActions.showFileDecorations": true,
"agentActions.dagLayout": "vertical",
"agentActions.refreshInterval": 0,
"agentActions.logLevel": "info",
"agentActions.previewCacheTTL": 5000,
"agentActions.previewPageSize": 50
}
SettingDefaultDescription
pythonPath""Python interpreter path. Empty = auto-detect from Python extension.
modulePath""Path to agent-actions module directory. Required for data preview in monorepos.
showStatusBartrueShow workflow progress in status bar.
autoRevealSidebarfalseAutomatically reveal Agent Actions sidebar when opening a project with workflows.
showCodeLenstrueShow action links (Preview Output, Status) in YAML files.
showFileDecorationstrueShow execution order badges on action folders.
dagLayout"vertical"DAG direction: "vertical" (top-down) or "horizontal" (left-right).
refreshInterval0Polling interval in ms. 0 = rely on file watchers only. Set to 2000 for 2-second polling.
logLevel"info"Log verbosity in the Output panel: debug, info, warn, error.
previewCacheTTL5000Cache duration in ms for data preview. 0 = disable caching.
previewPageSize50Number of rows per page in data preview.

Data Sources

The Workflow Navigator reads from three sources:

FilePurposeWhen Updated
agent_config/*.ymlWorkflow structure, action definitions, dependenciesWhen you edit the workflow
agent_io/target/.manifest.jsonExecution plan, action levels, output directoriesWhen workflow starts
agent_io/.agent_status.jsonLive runtime status for each actionDuring workflow execution

File watchers automatically refresh the UI when these files change. For more responsive updates during execution, enable polling with agentActions.refreshInterval.

Neovim Setup

Using nvim-lspconfig:

local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')

-- Register the agent-actions language server
configs.agent_actions = {
default_config = {
cmd = { 'agac-lsp', '--stdio' },
filetypes = { 'yaml', 'markdown' },
root_dir = lspconfig.util.root_pattern('agent_actions.yml'),
settings = {},
},
}

-- Configure with your preferences
lspconfig.agent_actions.setup({
on_attach = function(client, bufnr)
-- Go to definition
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { buffer = bufnr })
-- Hover
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = bufnr })
-- Autocomplete (if using nvim-cmp, it picks this up automatically)
end,
})

Cursor Setup

Cursor uses VS Code extensions. Follow the VS Code VSIX installation, then:

  1. Open Cursor
  2. Go to Extensions → Install from VSIX
  3. Select agent-actions-lsp-0.3.0.vsix
  4. Reload the window

Syntax Highlighting

The extension provides syntax highlighting for prompt files (Markdown with agent-actions syntax):

ElementHighlightingExample
{prompt Name}Keyword (purple)Block delimiter
{end_prompt}Keyword (purple)Block delimiter
{{ variable }}Variable (orange)Jinja2 expression
{% for/if/else %}Control (blue)Jinja2 control flow
{# comment #}Comment (dimmed)Jinja2 comment
CRITICAL / WARNINGWarning markersRed/yellow emphasis

Outline Navigation

Open the Outline panel (Cmd+Shift+O in VS Code) to see document symbols:

In YAML workflow files:

  • All action names listed as symbols
  • Quick jump to any action

In Markdown prompt files:

  • All {prompt} blocks listed
  • Quick navigation between prompts

How It Works

Project Detection

The LSP finds your project by walking up from the opened file until it finds agent_actions.yml. It then indexes:

DirectoryWhat's Indexed
agent_workflow/*/agent_config/*.ymlActions (- name: X)
prompt_store/*.mdPrompts ({prompt X})
tools/**/*.pyTools (@udf_tool def)
schema/*.{yml,yaml,json}Schema files
seed_data/Seed files ($file:X)

Re-indexing

The LSP re-indexes automatically when you save files. If you add new files while the LSP is running:

  • Save any file to trigger re-index
  • Or reload the editor window

Troubleshooting

"agac-lsp: command not found"

The LSP command isn't in your PATH:

# Check if agent-actions is installed
uv pip show agent-actions

# Find where agac-lsp is
uv pip show agent-actions | grep Location
# Then check: <location>/agent_actions/tooling/lsp/

# Reinstall if needed
uv pip install --force-reinstall agent-actions

Extension Not Activating

  1. Check Output panel → "Agent Actions LSP" for errors
  2. Ensure your workspace contains agent_actions.yml
  3. Verify agac-lsp --help works in terminal

References Not Resolving

If Ctrl+Click doesn't work on a reference:

  1. File not indexed yet - Save any file to trigger re-index
  2. Reference typo - The referenced item doesn't exist
  3. Outside project - The file isn't under the agent_actions.yml directory

Hover Shows Nothing

The LSP may not have finished indexing. Wait a moment after opening a project, or reload the window.

Workflow Navigator Not Showing

Ensure your project has:

  • agent_config/ directory with .yml files
  • Actions defined with - name: fields

Status Not Updating

If workflow status isn't refreshing:

  1. Check that agent_io/target/.manifest.json exists
  2. Try Cmd+Shift+R to manually refresh
  3. Enable polling: "agentActions.refreshInterval": 2000

DAG Not Rendering

If the DAG panel shows nothing:

  1. Ensure you have at least one workflow with actions
  2. Check that action dependencies are correctly defined
  3. Reload the window and try again

Data Preview Not Working

If clicking "Preview Data" shows errors or doesn't display data:

"Module import failed" or "Failed to load data from storage backend":

The extension can't find the agent_actions Python module. Set the module path explicitly:

{
"agentActions.modulePath": "/path/to/agent-actions"
}

To find the correct path:

uv pip show agent-actions | grep Location
# Use the path shown (e.g., /Users/you/.venv/lib/python3.11/site-packages)

No data appears in table:

  1. Ensure the action has completed and written output data
  2. Check the storage backend is configured correctly in your workflow
  3. Verify the action's output directory exists in agent_io/target/
  4. Look for errors in the Output panel → "Agent Actions"

Reinstalling the Extension:

If preview features aren't working after updates, completely reinstall:

cd editors/vscode

# Remove any globally installed version
rm -rf ~/.vscode/extensions/agent-actions.agent-actions-lsp-*

# Clean and rebuild
rm -rf out/
npm run compile
npx @vscode/vsce package --allow-missing-repository

# Install fresh
code --install-extension agent-actions-lsp-0.3.0.vsix --force

Then reload VS Code: Cmd+Shift+P → "Developer: Reload Window"

See Also