搜索

PythonReactSEOPDF
OpenClaw

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.

generaljerel0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install generaljerel/copilotkit-agent-patterns

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

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 ag...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/generaljerel/copilotkit-agent-patterns
Version
—
Commit
5e3b6b9415a7e37105257cb4fdc087285db919ec
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

CopilotKit Agent Patterns

A structured skill for CopilotKit agent architecture and implementation, optimized for agents and LLMs.

Structure

  • rules/ - Individual rule files (one per rule)
    • _sections.md - Section metadata (titles, impacts, descriptions)
    • _template.md - Template for creating new rules
    • {prefix}-{name}.md - Individual rule files
  • metadata.json - Document metadata (version, organization, abstract)
  • AGENTS.md - Compiled output (generated)

Categories

# Category Rules Prefix
1 Agent Architecture 4 architecture-
2 AG-UI Protocol 5 agui-
3 State Management 4 state-
4 Human-in-the-Loop 4 hitl-
5 Generative UI Emission 3 genui-

Getting Started

pnpm install
pnpm build
pnpm validate

来源内容

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 ag...
README
# CopilotKit Agent Patterns

A structured skill for CopilotKit agent architecture and implementation, optimized for agents and LLMs.

## Structure

- `rules/` - Individual rule files (one per rule)
  - `_sections.md` - Section metadata (titles, impacts, descriptions)
  - `_template.md` - Template for creating new rules
  - `{prefix}-{name}.md` - Individual rule files
- `metadata.json` - Document metadata (version, organization, abstract)
- __`AGENTS.md`__ - Compiled output (generated)

## Categories

| # | Category | Rules | Prefix |
|---|----------|-------|--------|
| 1 | Agent Architecture | 4 | `architecture-` |
| 2 | AG-UI Protocol | 5 | `agui-` |
| 3 | State Management | 4 | `state-` |
| 4 | Human-in-the-Loop | 4 | `hitl-` |
| 5 | Generative UI Emission | 3 | `genui-` |

## Getting Started

```bash
pnpm install
pnpm build
pnpm validate
```

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.