> **trigger-authoring-chat-agent** — skill 1 of 6 in [triggerdotdev/skills](https://skillsdocs.com/triggerdotdev/skills).
>
> Book (all skills, one file): https://skillsdocs.com/triggerdotdev/skills.md
> Machine manifest: https://skillsdocs.com/triggerdotdev/skills/.well-known/agent-skills/index.json
> Install the book: `npx skills add triggerdotdev/skills`
> Upstream: https://github.com/triggerdotdev/skills/blob/main/trigger-authoring-chat-agent/SKILL.md @ `main`
> Raw bytes, no header: https://raw.githubusercontent.com/triggerdotdev/skills/main/trigger-authoring-chat-agent/SKILL.md
> Base for relative paths: https://raw.githubusercontent.com/triggerdotdev/skills/main/trigger-authoring-chat-agent/
> Licence: No licence detected — all rights reserved by its authors
>
> Content © its authors. This skill's body is not served here; the links above are. Takedown: https://github.com/DreambaseAI/skillsdocs/issues/new?labels=takedown&title=Takedown+request

# trigger-authoring-chat-agent

Author and run a durable AI chat agent with chat.agent from @trigger.dev/sdk/ai: the per-turn run loop, why you MUST spread ...chat.toStreamTextOptions() first, returning a StreamTextResult vs calling chat.pipe(), the two server actions (chat.createStartSessionAction + auth.createPublicToken), and wiring useChat to useTriggerChatTransport. Load this when building, modifying, or debugging a chat backend (the agent task or its lifecycle hooks) or its React transport, when declaring typed tools or custom data parts, or when migrating a plain AI SDK streamText route to chat.agent.

No licence could be detected for this skill at either the repository or the skill level, so its body is not reproduced here. Read it upstream:

https://raw.githubusercontent.com/triggerdotdev/skills/main/trigger-authoring-chat-agent/SKILL.md
