Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
14a8146
ensure each agent is cloneable
mme Sep 16, 2025
baa914b
add observable events$ property
mme Sep 16, 2025
25d6b58
v0.0.38-alpha.0
mme Sep 16, 2025
9982cae
Implement connect
mme Sep 17, 2025
1c1b484
v0.0.40-alpha.1
mme Sep 17, 2025
b51fbda
v0.0.38-alpha.2
mme Sep 18, 2025
35f4812
Add docs
mme Sep 24, 2025
cb098ea
remove events$
mme Oct 1, 2025
1722837
0.0.40-alpha.2
mme Oct 1, 2025
8b0e4fa
adapt cloning logic
mme Oct 1, 2025
e8b4036
v0.0.40-alpha.3
mme Oct 1, 2025
56830d6
move compact logic to AG-UI package
mme Oct 13, 2025
9252c6f
fix linter errors
mme Oct 13, 2025
534c291
export compactEvents
mme Oct 13, 2025
4f0288d
ensure allowing extra fields for backwards compatibility
mme Oct 13, 2025
7963835
Add test for typescript backwards compat
mme Oct 13, 2025
172166a
add docs
mme Oct 14, 2025
b30f8b9
Add new run started input messages
mme Oct 14, 2025
cde9ef2
v0.0.40-alpha.4
mme Oct 14, 2025
2119e90
add parentRunId
mme Oct 14, 2025
7666fd0
v0.0.40-alpha.5
mme Oct 14, 2025
b962bb5
Fix for early isRunning=false
mme Oct 14, 2025
9dceff6
v0.0.40-alpha.6
mme Oct 14, 2025
71c57eb
Multi-modal Messages
mme Oct 16, 2025
57fffcd
Multi-modal Messages
mme Oct 16, 2025
e30be51
update code to handle the new message structure
mme Oct 17, 2025
461623f
fix A2A compile error
mme Oct 17, 2025
b33cbeb
Merge remote-tracking branch 'origin/main' into max/attachments
maxkorp Oct 17, 2025
65e02da
add multimodal to langgraph python
maxkorp Oct 17, 2025
fcd77a5
typescript parity yo
maxkorp Oct 18, 2025
c725df2
update versions to new prereleases
maxkorp Oct 20, 2025
5b09d27
bump alpha for typescript lg
maxkorp Oct 20, 2025
ec84166
more version bumping
maxkorp Oct 20, 2025
35515ab
add activity messages
mme Oct 21, 2025
9f21fda
add activity messages
mme Oct 21, 2025
fa94711
filter activity messages before they reach the agent
mme Oct 21, 2025
8208b4e
fix package.json paths
mme Oct 22, 2025
48e7582
v0.0.40-alpha.8
mme Oct 22, 2025
b2e8cf0
replace flag
mme Oct 22, 2025
0061ccd
wip
mme Oct 22, 2025
df06481
wip
mme Oct 22, 2025
450f2d1
wip
mme Oct 22, 2025
f92d0e9
wip
mme Oct 22, 2025
71587e2
request A2UI
mme Oct 23, 2025
ff9506e
remove logging
mme Oct 23, 2025
8143ee3
v0.0.40-alpha.9
mme Oct 23, 2025
89b62c5
enforce passing the a2a client
mme Oct 23, 2025
6dd9ea2
0.0.2
mme Oct 23, 2025
403a13c
Properly clone A2AAgent
mme Oct 23, 2025
2bd6639
0.0.3
mme Oct 23, 2025
8257ab5
0.0.4
mme Oct 23, 2025
55965d9
add unit tests
mme Oct 23, 2025
7110beb
wip
mme Oct 23, 2025
f2eca25
wip
mme Oct 23, 2025
16a1f43
v0.0.40-alpha.10
mme Oct 23, 2025
b89742b
fix build error
mme Oct 23, 2025
86a7cbb
0.0.5
mme Oct 23, 2025
baa67ea
integrate vnext chat
mme Oct 28, 2025
05b9a4d
vnext demo runnign
mme Oct 28, 2025
2ce996f
Update agent.ts
mme Oct 28, 2025
ce1f299
Ensure that we retain activity messages
mme Oct 30, 2025
a3e9c7e
v0.0.40-alpha.11
mme Oct 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ node_modules
.vscode

