跳到正文
TakoAPI
返回技能列表

copilotkit-runtime-patterns

由 generaljerel 提供

Web & Frontend Development
352下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Server-side runtime patterns for CopilotKit.

描述

该技能的功能

A collection of 15 server-side configuration rules for CopilotKit's runtime layer, organized across endpoint setup, agent registration, middleware, security, and performance. Covers Express, Hono, and Next.js integration patterns with service adapters and remote agent endpoints.

Having prioritized, categorized rules in one place prevents common misconfigurations like buffered streaming responses or missing CORS headers that are easy to overlook when assembling the runtime manually.

何时使用

  • Setting up a CopilotKit endpoint in an existing Express API
  • Registering a LangGraph agent via remote endpoint configuration
  • Adding auth middleware to gate copilot requests by user token
  • Configuring CORS to allow only a specific frontend origin
  • Switching from in-memory to SQLite thread storage for production

示例工作流

输入

User asks: how do I add authentication to my CopilotKit Express endpoint?

智能体
  1. 1

    Identifies the security-auth-middleware rule as the relevant reference

  2. 2

    Retrieves the onBeforeRequest middleware pattern for request interception

  3. 3

    Generates Express middleware code that validates a token before agent execution

  4. 4

    Adds the middleware to the CopilotRuntime configuration block

  5. 5

    Notes the security-cors-config rule for locking down allowed origins

输出

A working Express endpoint with auth middleware that rejects unauthenticated requests before they reach the copilot runtime

前置要求

  • CopilotKit API key (cloud.copilotkit.ai)

安装

clawhub install generaljerel/copilotkit-runtime-patterns

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接