← 返回 Skills 市场
generaljerel

CopilotKit-agent-patterns

作者 Jerel · GitHub ↗ · v1.0.2
cross-platform ✓ 安全检测通过
561
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install copilotkit-agent-patterns
功能描述
Patterns for building AI agents that integrate with CopilotKit. Use when designing agent architecture, implementing AG-UI event streaming, managing shared st...
使用说明 (SKILL.md)

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

安全使用建议
This is a documentation-only skill containing architecture and protocol patterns for CopilotKit agents — it doesn't install code or ask for credentials. The examples do show how to use MCP endpoints and environment variables (MCP_API_KEY, MODEL_TIER), which is expected: if you reuse the snippets, ensure API keys are stored securely and endpoints are trusted. Before copying example config into production, review any MCP endpoints you connect to and avoid pasting secrets into prompts or public places.
功能分析
Type: OpenClaw Skill Name: copilotkit-agent-patterns Version: 1.0.2 The skill bundle provides architectural and implementation patterns for building AI agents with CopilotKit. All files, including markdown instructions intended for AI agents, consistently focus on best practices for agent development, reliability, and security (e.g., preventing infinite loops with `maxSteps`, isolating state per thread to prevent data leaks, proper error handling, and timeouts for human-in-the-loop processes). Code examples are illustrative and do not contain malicious logic, data exfiltration attempts, or suspicious external network calls. There is no evidence of prompt injection, obfuscation, or intent to harm.
能力评估
Purpose & Capability
The name/description (CopilotKit agent patterns) match the contents: a set of rules and examples for AG-UI, BuiltInAgent, state management, HITL, and generative UI. There are no unrelated environment variables, binaries, or install steps required by the skill itself.
Instruction Scope
SKILL.md and the rule files only contain architecture and implementation guidance with in-repo example snippets. There are no instructions to read arbitrary host files, send data to unexpected external endpoints, or exfiltrate secrets. Example code references typical runtime behavior (emitting events, configuring endpoints) appropriate to the purpose.
Install Mechanism
No install spec or code is present; this is instruction-only so nothing is downloaded or written to disk by the skill itself.
Credentials
The repository uses environment variables in example code (e.g., process.env.MCP_API_KEY, MODEL_TIER) and shows example external endpoints, but the skill does not require any env vars. This is reasonable for documentation/examples, but when implementing these patterns users will need to supply relevant keys — treat those as sensitive and provide them only to trusted runtimes.
Persistence & Privilege
The skill is not always-enabled and is user-invocable (defaults). It does not request persistent system privileges, nor does it modify other skills or system-wide configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install copilotkit-agent-patterns
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /copilotkit-agent-patterns 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
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.
v1.0.1
**Major update: Refocuses the skill from runtime/server patterns to agent architecture and AG-UI integration patterns.** - Skill renamed to `copilotkit-agent-patterns` with a new focus on building AI agents for CopilotKit. - All previous runtime/server/middleware/security rules removed; 20 new rules added across Agent Architecture, AG-UI Protocol, State Management, Human-in-the-Loop, and Generative UI Emission. - Documentation rewritten to emphasize agent design, event streaming, state management, and frontend integration. - Rule set now covers agent implementation tasks including model selection, AG-UI event lifecycle, human-in-the-loop logic, and generative UI emission.
v1.0.0
Initial
元数据
Slug copilotkit-agent-patterns
版本 1.0.2
许可证
累计安装 0
当前安装数 0
历史版本数 3
常见问题

CopilotKit-agent-patterns 是什么?

Patterns for building AI agents that integrate with CopilotKit. Use when designing agent architecture, implementing AG-UI event streaming, managing shared st... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 561 次。

如何安装 CopilotKit-agent-patterns?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install copilotkit-agent-patterns」即可一键安装,无需额外配置。

CopilotKit-agent-patterns 是免费的吗?

是的,CopilotKit-agent-patterns 完全免费(开源免费),可自由下载、安装和使用。

CopilotKit-agent-patterns 支持哪些平台?

CopilotKit-agent-patterns 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 CopilotKit-agent-patterns?

由 Jerel(@generaljerel)开发并维护,当前版本 v1.0.2。

💬 留言讨论