Vue Embedded AnalyticsBuilt-in Agents

Version 3.0.0

AG Studio ships five agents: a Lead that coordinates, and specialists for Planning, Data, Page and Widget work.

Building a dashboard needs inspecting the data, planning a layout, placing widgets and then configuring each one, so the work is split across focused agents rather than given to a single prompt.

This page is the reference for what you get. To change any of it, see Agent Configuration.

Use Them As They Are Copy Link

The config builder hands you all five on builtIn, keyed by id, each a plain definition. Pair one with a runner to turn it into a running agent:

// Your AgLlmAdapter - see Direct LLM Runner.
const adapter = myOpenAiAdapter({ endpoint: '/api/llm' });

ai: ({ api }) =>
    createAiHarness(api, ({ builtIn }) => ({
        agents: Object.values(builtIn).map((definition) => directLlmRunner({ ...definition, adapter })),
        primary: 'lead',
    })),

primary: 'lead' makes the lead the agent new threads start from. The other four are delegate-only and never appear in the user's agent picker.

To compose them with your own, spread and append:

createAiHarness(api, ({ builtIn, tools: { studio } }) => ({
    agents: [
        ...Object.values(builtIn).map((definition) => directLlmRunner({ ...definition, adapter })),
        directLlmRunner({
            id: 'audit',
            adapter,
            description: 'Reviews a page for missing or misleading widgets.',
            instructions: () => 'You review dashboards and report what is missing.',
            tools: () => [studio.viewPage(), studio.viewWidget()],
        }),
    ],
    primary: 'lead',
}));

The Team Copy Link

AgentRoleToolsDelegates to
LeadCoordinator. Reads the request, decides the approach, delegates.view_schema, view_report, view_page, view_plan, update_plan, clear_plan, rename_thread, delegate_todata, page, planning, widget
PlanningTurns a request into a structured plan.view_schema, view_report, view_page, view_plan, create_plan-
DataExplores and queries the data; answers data questions.execute_query, view_schema, create_expression, update_expression, delete_expression-
PagePlaces and moves widgets, manages page-level filters.view_schema, view_page, view_plan, add_widget, position_widget, remove_widget, add_page_filter, remove_page_filter-
WidgetConfigures one widget: type, data mapping, titles, formatting.view_schema, view_plan, view_widget, configure_widget, add_widget_filter, remove_widget_filter-

The Widget agent is parameterised. The lead names the widget's type and id when delegating, which narrows configure_widget's schema to that widget type's options, so its tools are resolved from delegation parameters rather than fixed.

For what each tool does, see Built-in Tools.

How a Dashboard Gets Built Copy Link

A worked delegation, for "build me a dashboard":

  1. Lead reads the message, calls view_schema to see what data exists, and decides the request warrants a plan.
  2. Lead delegates to Planning, which calls create_plan to produce a layout tree plus a widget entry per intended widget, then returns.
  3. Lead delegates to Page, which calls add_widget for each entry and position_widget to arrange them, returning the widget ids.
  4. Lead delegates to a Widget agent per widget - these run concurrently - each calling configure_widget for its own widget.
  5. Lead marks the plan complete and summarises for the user.

The plan is a durable artefact on the thread, so a later message can pick up where the last one left off. The panel renders each delegation inline and expandable, so a user can follow the specialists' work.

Instructions Copy Link

Each built-in agent carries its own instructions, resolved per run. The data agent's include a generated description of your schema, so it starts knowing which tables and fields exist. The widget agent's include guidance on choosing a chart type. You can replace any of them - see Agent Configuration.

Next Copy Link