**/mastra.db*

.pnpm-store

**/.poetry-cache
8 changes: 7 additions & 1 deletion apps/dojo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"run-everything": "./scripts/prep-dojo-everything.js && ./scripts/run-dojo-everything.js"
},
"dependencies": {
"@a2a-js/sdk": "0.2.5",
"@ag-ui/a2a": "workspace:*",
"@ag-ui/a2a-middleware": "workspace:*",
"@ag-ui/adk": "workspace:*",
"@ag-ui/agno": "workspace:*",
Expand All @@ -20,17 +22,20 @@
"@ag-ui/llamaindex": "workspace:*",
"@ag-ui/mastra": "workspace:*",
"@ag-ui/middleware-starter": "workspace:*",
"@ag-ui/spring-ai": "workspace:*",
"@ag-ui/pydantic-ai": "workspace:*",
"@ag-ui/server-starter": "workspace:*",
"@ag-ui/server-starter-all-features": "workspace:*",
"@ag-ui/spring-ai": "workspace:*",
"@ag-ui/vercel-ai-sdk": "workspace:*",
"@ai-sdk/openai": "^2.0.42",
"@copilotkit/react-core": "1.10.6",
"@copilotkit/react-ui": "1.10.6",
"@copilotkit/runtime": "1.10.6",
"@copilotkit/runtime-client-gql": "1.10.6",
"@copilotkit/shared": "1.10.6",
"@copilotkitnext/react": "0.0.19-alpha.0",
"@copilotkitnext/runtime": "0.0.19-alpha.0",
"@copilotkitnext/agent": "0.0.19-alpha.0",
"@mastra/client-js": "^0.15.2",
"@mastra/core": "^0.20.2",
"@mastra/dynamodb": "^0.15.6",
Expand Down Expand Up @@ -58,6 +63,7 @@
"diff": "^7.0.0",
"embla-carousel-react": "^8.6.0",
"fast-json-patch": "^3.1.1",
"hono": "^4.10.3",
"lucide-react": "^0.477.0",
"markdown-it": "^14.1.0",
"markdown-it-ins": "^4.0.0",
Expand Down
39 changes: 28 additions & 11 deletions apps/dojo/src/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import getEnvVars from "./env";
import { mastra } from "./mastra";
import { PydanticAIAgent } from "@ag-ui/pydantic-ai";
import { ADKAgent } from "@ag-ui/adk";
import { SpringAiAgent } from '@ag-ui/spring-ai';
import { SpringAiAgent } from "@ag-ui/spring-ai";
import { HttpAgent } from "@ag-ui/client";
import { A2AMiddlewareAgent } from "@ag-ui/a2a-middleware";
import { A2AAgent } from "@ag-ui/a2a";
import { A2AClient } from "@a2a-js/sdk/client";

const envVars = getEnvVars();
export const agentsIntegrations: AgentIntegrationConfig[] = [
Expand Down Expand Up @@ -81,7 +83,9 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
backend_tool_rendering: new ADKAgent({
url: `${envVars.adkMiddlewareUrl}/backend_tool_rendering`,
}),
shared_state: new ADKAgent({ url: `${envVars.adkMiddlewareUrl}/adk-shared-state-agent` }),
shared_state: new ADKAgent({
url: `${envVars.adkMiddlewareUrl}/adk-shared-state-agent`,
}),
// predictive_state_updates: new ADKAgent({ url: `${envVars.adkMiddlewareUrl}/adk-predictive-state-agent` }),
};
},
Expand Down Expand Up @@ -273,26 +277,26 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
},
},
{
id: 'spring-ai',
id: "spring-ai",
agents: async () => {
return {
agentic_chat: new SpringAiAgent({
url: `${envVars.springAiUrl}/agentic_chat/agui`
url: `${envVars.springAiUrl}/agentic_chat/agui`,
}),
shared_state: new SpringAiAgent({
url: `${envVars.springAiUrl}/shared_state/agui`
url: `${envVars.springAiUrl}/shared_state/agui`,
}),
tool_based_generative_ui: new SpringAiAgent({
url: `${envVars.springAiUrl}/tool_based_generative_ui/agui`
url: `${envVars.springAiUrl}/tool_based_generative_ui/agui`,
}),
human_in_the_loop: new SpringAiAgent({
url: `${envVars.springAiUrl}/human_in_the_loop/agui`
url: `${envVars.springAiUrl}/human_in_the_loop/agui`,
}),
agentic_generative_ui: new SpringAiAgent({
url: `${envVars.springAiUrl}/agentic_generative_ui/agui`
})
}
}
url: `${envVars.springAiUrl}/agentic_generative_ui/agui`,
}),
};
},
},
{
id: "llama-index",
Expand Down Expand Up @@ -341,6 +345,19 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
};
},
},
{
id: "a2a-basic",
agents: async () => {
const a2aClient = new A2AClient(envVars.a2aUrl);
return {
agentic_chat: new A2AAgent({
description: "Direct A2A agent",
a2aClient,
debug: process.env.NODE_ENV !== "production",
}),
};
},
},
{
id: "a2a",
agents: async () => {
Expand Down
39 changes: 39 additions & 0 deletions apps/dojo/src/app/[integrationId]/feature/vnext_chat/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"use client";

import React from "react";
import "@copilotkitnext/react/styles.css";
import { CopilotChat, CopilotKitProvider } from "@copilotkitnext/react";

export const dynamic = "force-dynamic";

interface PageProps {
params: Promise<{
integrationId: string;
}>;
}

export default function Page({ params }: PageProps) {
const { integrationId } = React.use(params);

return (
<CopilotKitProvider
runtimeUrl={`/api/copilotkitnext/${integrationId}`}
showDevConsole="auto"
>
<main
className="flex min-h-screen flex-1 flex-col overflow-hidden"
style={{ minHeight: "100dvh" }}
>
<Chat threadId={`${integrationId}-vnext_chat`} />
</main>
</CopilotKitProvider>
);
}

function Chat({ threadId }: { threadId: string }) {
return (
<div className="flex flex-1 flex-col overflow-hidden">
<CopilotChat style={{ flex: 1, minHeight: "100%" }} threadId={threadId} />
</div>
);
}
6 changes: 4 additions & 2 deletions apps/dojo/src/app/api/copilotkit/[integrationId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ import {
ExperimentalEmptyAdapter,
copilotRuntimeNextJSAppRouterEndpoint,
} from "@copilotkit/runtime";
import { agentsIntegrations } from "@/agents";

import { NextRequest } from "next/server";

import { agentsIntegrations } from "@/agents";

export async function POST(request: NextRequest) {
const integrationId = request.url.split("/").pop();

const integration = agentsIntegrations.find((i) => i.id === integrationId);
if (!integration) {
return new Response("Integration not found", { status: 404 });
}

const agents = await integration.agents();
const runtime = new CopilotRuntime({
// @ts-ignore for now
Expand All @@ -27,3 +28,4 @@ export async function POST(request: NextRequest) {

return handleRequest(request);
}

22 changes: 22 additions & 0 deletions apps/dojo/src/app/api/copilotkit/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {
CopilotRuntime,
InMemoryAgentRunner,
createCopilotEndpoint,
} from "@copilotkitnext/runtime";
import { handle } from "hono/vercel";

const runtime = new CopilotRuntime({
agents: {
default: null as any,
},
runner: new InMemoryAgentRunner(),
});

const app = createCopilotEndpoint({
runtime,
basePath: "/api/copilotkit",
});

export const GET = handle(app);
export const POST = handle(app);

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import {
CopilotRuntime,
InMemoryAgentRunner,
createCopilotEndpoint,
} from "@copilotkitnext/runtime";
import { handle } from "hono/vercel";
import type { NextRequest } from "next/server";
import { BasicAgent } from "@copilotkitnext/agent";

type RouteParams = {
params: Promise<{
integrationId: string;
slug?: string[];
}>;
};

const handlerCache = new Map<string, ReturnType<typeof handle>>();

function getHandler(integrationId: string) {
const cached = handlerCache.get(integrationId);
if (cached) {
return cached;
}

const runtime = new CopilotRuntime({
agents: {
default: new BasicAgent({
model: "openai/gpt-4o",
}),
},
runner: new InMemoryAgentRunner(),
});

const app = createCopilotEndpoint({
runtime,
basePath: `/api/copilotkitnext/${integrationId}`,
});

const handler = handle(app);
handlerCache.set(integrationId, handler);
return handler;
}

export async function GET(request: NextRequest, context: RouteParams) {
const { integrationId } = await context.params;
const handler = getHandler(integrationId);
return handler(request);
}

export async function POST(request: NextRequest, context: RouteParams) {
const { integrationId } = await context.params;
const handler = getHandler(integrationId);
return handler(request);
}
18 changes: 14 additions & 4 deletions apps/dojo/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ export const featureConfig: FeatureConfig[] = [
createFeatureConfig({
id: "human_in_the_loop",
name: "Human in the loop",
description: "Plan a task together and direct the Copilot to take the right steps",
description:
"Plan a task together and direct the Copilot to take the right steps",
tags: ["HITL", "Interactivity"],
}),
createFeatureConfig({
id: "agentic_generative_ui",
name: "Agentic Generative UI",
description: "Assign a long running task to your Copilot and see how it performs!",
description:
"Assign a long running task to your Copilot and see how it performs!",
tags: ["Generative ui (agent)", "Long running task"],
}),
createFeatureConfig({
Expand All @@ -56,7 +58,8 @@ export const featureConfig: FeatureConfig[] = [
createFeatureConfig({
id: "predictive_state_updates",
name: "Predictive State Updates",
description: "Use collaboration to edit a document in real time with your Copilot",
description:
"Use collaboration to edit a document in real time with your Copilot",
tags: ["State", "Streaming", "Tools"],
}),
createFeatureConfig({
Expand All @@ -68,7 +71,8 @@ export const featureConfig: FeatureConfig[] = [
createFeatureConfig({
id: "subgraphs",
name: "Subgraphs",
description: "Have your tasks performed by multiple agents, working together",
description:
"Have your tasks performed by multiple agents, working together",
tags: ["Chat", "Multi-agent architecture", "Streaming", "Subgraphs"],
}),
createFeatureConfig({
Expand All @@ -77,6 +81,12 @@ export const featureConfig: FeatureConfig[] = [
description: "Chat with your Copilot and call frontend tools",
tags: ["Chat", "Tools", "Streaming"],
}),
createFeatureConfig({
id: "vnext_chat",
name: "VNext Chat",
description: "Chat based on CopilotKit vnext",
tags: ["Chat", "VNext", "Streaming"],
}),
];

export default featureConfig;
4 changes: 3 additions & 1 deletion apps/dojo/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type envVars = {
crewAiUrl: string;
pydanticAIUrl: string;
adkMiddlewareUrl: string;
a2aUrl: string;
a2aMiddlewareBuildingsManagementUrl: string;
a2aMiddlewareFinanceUrl: string;
a2aMiddlewareItUrl: string;
Expand Down Expand Up @@ -40,10 +41,11 @@ export default function getEnvVars(): envVars {
pydanticAIUrl: process.env.PYDANTIC_AI_URL || 'http://localhost:9000',
adkMiddlewareUrl: process.env.ADK_MIDDLEWARE_URL || 'http://localhost:8000',
springAiUrl: process.env.SPRING_AI_URL || 'http://localhost:8080',
a2aUrl: process.env.A2A_URL || 'http://localhost:10002',
a2aMiddlewareBuildingsManagementUrl: process.env.A2A_MIDDLEWARE_BUILDINGS_MANAGEMENT_URL || 'http://localhost:9001',
a2aMiddlewareFinanceUrl: process.env.A2A_MIDDLEWARE_FINANCE_URL || 'http://localhost:9002',
a2aMiddlewareItUrl: process.env.A2A_MIDDLEWARE_IT_URL || 'http://localhost:9003',
a2aMiddlewareOrchestratorUrl: process.env.A2A_MIDDLEWARE_ORCHESTRATOR_URL || 'http://localhost:9000',
customDomainTitle: customDomainTitle,
}
}
}
Loading
Loading