产品介绍

Install and use plugins

A plugin packages existing tools, Skills, instructions, subagents, and related capabilities in one directory. Obtain the complete directory, satisfy its runtime prerequisites, and enable it in the product YAML. Writing .plugin.yaml, tools, or Hooks belongs to plugin development, not the prerequisites for installing an existing plugin.

Choose the capability you need

Plugin Capability Prerequisites and entry point
common, source example Count, sum, mean, minimum, and maximum for an explicit numeric list; includes Skills and a general-purpose subagent A tool-calling model, without a database or extra service. Install with this guide. Package README
nl2sql, shipped with the product Compiled SQL workflow generating SQL and, as configured, validating, executing, and writing CSV Model alias and business database settings; provide local schema or configure semantic services as the task requires. Start with dedicated queries or parent/subagent analysis. The plugin README owns detailed parameters
nl2sql-react, shipped with the product A subagent iteratively explores SQLite, reviews and executes queries, while the main Agent continues processing results Tool-calling model and readable SQLite file; the current database exploration entry supports SQLite only. See the plugin README for parameters and optional capabilities
de-agent, shipped with the product Data-engineering table creation, adding columns, metadata recall, business clarification, and SQL deliverables Model and enterprise semantic metadata service; automatically depends on nl2sql. Trial computation and validation have their own service prerequisites; this does not mean generated SQL runs by default. See the plugin README for enablement and business parameters and the human-feedback example

These common choices have different execution models. Built-in plugins already exist in the product package: enable and configure them without copying a second directory of the same ID into Home. common lives in source examples/ and is not distributed in the Server wheel. Package users must separately obtain the complete example directory for the corresponding version.

Prepare a minimal instance

This guide verifies installation with common. You need working Server and TUI, a tool-calling model, and a repository-root .env containing LLM_MODEL, LLM_BASE_URL, and LLM_API_KEY. Choose an independent Home:

export DATAAGENT_HOME="$HOME/.dataagent-plugin-demo"
mkdir -p "$DATAAGENT_HOME"

Save this minimal configuration as $DATAAGENT_HOME/config.yaml. Existing instances should retain their model and other settings, merging only the later plugins changes.

schema_version: 4
dataagent:
  model: primary
  entry: null
models:
  primary:
    provider: openai
    name: $env{LLM_MODEL}
    base_url: $env{LLM_BASE_URL}
    api_key: $env{LLM_API_KEY}
plugins:
  enabled: []

Start Server, then connect TUI in another terminal and confirm that an ordinary question receives a reply:

uv run --no-sync dataagent serve --env-file .env
npm run start:tui -- --runtime-url http://127.0.0.1:8790

See the TUI guide for dependencies and builds. YAML server.port controls the listener, defaulting to 8790; update the TUI URL if it changes.

Install the complete directory

In the terminal where you selected Home, copy the complete example from the repository root. If the same plugin already exists, compare versions instead of overwriting your own files.

mkdir -p "$DATAAGENT_HOME/plugins"
cp -R examples/plugins/common "$DATAAGENT_HOME/plugins/"

The result includes these locations. Preserve hidden manifest files too:

<home>/plugins/common/
  .plugin.yaml
  tools/statistics.py
  skills/
  prompts/
  subagents/
  hooks/

Alternatively, leave an external plugin in place and reference it through plugins.paths in the selected YAML:

plugins:
  enabled: [common]
  paths:
    - /absolute/path/to/common

Choose one approach. paths must reference the plugin directory itself, not its parent. Relative paths resolve against the declaring YAML file. Adding a candidate directory does not enable it. Different common directories in Home and explicit paths cause an ID conflict; path order does not override one copy with another.

Enable it while preserving configuration

For Home installation, update the existing plugins.enabled in the same product YAML:

plugins:
  enabled: [common]

This is a partial edit to the complete configuration. Do not replace models and other sections with these lines or add a second plugins key. Retain other enabled IDs when applicable. common requires no extra business parameters.

Other plugins take business settings under plugins.config.<id>, such as plugins.config.nl2sql. Follow their README rather than placing business parameters in models or copying another plugin's keys. See configuration loading and merging for product YAML, plugin defaults, and environment precedence. If Server started with --config, edit that selected file; Home config.yaml is not additionally merged.

Manifest requires only resolves locally available dependency plugins. It does not download plugins or install Python packages. de-agent automatically loads the shipped nl2sql dependency without listing it again. Follow third-party providers' package and service prerequisites; install Python packages in the same environment running Server, then restart after dependency installation or version changes.

Verify an actual tool result

After installation and enablement, send another turn in the same TUI:

Call common__summarize_numbers for [10, 20, 30].
Report the tool's count, sum, mean, min, and max rather than calculating mentally.

Expand the call. common__summarize_numbers should receive numbers: [10, 20, 30] and return these numeric values:

{"count":3,"sum":60,"mean":20,"min":10,"max":30}

Decimal formatting can differ, but values must match. A correct answer without a tool call does not verify plugin loading. For later review, inspect the tool name, input, and returned result in the current session's Trace, then compare the final reply. See trace files for location and format.

Update and disable

dataagent serve checks the enabled list and plugin resources while preparing the next turn. Active turns keep their original graphs. A failed refresh rejects the request; correct the directory or configuration before retrying. Failed candidates do not replace the previous runtime. Direct Python SDK users rerun prepare_runtime and create_agent. Startup settings such as model connections, Home, dataagent.entry, listeners, and semantic connections still require restarting; see extension lifecycle.

To disable a plugin, remove its ID from plugins.enabled, confirm that no other enabled plugin depends on it through requires, then ask again and verify that its tools are absent. Only then move its files outside the candidate locations if needed. Do not first delete a directory that remains required. Disabling common also disables its tools, Skills, and Hooks; standalone Home Skills remain available.

Troubleshooting

Symptom Check first
Plugin ID cannot be found Complete directory, matching directory/manifest ID, and whether plugins.paths mistakenly references a parent
Files copied but tools unavailable Enablement in the effective product YAML, the actual Server connection, and whether a direct compiled entry omits main-Agent tools
Multiple directories for one ID Different copies in Home, built-ins, or explicit paths; retain one clear source
Missing dependency or import failure Discoverable requires dependencies, packages installed in Server's environment, and reachable required services
Still loaded after removing an enabled ID Another enabled plugin's requires dependency
Extension reload failed on the next turn The specific error in Server's backend.log; fix it and retry rather than deleting session data

See logs for diagnosis and installing Skills for standalone instructions. To create new capabilities, continue with extension development.