Commit Graph

65 Commits

Author SHA1 Message Date
Ran Shemtov d74e32c824 Merge branch 'main' into chore/example-state-streamin 2026-04-15 19:24:23 +02:00
Max Korp 246448120a feat: add langgraph-python-threads example 2026-04-15 09:50:03 -07:00
Ran Shem Tov 65500c5fb8 chore: fix state streaming on langgraph prebuilt agents in demos 2026-04-15 18:35:55 +02:00
Ran Shem Tov c8d4b273aa chore: add state streaming to langgraph example 2026-04-15 17:54:05 +02:00
Markus Ecker c61ebc5d15 chore: use pkg-pr-new preview packages in langgraph starter 2026-04-15 16:13:47 +02:00
Markus Ecker c8ff9d7bf6 fix: update langgraph example model to gpt-5.4 2026-04-14 16:24:34 +02:00
Ran Shem Tov eef4ac7fd0 chore: use latest langgraph and fix deployment 2026-04-14 14:20:16 +02:00
Jordan Ritter 15e096dd6b fix: starter-crewai-crews ignore TS build errors in Docker
HttpAgent type doesn't fully implement AbstractAgent, causing TS type
error during next build. Use ignoreBuildErrors like other starters.
2026-04-13 21:51:09 -07:00
Jordan Ritter 2a5e62d8a5 fix: starter-langgraph-python copy showcase.json into Docker context
The import ../../../../showcase.json from apps/app/src/hooks/ resolves
to the context root, but only apps/app/ was copied. Add COPY for
showcase.json.
2026-04-13 21:50:06 -07:00
Jordan Ritter cf75ec58b1 fix: resolve remaining 3 deploy failures
- starter-langgraph-python: use next build --webpack (Turbopack default
  in Next 16 can't handle serverExternalPackages)
- starter-crewai-crews: bump ag-ui-protocol>=0.1.10 to match
  ag-ui-crewai 0.1.5 requirement
- shell-dojolike: add recharts dependency (used by shared frontend)
2026-04-13 21:41:50 -07:00
Jordan Ritter 5aed8ee088 fix: resolve 4 remaining showcase deploy failures
- Remove test-integration-tmp from workflow (package was deleted)
- starter-langgraph-python: disable Turbopack for Next.js build
  (serverExternalPackages incompatible with Turbopack)
- starter-crewai-crews: pin crewai-tools~=0.47.1 to avoid version
  conflict with crewai==0.130.0
- shell-dojolike: add missing zod dependency (required by shared
  frontend modules)
2026-04-13 21:37:03 -07:00
Tyler Slaton 9554d5886c fix(langgraph-python): update deps and lockfile
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-13 15:07:49 -07:00
Martha Schumann c27b162589 fix: pin @ag-ui/client to 0.0.52 in CLI templates
Templates were pinned at old @ag-ui/client versions (0.0.40–0.0.46).
@copilotkit/runtime@1.55.2 ships 0.0.52, which added private fields to
AbstractAgent. The version split caused a nominal type error on build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 17:22:14 -07:00
Martha Schumann bdc01e3c12 chore: bump CLI template @copilotkit/* versions to 1.55.2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 16:56:19 -07:00
Martha Schumann 92f5bba0e4 chore: bump @copilotkit/* versions to 1.55.1 in all integration templates
Templates had stale pinned versions ranging from 1.9.3 to 1.52.1.
The CLI does a verbatim sparse checkout of these files, so users
scaffolding via `copilotkit create` were getting old versions installed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 15:34:35 -07:00
Jordan Ritter ebcb227ba3 Remove redundant sed agent URL patches from test Dockerfiles
Source route.ts files now read process.env.AGENT_URL natively (PR #3737),
so the build-time sed patches and verification greps are no longer needed.

Also removes crewai-crews docker-route-override.ts and its COPY line,
since that starter's route.ts already has AGENT_URL support.
2026-04-10 11:02:54 -07:00
Alem Tuzlak ff2093102c chore(lint): add new oxlint rules and auto-fix violations
Enable stricter oxlint rules for better code health:
- typescript/consistent-type-imports: enforce `import type` for type-only imports
- typescript/no-import-type-side-effects: prefer top-level type imports
- import/consistent-type-specifier-style: consistent type specifier placement
- typescript/no-unnecessary-type-assertion: bump to error
- react/self-closing-comp: enforce self-closing JSX components
- unicorn/prefer-optional-catch-binding: drop unused catch params
- eslint/no-useless-computed-key: simplify object keys
- unicorn/prefer-string-slice: prefer .slice() over .substring()
- unicorn/prefer-array-flat-map: prefer .flatMap() over .map().flat()

All existing violations auto-fixed via oxlint --fix.
2026-04-10 19:29:32 +02:00
Tyler Slaton 7f2a9ae176 feat(runtime): add factory mode to BuiltInAgent for backend-agnostic LLM integration (#3572)
## Summary

Adds **factory mode** to `BuiltInAgent`, enabling backend-agnostic LLM
integration without introducing a new class. Users provide a factory
function that creates the LLM stream — CopilotKit handles lifecycle
events, stream-to-AG-UI conversion, error handling, and
abort/cancellation.

### What's included

- **Three backend types**: `aisdk` (Vercel AI SDK), `tanstack` (TanStack
AI), and `custom` (raw AG-UI events)
- **Stream converters**: `convertAISDKStream` and
`convertTanStackStream` extract AG-UI events from backend-native streams
- **Input helpers**: `convertInputToTanStackAI` and
`convertMessagesToVercelAISDKMessages` for message/prompt conversion
- **State management**: Automatic `STATE_SNAPSHOT`/`STATE_DELTA` event
extraction from tool results
- **Reasoning support**: Auto-close logic for providers that never emit
`reasoning-end` (e.g. `@ai-sdk/anthropic`)
- **273 tests** across 16 test files covering all backend types,
converters, state tools, multimodal, and edge cases
- **Docs**: Comprehensive factory mode guide with 16 examples covering
tools, reasoning, state, forwardedProps, structured output
- **Example app**: React Router example migrated to factory mode

### Architecture

Factory mode is a discriminated union on `BuiltInAgentConfiguration`:

```typescript
const agent = new BuiltInAgent({
  type: "aisdk",           // or "tanstack" | "custom"
  factory: ({ input, abortSignal }) =>
    streamText({ model: openai("gpt-4o"), messages: ..., abortSignal }),
});
```

No new public classes — `BuiltInAgent` handles both simple mode (model
string) and factory mode (user-owned LLM call).

## PR feedback addressed

### Critical fixes
- **C1/M3**: Fixed TOCTOU window — `abortController` now set
synchronously before Observable creation in classic `run()`, with
concurrent run guard
- **C2/M2**: Classic `tool-result` now checks both `output` and `result`
property names, with `try/catch` on `JSON.stringify`
- **C3**: Error case safely handles `undefined` `p.error` with proper
fallback chain

### Important fixes
- **I2**: `RUN_ERROR` events now include `threadId` and `runId` in
classic mode (matching factory mode)
- **I3**: State tool events guarded against `undefined` snapshot/delta
before emitting
- **I4**: `JSON.stringify` wrapped in try/catch with descriptive
fallback message
- **M1**: `assignToolsToAgents` now skips factory-mode agents (prevents
config corruption)
- **M5**: TanStack converter's dropped event types documented with clear
limitation note

### Suggestions addressed
- **S1**: `@ts-expect-error` on `clone()` middlewares documented with
rationale
- **M4**: `AgentFactoryContext.abortController` kept (needed by TanStack
AI) but JSDoc added discouraging direct `.abort()` calls

## Test plan

- [x] 273 unit tests pass across all 3 backend types
- [x] Build succeeds
- [x] React Router example compiles
- [x] Docs render correctly (Vercel preview)
2026-04-09 21:34:44 -07:00
Tyler Slaton 9b3ece99b9 chore(format): commit unformatted code
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-09 21:03:12 -07:00
Jordan Ritter a3ff477e16 feat: add /health endpoint to all starter integration examples (#3738)
## Summary

Adds a `/health` GET endpoint returning `{"status": "ok"}` to all 11
starter integration examples. This is a best practice for any deployed
service — health checks enable platform health monitoring, load balancer
probes, and container lifecycle management.

**11 starters updated:**
- adk, agent-spec, agno, crewai-crews, crewai-flows, langgraph-fastapi,
llamaindex, ms-agent-framework-dotnet, ms-agent-framework-python,
pydantic-ai, strands-python

**1 skipped:**
- langgraph-python — uses `langgraph dev` which provides its own `/ok`
endpoint

All `/health` endpoints are registered before any catch-all mount to
ensure they take priority (lesson learned from the pydantic-ai showcase
bug).

## Test plan

- [ ] Each starter builds successfully
- [ ] `curl localhost:8000/health` returns `{"status": "ok"}` on each
2026-04-09 20:50:06 -07:00
Jordan Ritter 65508a641d feat: add /health endpoint to all starter integration examples 2026-04-09 20:40:10 -07:00
Jordan Ritter 89e99c65b7 Fix starter source bugs: configurable agent URL + crewai version bump (#3737)
## Summary

- **Configurable agent URL**: All starter `route.ts` files now read
`AGENT_URL` from environment with localhost fallback, enabling
deployment to non-localhost environments without code changes. Applied
to: pydantic-ai, adk, agno, llamaindex, ms-agent-framework-python,
ms-agent-framework-dotnet, crewai-crews.
- **crewai-crews version bump**: Bumped `ag-ui-crewai` from pinned
`==0.1.3` to `>=0.1.5` to pick up the `MethodExecutionFinishedEvent`
dict state fix from ag-ui-protocol/ag-ui#1478.
- **`.env.example` files**: Added `.env.example` with `OPENAI_API_KEY`
and `AGENT_URL` (correct default port per starter) to all affected
starters.

## Starters NOT touched (already configurable or different pattern)
- strands-python (uses `STRANDS_AGENT_URL`)
- langgraph-python / langgraph-js (use `LANGGRAPH_DEPLOYMENT_URL`)
- langgraph-fastapi (has docker-route-override)
- mastra (monolith, no separate agent URL)

## Test plan
- [ ] Verify each starter builds with `next build`
- [ ] Verify `AGENT_URL` env var is respected when set
- [ ] Verify localhost fallback works when `AGENT_URL` is unset
- [ ] Verify crewai-crews agent installs with `ag-ui-crewai>=0.1.5`
2026-04-09 20:35:05 -07:00
Jordan Ritter c374704d5e fix: bump ag-ui-crewai to >=0.1.5 for dict state bug fix
The starter pinned ag-ui-crewai==0.1.3 which crashes on crew completion:
'dict' object has no attribute 'messages' in MethodExecutionFinishedEvent
handler. Fixed upstream in ag-ui-protocol/ag-ui#1478, released in 0.1.5.
2026-04-09 20:27:24 -07:00
Jordan Ritter 147422bb85 feat: add universal AGENT_URL env var to all starters
Every starter's route.ts now reads process.env.AGENT_URL as the
primary agent endpoint, with framework-specific vars as fallback:

- AGENT_URL || "http://localhost:8000" (pydantic-ai, adk, agno, crewai,
  ms-agent-python, ms-agent-dotnet, strands-python)
- AGENT_URL || LANGGRAPH_DEPLOYMENT_URL || "http://localhost:8123"
  (langgraph-python, langgraph-js)
- AGENT_URL || "http://localhost:9000" (llamaindex)

Also adds .env.example with AGENT_URL to all starters.
2026-04-09 20:27:16 -07:00
Jordan Ritter bf3b95613b fix: remove catch-all route before adding override to avoid Next.js 16 conflict 2026-04-09 20:09:44 -07:00
Jordan Ritter 9205ee20ba fix: make ms-agent-dotnet endpoint configurable via OPENAI_BASE_URL for aimock proxy 2026-04-09 15:15:25 -07:00
Jordan Ritter ef55874072 fix: format files and add GHCR login to CI workflow 2026-04-09 09:16:05 -07:00
Jordan Ritter 7ddc0d8b2e feat: add Docker test infrastructure for all 12 starters 2026-04-09 08:33:21 -07:00
Jordan Ritter 5284614227 feat: add health monitoring with smoke endpoints, drift detection, and Slack alerts 2026-04-08 19:59:30 -07:00
Jordan Ritter 479e62cb7f feat: add unified showcase platform with CI, Docker starters, and 13 deployed integrations 2026-04-08 19:59:29 -07:00
Tyler Slaton 59a9c6f9d2 feat(langgraph-python): reorder suggestions
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-08 18:20:25 -07:00
Tyler Slaton 9feec6fe16 fix(langgraph-python): update dockerfile to mount int .pnpmfile.cjs
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-08 17:57:45 -07:00
Tyler Slaton e17aed817c fix(langgraph-python): update layout.tsx to be correct
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-08 17:49:36 -07:00
Tyler Slaton 8eaa429de2 chore(langgraph-python): bump versions
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-08 17:46:50 -07:00
Markus Ecker e3c00af220 feat(examples): A2UI + OpenGenUI demos, updated aimock fixtures, dojo e2e fixes 2026-04-08 12:50:56 -07:00
Ran Shemtov 2afc3c380e Merge branch 'main' into claude/explore-agentcore-cli-a25GL 2026-04-06 13:59:33 +02:00
Ran Shem Tov 5bedf17b66 fix(cli): align defaults in template and deployment 2026-04-06 13:57:56 +02:00
Ran Shem Tov 6985d58112 feat(cli): remove unused lambda tool 2026-04-06 13:55:10 +02:00
Maxim 2fb966bd68 fix: apply a2ui-root Strict Mode fix to example apps
Follow-up to #3607 — the same problematic `import { v0_8 } from "@a2ui/lit"`
pattern existed in 4 example files. Switch to `@a2ui/lit/0.8` subpath for value
imports and remove an unused v0_8 import. Also broaden the lint rule glob to
cover `examples/` and prevent regression.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 20:31:58 +02:00
Ran Shem Tov d1f57e6b37 feat(cli): provide a clean scaffolded agentcore project per framework 2026-04-03 17:36:37 +02:00
Ran Shem Tov 4cc494c84d chore: fix formatting 2026-04-03 15:04:40 +02:00
Ran Shem Tov efe66dcb28 chore(agentcore): add suffix on fast main stack for tracking 2026-04-03 10:12:56 +02:00
Alem Tuzlak 401a27c981 fix: resolve rebase conflicts and format files
- Remove stale eslint-config-custom refs from package.json files
- Regenerate pnpm-lock.yaml
- Format agentcore and other files with oxfmt
2026-04-02 16:43:34 +02:00
Alem Tuzlak 79ce60c580 chore: migrate from eslint+prettier to oxlint+oxfmt
Replace eslint and prettier with oxlint and oxfmt for faster linting
and formatting across the monorepo. Remove all eslint and prettier
configs, dependencies, and related packages. Add .oxlintrc.json and
.oxfmtrc.json for the new tooling. Update CI workflows and lefthook
hooks accordingly. Reformat codebase with oxfmt.

https://claude.ai/code/session_01GMkSf29p78HuMR1mbXn8He
2026-04-02 16:39:05 +02:00
Ran Shem Tov d7735a0177 chore(agentcore): explain AgentCoreRunner with why-it-exists comment block 2026-04-02 13:03:14 +02:00
Ran Shem Tov de2e9d31bc chore(agentcore): simplify agent identity extraction and remove dead code 2026-04-02 13:01:55 +02:00
Ran Shem Tov 3af48ff4e7 chore(agentcore): add local dev setup 2026-04-02 10:49:35 +02:00
Ran Shem Tov a3af6a9b53 chore(agentcore): removed unused files and classes 2026-04-02 10:49:35 +02:00
Ran Shem Tov 47a3808908 chore(agentcore): use local uncommitted config.yaml 2026-04-02 10:49:35 +02:00
Ran Shem Tov 169756b60e chore(agentcore): add missing frontend files 2026-04-02 10:49:35 +02:00