複数のアプリやMCPホストからブランド画像・動画を生成、調整、書き出し、挿入する作業を支援します。ライブラリ選択や修正依頼も扱います。
- スライド用のブランド画像を作りたいとき
- 既存素材をフィードバックに合わせて直したいとき
- 動画素材を生成して書き出したいとき
画面やスクリプトからAIの調査・分析・生成をエージェントチャットへつなぎ、利用者が作業を確認・調整できる実装方針を示します。
How to delegate all AI work to the agent chat. Use when delegating AI work from UI or scripts to the agent, when a user asks for agent behavior or LLM-powered features, when tempted to add inline LLM calls, or when sending messages to the agent from application code.
実行スコア 未検証
インストール方法を見るアプリの画面やスクリプトからAIの仕事をエージェントチャットへ渡す設計と実装方法を示します。調査、分析、生成、複数段階の推論など、利用者が確認や調整を行う作業は、チャット上で進める方針です。画面からは sendToAgentChat()、Node.jsのスクリプトからは agentChat.submit() を使います。利用者が入力した依頼文と、画面で選択した情報などの補足コンテキストを分けて渡す方法、送信前にチャット欄へ入力して確認してもらう方法、明示的なバックグラウンド処理として開始する方法も説明します。短い分類や文字列の書き換えなどに限り、チャット履歴やツールを必要としないサーバー側処理として completeText() を使う例もあります。
アプリのボタンからAIに調査や文書作成を頼みたいときや、フォーム、選択内容、アップロード資料を依頼と一緒に渡したいときに向いています。利用者に内容を確認してから送信してもらう場合や、チャットを前面に出さない明示的なバックグラウンド処理を組み込みたい場合にも役立ちます。
@agent-native/core のクライアント・サーバーAPIを使う例が記載されています。別のエージェントに依頼する場合はA2Aプロトコルを使う方針です。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
The app's default AI surface is the agent chat. Any user-facing work that asks
the model to research, analyze, generate, recommend, synthesize, or reason over
multiple steps must start or continue in the AgentSidebar so users can see,
steer, and audit the work. UI buttons use sendToAgentChat() with
openSidebar: true, and follow-up or revision text belongs in that same thread
instead of a second app-local textbox.
Actions are tools, not alternate AI runtimes. Keep them deterministic and
focused: provider reads, validation, deterministic transforms, CRUD, and
persistence are good action work. Let the agent orchestrate several such tools
when the workflow is AI-shaped or user-steerable. Server-side one-shot model
calls are a rare escape hatch for narrow text transforms only; use
completeText() from @agent-native/core/server only when the work
intentionally does not need tools, chat history, run state, side effects, or
user steering.
The agent is the single AI interface. It has context about the full project, can read/write any file, and can run scripts. Inline LLM calls bypass this — they create a shadow AI that doesn't know what the agent knows and can't coordinate with it.
From the UI (client):
import { sendToAgentChat } from "@agent-native/core/client/agent-chat";
sendToAgentChat({
message: "Generate a summary of this document",
context: documentContent, // optional hidden context (not shown in chat UI)
submit: true, // auto-submit to the agent
openSidebar: true,
});
Treat the visible message as the user's request or the shortest clear
description of an app-initiated operation. Put context the user did not type —
IDs, URLs, filenames, current selection or screen state, serialized records,
upload instructions, and bounded source excerpts — in the context field.
context is model input carried through the agent turn; it is stripped from
the rendered user message, so do not concatenate it into message with labels,
blank-line sections, or <context> tags yourself.
Use the related surface for each kind of supporting input:
| Surface | Use for |
|---|---|
message | User-authored intent or a concise app action description |
context | Derived metadata and bounded text needed to carry out that intent |
setAgentChatContextItem | Context staged for a later user-submitted prompt; keep it keyed so updates replace stale context |
images, referenceImagePaths, attachments | Binary or visual inputs; describe only the handling instructions in context |
If an app builds a prompt from a form, selection, upload, or editor state, keep
the visible message short and pass the assembled details as context. Preserve
the user's actual freeform text in message when it is the request; do not
restate it as metadata in context unless the agent needs a structured copy.
This boundary applies to auto-submitted turns and prefills. A hidden context field is not a license to send unbounded records or secrets: cap excerpts, prefer stable IDs and URLs, and use an action or resource lookup for full data.
From the UI, in the background:
import { sendToAgentChat } from "@agent-native/core/client/agent-chat";
sendToAgentChat({
message: "Analyze this import and create any missing records",
context: `Import batch id: ${batchId}`,
submit: true,
newTab: true,
background: true,
openSidebar: false,
});
This is still a full agent run: tools, actions, thread state, and run tracking all remain active. It simply does not focus or open the sidebar.
Use this silent form only for explicitly background or system-initiated work. It is not the default for a user clicking an AI-labeled button; visible work should open the sidebar so the user can follow and redirect the run.
From scripts (Node):
import { agentChat } from "@agent-native/core";
agentChat.submit("Process the uploaded images and create thumbnails");
For narrow server-side text transforms:
import { completeText } from "@agent-native/core/server";
const result = await completeText({
systemPrompt: "Return exactly one sentiment label.",
input: messageBody,
maxOutputTokens: 12,
temperature: 0,
});
If the narrow exception is exposed to the UI, wrap it in an action so the UI and agent share the same operation. Keep it clearly non-conversational and do not call provider SDKs directly.
From the UI, detecting when agent is done:
import { useAgentChatGenerating } from "@agent-native/core/client/agent-chat";
function MyComponent() {
const isGenerating = useAgentChatGenerating();
// Show loading state while agent is working
}
submit vs PrefillThe submit option controls whether the message is sent automatically or placed in the chat input for user review:
submit value | Behavior | Use when |
|---|---|---|
true | Auto-submits to the agent immediately | Routine operations with clear intent; keep openSidebar: true for visible work |
false | Prefills the AgentSidebar composer | Review, edit, or add detail before the run; use the existing sidebar thread |
| omitted | Uses the project's default setting | General-purpose delegation |
// Auto-submit: routine operation
sendToAgentChat({ message: "Update the project summary", submit: true });
// Prefill: let user review before sending
sendToAgentChat({
message: "Delete all projects older than 30 days",
submit: false,
openSidebar: true,
});
The AgentSidebar composer is the default prompt surface. When a button needs the user to describe what to create, prefill that same composer and let the user edit or complete it:
<Button
onClick={() =>
sendToAgentChat({
message: "Help me create a research report from this brief:",
context: researchBrief,
submit: false,
openSidebar: true,
})
}
>
Start in agent
</Button>
Never auto-submit a generic creative prompt when the user has not said what they want. Auto-submit without additional input is fine when intent is unambiguous:
Use a Popover only for compact, structured parameters the UI must validate, such as a date range, target, or approval choice. Do not add a second freeform prompt or follow-up textbox for an AI workflow; keep the conversation and revisions in the AgentSidebar thread.
sendToAgentChat() delegates from app code to the agent. The other axis of
delegation is the agent handing work to a sub-agent through the Agent Teams
run-manager. The main chat stays the orchestrator: it spawns sub-agents, then
reads and integrates their results.
Every sub-agent brief must specify four things, or the sub-agent will guess:
Background sub-agents must use the core run-manager / Agent Teams infrastructure rather than ad-hoc LLM calls.
import Anthropic from "@anthropic-ai/sdk" in client or server codeimport OpenAI from "openai" in client or server codegenerateText(), streamText(), etc.completeText() for workflows that need tools, database writes,
auditability, user steering, or multi-step reasoning. Use the agent chat
instead, optionally with background: true.Scripts may call external APIs (image generation, search, etc.) — but the AI reasoning and orchestration still goes through the agent. A script is a tool the agent uses, not a replacement for the agent.
completeText() is allowed for small server-side transforms such as
classification, extraction, rewriting a short string, or normalizing messy
provider text. It deliberately runs with tools: [] and does not create chat
thread state.
sendToAgentChat() delegates work to the local agent — the one running alongside your app. When the work should go to a different agent entirely (e.g., asking an analytics agent for data, or a calendar agent for availability), use the A2A (agent-to-agent) protocol instead.
import { callAgent } from "@agent-native/core/a2a";
// Call a different agent — not the local agent chat
const stats = await callAgent(
"https://analytics.example.com",
"What were last week's signups?",
{ apiKey: process.env.ANALYTICS_A2A_KEY },
);
See the a2a-protocol skill for the full pattern.
pnpm action <name> to perform complex operationsまだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
複数のアプリやMCPホストからブランド画像・動画を生成、調整、書き出し、挿入する作業を支援します。ライブラリ選択や修正依頼も扱います。
特定の顧客企業について、契約と製品利用の数値を照らし合わせ、根拠や不足情報を明記した健全性レポートをまとめます。
アプリの操作をエージェントと画面の両方から呼び出せるアクションとして実装し、API連携や画面のデータ取得を一貫した形で追加するスキルです。
新機能をUI・エージェント用アクション・説明資料・画面状態の4領域でそろえ、利用者とエージェントのどちらからも一貫して使えるようにするチェックリストです。
複数のデータソースを照合して、傾向や指標、根拠をまとめた分析結果を作成します。必要に応じて、再実行できるダッシュボードとして保存できます。
Analyticsの管理画面で、機能フラグの状態確認と切り替え、ダッシュボード利用状況の調査、接続先アプリのデータベース管理を行います。