← All skills
Tencent SkillHub Β· AI

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 openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Patterns for building AI agents that integrate with CopilotKit. Use when designing agent architecture, implementing AG-UI event streaming, managing shared st...

⬇ 0 downloads β˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
metadata.json, README.md, SKILL.md, rules/state-conflict-resolution.md, rules/_template.md, rules/agui-tool-call-lifecycle.md

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.2

Documentation

ClawHub primary doc Primary doc: SKILL.md 10 sections Open source page

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

PriorityCategoryImpactPrefix1Agent ArchitectureCRITICALarchitecture-2AG-UI ProtocolHIGHagui-3State ManagementHIGHstate-4Human-in-the-LoopMEDIUMhitl-5Generative UI EmissionMEDIUMgenui-

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

Category context

Agent frameworks, memory systems, reasoning layers, and model-native orchestration.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
5 Docs1 Config
  • SKILL.md Primary doc
  • README.md Docs
  • rules/_template.md Docs
  • rules/agui-tool-call-lifecycle.md Docs
  • rules/state-conflict-resolution.md Docs
  • metadata.json Config