返回顶部
🇺🇸 English
🇨🇳 简体中文
🇨🇳 繁體中文
🇺🇸 English
🇯🇵 日本語
🇰🇷 한국어
🇫🇷 Français
🇩🇪 Deutsch
🇪🇸 Español
🇷🇺 Русский
c

copilotkit-agent-patterns

Patterns for building AI agents that integrate with CopilotKit. Use when designing agent architecture, implementing AG-UI event streaming, managing shared state between agent and UI, adding human-in-the-loop checkpoints, or emitting generative UI from agents. Triggers on agent implementation tasks involving CopilotKit runtime, BuiltInAgent, or AG-UI protocol.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
513
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

copilotkit-agent-patterns

# CopilotKit Agent Patterns Architecture and implementation patterns for building AI agents that connect to CopilotKit. Contains 20 rules across 5 categories, prioritized by impact. ## When to Apply Reference these guidelines when: - Designing agent architecture for CopilotKit integration - Implementing AG-UI protocol event streaming - Managing state synchronization between agent and frontend - Adding human-in-the-loop checkpoints to agent workflows - Emitting tool calls that render generative UI in the frontend ## Rule Categories by Priority | Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Agent Architecture | CRITICAL | `architecture-` | | 2 | AG-UI Protocol | HIGH | `agui-` | | 3 | State Management | HIGH | `state-` | | 4 | Human-in-the-Loop | MEDIUM | `hitl-` | | 5 | Generative UI Emission | MEDIUM | `genui-` | ## Quick Reference ### 1. Agent Architecture (CRITICAL) - `architecture-built-in-agent` - Use BuiltInAgent from @copilotkit/runtime/v2 for simple agents - `architecture-model-resolution` - Use provider/model string format for model selection - `architecture-max-steps` - Set maxSteps to prevent infinite tool call loops - `architecture-mcp-servers` - Configure MCP endpoints for external tool access ### 2. AG-UI Protocol (HIGH) - `agui-event-ordering` - Emit events in correct order (start -> content -> end) - `agui-text-streaming` - Stream text incrementally, not as single blocks - `agui-tool-call-lifecycle` - Follow the complete tool call event lifecycle - `agui-state-snapshot` - Emit STATE_SNAPSHOT events for frontend sync - `agui-error-events` - Always emit error events on failure ### 3. State Management (HIGH) - `state-snapshot-frequency` - Emit state snapshots at meaningful checkpoints - `state-minimal-payload` - Keep state snapshots minimal and serializable - `state-conflict-resolution` - Handle bidirectional state conflicts gracefully - `state-thread-isolation` - Isolate state per thread, not per agent ### 4. Human-in-the-Loop (MEDIUM) - `hitl-approval-gates` - Use tool calls for approval gates, not custom events - `hitl-timeout-fallback` - Always set timeouts with fallback behavior - `hitl-context-in-prompt` - Include sufficient context for user decisions - `hitl-resume-state` - Preserve full state when resuming after approval ### 5. Generative UI Emission (MEDIUM) - `genui-tool-call-render` - Emit tool calls that map to frontend useRenderTool - `genui-streaming-args` - Stream tool args incrementally for real-time UI - `genui-activity-messages` - Use text messages for non-tool status updates ## How to Use Read individual rule files for detailed explanations and code examples: ``` rules/architecture-built-in-agent.md rules/agui-event-ordering.md ``` ## Full Compiled Document For the complete guide with all rules expanded: `AGENTS.md`

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 copilotkit-agent-patterns-1776320056 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 copilotkit-agent-patterns-1776320056 技能

通过命令行安装

skillhub install copilotkit-agent-patterns-1776320056

下载

⬇ 下载 copilotkit-agent-patterns v1.0.2(免费)

文件大小: 27.57 KB | 发布时间: 2026-4-16 16:42

v1.0.2 最新 2026-4-16 16:42
Version 2.0.0

- Updated agent architecture patterns to use BuiltInAgent from @copilotkit/runtime/v2 and clarified model selection format.
- Adjusted architecture guidance to reference MCP "endpoints" instead of servers.
- Standardized generative UI emission practices: use text messages for non-tool status updates.
- Incremented version metadata to reflect major changes in guidelines.
- No code changes; documentation improvements only.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部