trigger-chat-agent-advanced
БесплатноБез исполняемых скриптовНе проверенAdvanced and operational chat.agent capabilities for Trigger.dev, loaded on demand. Load this when working on the raw Sessions primitive (sessions /…
от triggerdotdev★ 16 856 звёзд на GitHubОб этом скилле
chat.agent — advanced & operational
The full, version-pinned reference ships inside your installed @trigger.dev/sdk. Read it before writing code — it always matches the SDK version in this project, so it never drifts:
- Skill:
node_modules/@trigger.dev/sdk/skills/trigger-chat-agent-advanced/SKILL.md— Sessions primitive, custom transports/wire protocol, sub-agents, HITL, steering, actions, background injection, fast starts, resilience (compaction/recovery/OOM/large payloads),chat.local, testing, upgrades. - Docs: the full, version-pinned docs ship bundled at
node_modules/@trigger.dev/sdk/docs/ai-chat/(includingpatterns/for HITL, sub-agents, sessions); the skill above lists the exact pages it draws from in itssources:frontmatter. Grep for an API, e.g.grep -rl "mockChatAgent" node_modules/@trigger.dev/sdk/docs/.
If those paths don't exist, @trigger.dev/sdk isn't installed yet — install it first. In a non-hoisted layout, resolve the package with node -p "require.resolve('@trigger.dev/sdk/package.json')" and read skills/ + docs/ beside it.
Common mistakes
CRITICAL: sending a follow-up by re-POSTing
POST /api/v1/sessions.// Wrong - a cached re-POST silently drops basePayload.message; basePayload is trigger config, not a channel await fetch("/api/v1/sessions", { method: "POST", body: JSON.stringify({ ...createBody }) }); // Correct - append to the session's input channel await fetch(`/realtime/v1/sessions/${id}/in/append`, { method: "POST", body: JSON.stringify({ kind: "message", payload }) });Using the wrong token for
.in/.out. UsepublicAccessTokenfrom the create response body (session-scoped). Thex-trigger-jwtresponse header is run-scoped and cannot subscribe.Initializing
chat.localinonChatStart. It is skipped on continuation runs, sorun()crashes withchat.local can only be modified after initialization. Init inonBoot.chat.deferfor the message-history write. A mid-stream refresh would read[].awaitthat write inline before the model streams; reservechat.deferfor analytics, audit, cache warming.Giving the HITL tool an
execute.streamTextcalls it immediately. Leave it execute-less; the frontend supplies the answer viaaddToolOutput+sendAutomaticallyWhen.Declaring sub-agent / heavy tools only on
streamText. Also declare them onchat.agent({ tools })(or pass toconvertToModelMessages(uiMessages, { tools })in a custom agent) sotoModelOutputre-applies on every turn.Importing heavy-execute tools into the Head Start route module. This is a build-time import chain problem; runtime strip helpers do not fix it. Keep schemas in an
ai+zod-only module.Returning a megabyte tool output on the stream. One
tool-output-availablerecord over ~1 MiB throwsChatChunkTooLargeError. Persist to your store, write the row first, then emit only an id.Setting
X-Peek-Settled: 1on the active-send path. It races the new turn's first chunk and closes the stream early. Use it only on reconnect-on-reload paths.
Note on docs vocabulary: agent-side examples in some docs still use the legacy
trigger:turn-completechunk type. That is the agent-emit vocabulary. A custom reader must filter on thetrigger-controlheader, not onchunk.type.MCP-driven agent chats (
list_agents,start_agent_chat,send_agent_message,close_agent_chat) are MCP server tools used from Claude Code / Cursor, not importable SDK functions. See/mcp-tools#agent-chat-tools.
References
Sibling skills: trigger-authoring-chat-agent (the everyday chat.agent({...}) happy path), trigger-authoring-tasks and trigger-realtime-and-frontend (task + frontend foundations).
Установить trigger-chat-agent-advanced в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл trigger-chat-agent-advanced?
Advanced and operational chat.agent capabilities for Trigger.dev, loaded on demand. Load this when working on the raw Sessions primitive (sessions / SessionHandle), a custom chat transport or the realtime wire protocol, durable sub-agents (AgentChat, chat.stream.writer), human-in-the-loop, steering, actions, background injection (chat.defer / chat.inject), fast starts (preload, Head Start via @trigger.dev/sdk/chat-server), context resilience (compaction, recovery boot, OOM, large payloads), chat.local run-scoped state, offline testing with mockChatAgent, or prerelease/version upgrades. For the everyday chat.agent({...}) definition and the useTriggerChatTransport happy path, use the trigger-authoring-chat-agent skill instead.
Как установить скилл trigger-chat-agent-advanced?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл trigger-chat-agent-advanced запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic