Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4c3f76d
feat: add docs for new integration: Open Agent Spec
sonleoracle Dec 13, 2025
f065c4b
address minor comments from coderabbitai
sonleoracle Dec 17, 2025
c2427fa
Merge remote-tracking branch 'origin/main' into sonleoracle/docs/add-…
brandonmcconnell Dec 18, 2025
134761c
Apply suggestion from @coderabbitai[bot]
sonleoracle Dec 18, 2025
bf80909
do not modify tsconfig.json
sonleoracle Dec 18, 2025
6f5ceb5
update
sonleoracle Dec 18, 2025
036d541
refactor!: restructure repo for v1.x and add v2.x (#2794)
mme Dec 18, 2025
03816e2
refactor: remove registry as it is no longer used (#2886)
tylerslaton Dec 18, 2025
48504c4
refactor: standardize CI for clarity (#2887)
tylerslaton Dec 18, 2025
e36fe69
ci(v2): wire up tests to run on PR (#2888)
tylerslaton Dec 18, 2025
b2d6c11
ci(e2e): fix issue with playwright examples not running (#2889)
tylerslaton Dec 18, 2025
eb4f809
Make in memory storage survive hot reloads (#2899)
mme Dec 19, 2025
0d10756
Merge branch 'main' into sonleoracle/docs/add-docs-for-agentspec-inte…
brandonmcconnell Dec 19, 2025
c597635
fix: embed correct agent-spec dojo examples
brandonmcconnell Dec 19, 2025
bed47f6
fix: embed correct agent-spec dojo examples (2)
brandonmcconnell Dec 19, 2025
75b5574
feat: add support for stacked tabs on `IframeSwitcher`
brandonmcconnell Dec 20, 2025
f3cf5ed
feat: refactor `IframeSwitcher` stacked tabs into HOC
brandonmcconnell Dec 20, 2025
7263990
fix: canonicalize generative-ui icons
brandonmcconnell Dec 20, 2025
cfb0395
fix: malformed dojo links
brandonmcconnell Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .cursor/rules/agent-development.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Python agents are typically in folders named `agent-py/` or `agent/` and use the
- **[langgraph-tutorial-quickstart/agent-py/](mdc:examples/langgraph-tutorial-quickstart/agent-py/)** - LangGraph integration

### JavaScript Agents
JavaScript agents are in folders named `agent-js/` and use the [sdk-js/](mdc:CopilotKit/packages/sdk-js/) package.
JavaScript agents are in folders named `agent-js/` and use the [sdk-js/](mdc:src/v1.x/packages/sdk-js/) package.

#### JavaScript Agent Examples
- **[coagents-starter/agent-js/](mdc:examples/coagents-starter/agent-js/)** - Basic JavaScript agent setup
Expand Down
20 changes: 10 additions & 10 deletions .cursor/rules/copilotkit-architecture.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ alwaysApply: false
# CopilotKit Architecture Overview

## Core Library Structure
The main CopilotKit library is located in [CopilotKit/](mdc:CopilotKit/) with the following key packages:
The main CopilotKit library is located in [CopilotKit/](mdc:src/v1.x/) with the following key packages:

### React Packages
- **[react-core/](mdc:CopilotKit/packages/react-core/)** - Core React components and hooks for CopilotKit
- **[react-textarea/](mdc:CopilotKit/packages/react-textarea/)** - Textarea component with AI integration
- **[react-ui/](mdc:CopilotKit/packages/react-ui/)** - UI components for copilot interfaces
- **[react-core/](mdc:src/v1.x/packages/react-core/)** - Core React components and hooks for CopilotKit
- **[react-textarea/](mdc:src/v1.x/packages/react-textarea/)** - Textarea component with AI integration
- **[react-ui/](mdc:src/v1.x/packages/react-ui/)** - UI components for copilot interfaces

### Runtime & SDK
- **[runtime/](mdc:CopilotKit/packages/runtime/)** - Core runtime for executing copilot actions
- **[runtime-client-gql/](mdc:CopilotKit/packages/runtime-client-gql/)** - GraphQL client for runtime communication
- **[sdk-js/](mdc:CopilotKit/packages/sdk-js/)** - JavaScript SDK for backend integration
- **[shared/](mdc:CopilotKit/packages/shared/)** - Shared utilities and types
- **[runtime/](mdc:src/v1.x/packages/runtime/)** - Core runtime for executing copilot actions
- **[runtime-client-gql/](mdc:src/v1.x/packages/runtime-client-gql/)** - GraphQL client for runtime communication
- **[sdk-js/](mdc:src/v1.x/packages/sdk-js/)** - JavaScript SDK for backend integration
- **[shared/](mdc:src/v1.x/packages/shared/)** - Shared utilities and types

### Python SDK
- **[sdk-python/](mdc:sdk-python/)** - Python SDK with integrations for:
Expand All @@ -39,7 +39,7 @@ All examples are in [examples/](mdc:examples/) and typically follow this pattern

## Development Workflow
- Examples use the local packages via workspace references
- [package.json](mdc:CopilotKit/package.json) contains workspace configuration
- Scripts in [scripts/](mdc:CopilotKit/scripts/) for development, testing, and releases
- [package.json](mdc:src/v1.x/package.json) contains workspace configuration
- Scripts in [scripts/](mdc:src/v1.x/scripts/) for development, testing, and releases


24 changes: 12 additions & 12 deletions .cursor/rules/development-workflow.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ alwaysApply: false

## Workspace Setup
CopilotKit uses a monorepo structure with:
- **[CopilotKit/package.json](mdc:CopilotKit/package.json)** - Main workspace configuration
- **[CopilotKit/packages/](mdc:CopilotKit/packages)** - Core library packages
- **[src/v1.x/package.json](mdc:src/v1.x/package.json)** - Main workspace configuration
- **[src/v1.x/packages/](mdc:src/v1.x/packages)** - Core library packages
- **[examples/](mdc:examples)** - Example applications

## Development Scripts
Located in [CopilotKit/scripts/](mdc:CopilotKit/scripts):
Located in [src/v1.x/scripts/](mdc:src/v1.x/scripts):

### Development Scripts
- **[develop/](mdc:CopilotKit/scripts/develop)** - Development environment setup
- **[qa/](mdc:CopilotKit/scripts/qa)** - Quality assurance and testing scripts
- **[release/](mdc:CopilotKit/scripts/release)** - Release automation scripts
- **[develop/](mdc:src/v1.x/scripts/develop)** - Development environment setup
- **[qa/](mdc:src/v1.x/scripts/qa)** - Quality assurance and testing scripts
- **[release/](mdc:src/v1.x/scripts/release)** - Release automation scripts

### Documentation Scripts
- **[docs/](mdc:CopilotKit/scripts/docs)** - Documentation generation and management
- **[docs/](mdc:src/v1.x/scripts/docs)** - Documentation generation and management

## Package Management
- Uses pnpm workspaces for package management
Expand All @@ -39,11 +39,11 @@ Located in [CopilotKit/scripts/](mdc:CopilotKit/scripts):
- **[snippets/](mdc:docs/snippets)** - Code snippets for documentation

## Configuration Files
- **[CopilotKit.code-workspace](mdc:CopilotKit/CopilotKit.code-workspace)** - VS Code workspace settings
- **[utilities/](mdc:CopilotKit/utilities)** - Shared utilities:
- [eslint-config-custom/](mdc:CopilotKit/utilities/eslint-config-custom) - ESLint configuration
- [tailwind-config/](mdc:CopilotKit/utilities/tailwind-config) - Tailwind CSS configuration
- [tsconfig/](mdc:CopilotKit/utilities/tsconfig) - TypeScript configurations
- **[CopilotKit.code-workspace](mdc:src/v1.x/CopilotKit.code-workspace)** - VS Code workspace settings
- **[utilities/](mdc:src/v1.x/utilities)** - Shared utilities:
- [eslint-config-custom/](mdc:src/v1.x/utilities/eslint-config-custom) - ESLint configuration
- [tailwind-config/](mdc:src/v1.x/utilities/tailwind-config) - Tailwind CSS configuration
- [tsconfig/](mdc:src/v1.x/utilities/tsconfig) - TypeScript configurations

## Infrastructure
- **[infra/](mdc:infra)** - AWS CDK infrastructure code
Expand Down
12 changes: 6 additions & 6 deletions .cursor/rules/frontend-development.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ alwaysApply: false
## Core React Packages

### React Components
- **[react-core/](mdc:CopilotKit/packages/react-core/)** - Core React components and hooks
- **[react-core/](mdc:src/v1.x/packages/react-core/)** - Core React components and hooks
- `CopilotProvider` - Main provider component
- `useCopilotChat` - Chat functionality hook
- `useCopilotAction` - Action definition hook
- `useCopilotReadable` - State reading hook

### UI Components
- **[react-ui/](mdc:CopilotKit/packages/react-ui/)** - Pre-built UI components
- **[react-ui/](mdc:src/v1.x/packages/react-ui/)** - Pre-built UI components
- `CopilotChat` - Chat interface component
- `CopilotPopup` - Popup chat component
- `CopilotSidebar` - Sidebar chat component

### Specialized Components
- **[react-textarea/](mdc:CopilotKit/packages/react-textarea/)** - AI-enhanced textarea
- **[react-textarea/](mdc:src/v1.x/packages/react-textarea/)** - AI-enhanced textarea
- `CopilotTextarea` - Smart textarea with AI suggestions
- Auto-completion and suggestions

Expand Down Expand Up @@ -115,8 +115,8 @@ function MyComponent() {
## Integration with Agents

### Runtime Configuration
- **[runtime/](mdc:CopilotKit/packages/runtime/)** - Core runtime for agent communication
- **[runtime-client-gql/](mdc:CopilotKit/packages/runtime-client-gql/)** - GraphQL client
- **[runtime/](mdc:src/v1.x/packages/runtime/)** - Core runtime for agent communication
- **[runtime-client-gql/](mdc:src/v1.x/packages/runtime-client-gql/)** - GraphQL client

### Agent Communication
- Frontend components communicate with agents via the runtime
Expand Down Expand Up @@ -145,7 +145,7 @@ function MyComponent() {

### Styling and Theming
- Uses Tailwind CSS for styling
- Shared configuration in [utilities/tailwind-config/](mdc:CopilotKit/utilities/tailwind-config/)
- Shared configuration in [utilities/tailwind-config/](mdc:src/v1.x/utilities/tailwind-config/)
- Custom components in [components.json](mdc:docs/components.json)
- UI components follow modern design patterns

Expand Down
20 changes: 10 additions & 10 deletions .cursor/rules/quick-reference.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ alwaysApply: false

### Build a Simple Copilot
- Start with [copilot-chat-with-your-data/](mdc:examples/copilot-chat-with-your-data)
- Use [react-core/](mdc:CopilotKit/packages/react-core) for basic integration
- Add [react-ui/](mdc:CopilotKit/packages/react-ui) for pre-built components
- Use [react-core/](mdc:src/v1.x/packages/react-core) for basic integration
- Add [react-ui/](mdc:src/v1.x/packages/react-ui) for pre-built components

### Create Multi-Agent Systems
- Check [coagents-starter/](mdc:examples/coagents-starter) for basic setup
Expand All @@ -27,18 +27,18 @@ alwaysApply: false
- See [coagents-starter/agent-py/](mdc:examples/coagents-starter/agent-py) for example

### Develop JavaScript Agents
- Use [sdk-js/](mdc:CopilotKit/packages/sdk-js) package
- Use [sdk-js/](mdc:src/v1.x/packages/sdk-js) package
- Check [coagents-starter/agent-js/](mdc:examples/coagents-starter/agent-js) for example

### Customize UI Components
- Browse [registry/](mdc:registry) for reusable components
- Check [docs/components/react/](mdc:docs/components/react) for documentation
- Use [react-ui/](mdc:CopilotKit/packages/react-ui) for pre-built components
- Use [react-ui/](mdc:src/v1.x/packages/react-ui) for pre-built components

### Set Up Development Environment
- Review [CopilotKit/package.json](mdc:CopilotKit/package.json) for workspace setup
- Use scripts in [CopilotKit/scripts/](mdc:CopilotKit/scripts)
- Check [utilities/](mdc:CopilotKit/utilities) for shared configurations
- Review [src/v1.x/package.json](mdc:src/v1.x/package.json) for workspace setup
- Use scripts in [src/v1.x/scripts/](mdc:src/v1.x/scripts)
- Check [utilities/](mdc:src/v1.x/utilities) for shared configurations

### Run Tests
- Use [examples/e2e/](mdc:examples/e2e) for end-to-end testing
Expand All @@ -50,9 +50,9 @@ alwaysApply: false
- See [docs/content/docs/](mdc:docs/content/docs) for markdown files

## Key Files to Know
- **[CopilotKit/package.json](mdc:CopilotKit/package.json)** - Main workspace configuration
- **[src/v1.x/package.json](mdc:src/v1.x/package.json)** - Main workspace configuration
- **[sdk-python/pyproject.toml](mdc:sdk-python/pyproject.toml)** - Python SDK configuration
- **[CopilotKit.code-workspace](mdc:CopilotKit/CopilotKit.code-workspace)** - VS Code workspace settings
- **[CopilotKit.code-workspace](mdc:src/v1.x/CopilotKit.code-workspace)** - VS Code workspace settings
- **[examples/shared/](mdc:examples/shared)** - Shared utilities and templates

## Common Patterns
Expand All @@ -63,7 +63,7 @@ alwaysApply: false

## Getting Started Checklist
1. Clone the repository
2. Navigate to [CopilotKit/](mdc:CopilotKit) directory
2. Navigate to [src/v1.x/](mdc:src/v1.x) directory
3. Run `npm install` to set up workspace
4. Choose an example from [examples/](mdc:examples)
5. Follow the example's README.md
Expand Down
18 changes: 9 additions & 9 deletions .cursor/rules/suggestions-development.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ Users can configure suggestions via `useCopilotChatSuggestions` hook which regis
## Core files

- **@react-ui**
- [Suggestions.tsx](mdc:CopilotKit/packages/react-ui/src/components/chat/Suggestions.tsx) - How suggestions are rendered
- [Messages.tsx](mdc:CopilotKit/packages/react-ui/src/components/chat/Messages.tsx) - Includes relevant code for what renders [Suggestions.tsx](mdc:CopilotKit/packages/react-ui/src/components/chat/Suggestions.tsx)
- [Chat.tsx](mdc:CopilotKit/packages/react-ui/src/components/chat/Chat.tsx) - Includes relevant logic for our prebuilt components loading suggestions
- [use-copilot-chat-suggestions.tsx](mdc:CopilotKit/packages/react-ui/src/hooks/use-copilot-chat-suggestions.tsx) - How users specify the configuration for their suggestions
- [suggestions.css](mdc:CopilotKit/packages/react-ui/src/css/suggestions.css) - Styling for suggestions
- [Suggestions.tsx](mdc:src/v1.x/packages/react-ui/src/components/chat/Suggestions.tsx) - How suggestions are rendered
- [Messages.tsx](mdc:src/v1.x/packages/react-ui/src/components/chat/Messages.tsx) - Includes relevant code for what renders [Suggestions.tsx](mdc:src/v1.x/packages/react-ui/src/components/chat/Suggestions.tsx)
- [Chat.tsx](mdc:src/v1.x/packages/react-ui/src/components/chat/Chat.tsx) - Includes relevant logic for our prebuilt components loading suggestions
- [use-copilot-chat-suggestions.tsx](mdc:src/v1.x/packages/react-ui/src/hooks/use-copilot-chat-suggestions.tsx) - How users specify the configuration for their suggestions
- [suggestions.css](mdc:src/v1.x/packages/react-ui/src/css/suggestions.css) - Styling for suggestions
- **@react-core**
- [copilot-context.tsx](mdc:CopilotKit/packages/react-core/src/context/copilot-context.tsx) - Where the actual suggestions are stored, the "provider" or "context"
- [use-copilot-chat.ts](mdc:CopilotKit/packages/react-core/src/hooks/use-copilot-chat.ts) - Hook that controls and contains logic for suggestions, often referred to as "headless UI"
- [suggestions.ts](mdc:CopilotKit/packages/react-core/src/utils/suggestions.ts) - Core suggestion generation logic with streaming validation and error handling
- [suggestions-constants.ts](mdc:CopilotKit/packages/react-core/src/utils/suggestions-constants.ts) - Retry configuration constants
- [copilot-context.tsx](mdc:src/v1.x/packages/react-core/src/context/copilot-context.tsx) - Where the actual suggestions are stored, the "provider" or "context"
- [use-copilot-chat.ts](mdc:src/v1.x/packages/react-core/src/hooks/use-copilot-chat.ts) - Hook that controls and contains logic for suggestions, often referred to as "headless UI"
- [suggestions.ts](mdc:src/v1.x/packages/react-core/src/utils/suggestions.ts) - Core suggestion generation logic with streaming validation and error handling
- [suggestions-constants.ts](mdc:src/v1.x/packages/react-core/src/utils/suggestions-constants.ts) - Retry configuration constants

## How Suggestions Work

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Cleanup caches after PR close
name: cleanup
on:
pull_request:
types:
- closed

jobs:
cleanup:
pr-caches:
runs-on: ubuntu-latest
steps:
- name: Cleanup
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/dojo-e2e.yml → .github/workflows/e2e_dojo.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
name: e2e
name: e2e / dojo

on:
push:
branches: [main]
paths-ignore:
- "docs/**"
- "README.md"
paths:
- "src/v1.x/**"
- "src/v2.x/**"
- ".github/workflows/e2e_dojo.yml"
pull_request:
branches: [main]
paths-ignore:
- "docs/**"
- "README.md"
paths:
- "src/v1.x/**"
- "src/v2.x/**"
- ".github/workflows/e2e_dojo.yml"

jobs:
dojo:
name: dojo / ${{ matrix.suite }}
name: ${{ matrix.suite }}
runs-on: depot-ubuntu-24.04
timeout-minutes: 20
strategy:
Expand Down Expand Up @@ -143,11 +145,11 @@ jobs:
uses: astral-sh/setup-uv@v6

- name: Install cpk dependencies
working-directory: CopilotKit/CopilotKit
working-directory: CopilotKit/src/v1.x
run: pnpm install --frozen-lockfile

- name: Build cpk
working-directory: CopilotKit/CopilotKit
working-directory: CopilotKit/src/v1.x
env:
NODE_OPTIONS: --max-old-space-size=8192
TURBO_CONCURRENCY: 2
Expand All @@ -163,7 +165,7 @@ jobs:

- name: Link cpk into ag-ui
working-directory: CopilotKit
run: node ../ag-ui/apps/dojo/scripts/link-cpk.js .
run: node ../ag-ui/apps/dojo/scripts/link-cpk.js src/v1.x/packages

- name: Prepare dojo for e2e
working-directory: ag-ui/apps/dojo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Preview Environments
name: e2e / examples

on:
pull_request:
Expand All @@ -16,7 +16,7 @@ jobs:
build_images:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'automated-version-pr') }}
runs-on: ubuntu-latest
name: Build Images
name: build
strategy:
matrix:
app:
Expand Down Expand Up @@ -116,19 +116,19 @@ jobs:

- name: (UI, Local Deps) Install monorepo
if: matrix.app.type == 'ui' || matrix.app.type == 'next-openai'
working-directory: ./CopilotKit
working-directory: ./src/v1.x
run: pnpm install --frozen-lockfile

- name: (UI, Local Deps) Build @copilotkit packages
if: matrix.app.type == 'ui' || matrix.app.type == 'next-openai'
working-directory: ./CopilotKit
working-directory: ./src/v1.x
run: pnpm run freshbuild

- name: (UI, Local Deps) Link @copilotkit packages
if: matrix.app.type == 'ui'
working-directory: ./examples/${{ matrix.app.project }}/${{ matrix.app.type }}
run: |
for package in $(ls -d ../../../CopilotKit/packages/*); do
for package in $(ls -d ../../../src/v1.x/packages/*); do
pnpm link $package
done

Expand All @@ -141,7 +141,7 @@ jobs:

- name: (next-openai) Build app
if: matrix.app.type == 'next-openai'
working-directory: CopilotKit/examples/next-openai
working-directory: src/v1.x/examples/next-openai
run: pnpm run example-build
env:
OPENAI_API_KEY: placeholder
Expand All @@ -165,7 +165,7 @@ jobs:
run: |
docker buildx build \
-t 058264219587.dkr.ecr.us-east-1.amazonaws.com/coagents:next-openai-${{ github.run_id }} \
-f ./CopilotKit/examples/next-openai/Dockerfile \
-f ./src/v1.x/examples/next-openai/Dockerfile \
--platform=linux/amd64 \
--provenance=false \
--push \
Expand Down Expand Up @@ -204,7 +204,6 @@ jobs:

deploy:
runs-on: ubuntu-latest
name: Deploy Preview Environments
needs: build_images
outputs:
e2e-urls: ${{ steps.export-e2e-urls.outputs.e2e-urls }}
Expand Down Expand Up @@ -312,10 +311,10 @@ jobs:
labels: ['preview']
})

test:
playwright:
name: "playwright"
if: github.event_name == 'pull_request'
name: End to End Tests
uses: ./.github/workflows/e2e.yml
uses: ./.github/workflows/e2e_examples-test.yml
needs: deploy
with:
ref: "${{ github.event.pull_request.head.ref }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Destroy Preview Environments
name: e2e / examples

on:
pull_request:
types: [ closed ]
types: [closed]
workflow_dispatch:
inputs:
pr_number:
description: 'Pull Request Number'
description: "Pull Request Number"
required: true

concurrency:
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} --profile default
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} --profile default
aws configure set region us-east-1

- uses: pnpm/action-setup@v4
with:
version: 9
Expand All @@ -69,4 +69,4 @@ jobs:
with:
comment-tag: preview-status-update
message: |
Preview environments destroyed for this pull request.
Preview environments destroyed for this pull request.
Loading
Loading