Skip to content
Skillpedia
Agents7.6k · #13154

delegate-to-agent

What it does

This skill explains how an app button or workflow should hand AI work to the agent chat. Deterministic actions stay in the app, and the agent handles reasoning and multi-step tasks. It is for developers adding AI features to an app.

When to use it

  • ✓When you are adding a button that needs AI reasoning, research or generation.
  • ✓When a workflow has several steps that the user should be able to watch and steer.
  • ✓When a follow-up action should be handled by the agent in the chat.

Skill link

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/delegate-to-agent/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/delegate-to-agent/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you make the Summarize button in my app send the document to the agent chat so I can follow the summary?”

5 new skills a week. 1 minute to read.

How it works

The app sends the user's request to the agent chat, with a short piece of supporting context, and opens the sidebar so the work is visible. The agent reads private data through the app's authorized actions.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Delegate AI Work to Agent Chat

Rule

Use the agent chat for work that needs AI reasoning, research, generation, or multi-step decisions. Keep app actions deterministic; let the agent orchestrate them so the user can see and steer the work.

Start a visible agent turn

Call sendToAgentChat() from the UI and open the AgentSidebar for user-initiated work:

import { sendToAgentChat } from "@agent-native/core/client/agent-chat";

sendToAgentChat({
  message: userRequest,
  context: JSON.stringify({ documentId }),
  submit: true,
  openSidebar: true,
});

Keep the user's request in message. Put only concise supporting context—such as a selected record id, current view, or bounded excerpt—in context. Use attachments or image fields for files and visuals; do not serialize full records or credentials into a prompt. The agent should read private or large data through the app's authorized actions.

Use submit: true when a clear user action already states the intent. Use submit: false to open the composer with a prefill when the user should review or complete the request. Do not auto-submit a generic generation prompt before the user has supplied the request.

Reserve background: true with openSidebar: false for work the product intentionally runs silently, such as a system-initiated task. A button that asks the user to do AI work should open the sidebar.

Keep the boundary clear

  • Use focused actions for provider reads, validation, deterministic transformations, database writes, and other explicit operations.
  • Let the agent choose and sequence those actions for AI-shaped workflows.
  • Keep a user's freeform prompt in the AgentSidebar composer. Use controls for structured parameters; do not add a second prompt or follow-up textbox.
  • Do not call model-provider SDKs, completeText(), or AI SDK generation functions from app UI, actions, or server helpers. Do not make an action a hidden second agent.

Related skills

  • actions — define deterministic operations shared by the UI and agent.
  • context-awareness — provide navigation and selected-record context.
FAQ

Should every AI button auto-submit?

No. The skill says to auto-submit only when the user's action clearly states the intent.

Should large records be sent in the message?

No. The skill says to send only concise context and let the agent read data through authorized actions.

When is background work allowed?

Only for system-started tasks that the product runs on purpose, not for buttons the user presses.

Details

Original description by the author

Route user-facing AI work through the app's agent chat. Use when adding an AI-powered button, workflow, research task, generation flow, or follow-up.

repo: BuilderIO/agent-native

Popularity

GitHub stars
7.6k
Ranking position
#13154
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills