109 Commits

Author SHA1 Message Date
copilotkit-qa-bot[bot] 4c5402a0aa chore(sdk-python): release 0.1.96 2026-08-26 15:12:51 -07:00
Ben Taylor e0a2f00cca fix: relax partialjson version constraint in sdk-python (#6123)
## What does this PR do?

Relaxes the over-strict `partialjson` version constraint in
`sdk-python/pyproject.toml` so the CopilotKit Python SDK can consume
newer compatible `partialjson` releases.

**Change:** `sdk-python/pyproject.toml`
- Before: `partialjson = "^0.0.8"`
- After:  `partialjson = ">=0.0.8,<2.0.0"`

## Why

Poetry interprets `^0.0.8` on a `0.0.x` version as `>=0.0.8,<0.0.9`,
which effectively pins the SDK to **exactly** `0.0.8`. This blocks users
from receiving newer, compatible `partialjson` releases (currently
published: `0.0.9`, `0.1.0`, `1.0.0`, `1.1.0`). Relaxing the constraint
lets the SDK pick up fixes and features while still treating the next
major (`2.0.0`) as the breaking-change boundary.

I verified the API the SDK actually uses — `from partialjson.json_parser
import JSONParser` and `JSONParser().parse(...)` — is unchanged across
all published versions up to `1.1.0` (the `JSONParser.__init__` /
`parse` signatures are backward compatible, and the SDK call passes no
arguments). There is no breaking-API risk within the chosen range.

## Test plan

- [x] Validated `sdk-python/pyproject.toml` is well-formed:
`python3 -c "import tomllib,pathlib;
tomllib.load(pathlib.Path('sdk-python/pyproject.toml').open('rb'))"`
- [x] Grepped `sdk-python` for `partialjson` usages — only
`copilotkit/runloop.py` imports/uses it; API is stable across the
allowed range.
- [ ] `poetry lock` / `poetry install` in `sdk-python` resolves a
`partialjson` version within `>=0.0.8,<2.0.0`.

## Changed files

- `sdk-python/pyproject.toml` — single line changed (dependency range
only). No source, example, or lockfile changes.

## Checklist

- [x] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] No documentation change required (dependency range only)
- [x] "Allow edits by maintainers" is checked

Relates to #4131
2026-08-18 09:56:22 -05:00
Benjamin Taylor 07855f3fc9 chore: release python sdk 0.1.95
Ships the four sdk-python fixes merged since 0.1.94 (2026-06-04), none of
which are in any published artifact — the newest upload of any kind is the
0.1.95a4 prerelease from 2026-06-19, which predates all of them.

Closes #6231

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 11:58:08 -05:00
godququ5-code bf5b1a0be4 fix: relax partialjson version constraint in sdk-python
Poetry's ^0.0.8 on a 0.0.x version resolves to >=0.0.8,<0.0.9,
pinning users to exactly 0.0.8 and blocking newer compatible
releases (0.0.9, 0.1.0, 1.0.0, 1.1.0). Relax to >=0.0.8,<2.0.0
so the SDK can pick up fixes/features while still gating on the
next major (2.0.0) as the breaking boundary.

The only SDK usage is partialjson.json_parser.JSONParser().parse(),
which is unchanged across all published versions up to 1.1.0.

Relates to #4131
2026-07-27 10:10:50 +03:00
Ran Shem Tov 186b007091 chore(sdk-python): require ag-ui-langgraph >=0.0.42
0.0.42 ships the single-arg A2UIToolParams API the middleware's a2ui_params
override relies on; pulls ag-ui-a2ui-toolkit 0.0.4 transitively. uv.lock is
unchanged — it locks only the dev/test toolchain, not the runtime deps.
2026-06-19 17:51:02 +02:00
Ran Shem Tov 6e9240accc chore(deps): revert @ag-ui/core,client to 0.0.53 (decouple from langgraph 0.0.41 bump)
@ag-ui/client 0.0.56 changed runHttpRequest to a thunk signature, breaking
@copilotkit/core's ProxiedCopilotRuntimeAgent. OSS-248 only needs
@ag-ui/langgraph 0.0.41; keep that, revert the unrelated core/client/protocol
'latest' bump. Adopting client 0.0.56 is a separate migration.
2026-06-09 16:59:50 +02:00
Ran Shem Tov cf7bcd67e5 chore(deps): use latest @ag-ui packages and langgraph integration
- @ag-ui/core, @ag-ui/client: 0.0.53 -> 0.0.56 across all packages
  (react-core, core, react-native, vue, runtime, angular, shared,
  web-inspector, agentcore-runner, demo-agents, sqlite-runner) + root
  pnpm override; shared's @ag-ui/core range floor -> >=0.0.56.
- @ag-ui/langgraph (runtime): 0.0.39 -> 0.0.40.
- ag-ui-protocol (sdk-python): >=0.1.15 -> >=0.1.19.
- .npmrc: exclude first-party @ag-ui/{core,client,encoder,proto} from the
  minimum-release-age gate so the freshly-published 0.0.56 set installs.
- Regenerate pnpm-lock.yaml + sdk-python/poetry.lock.
2026-06-09 12:14:12 +02:00
Ran Shem Tov 5bb32b9dd5 feat(a2ui): use new ag-ui single-arg A2UIToolParams API (OSS-248)
ag-ui-langgraph's tool factory now takes one A2UIToolParams object (model
inside) and folds composition_guide into the guidelines bag.

- sdk-js middleware: getA2UITools(params) + type A2UIToolParams import;
  pin @ag-ui/langgraph 0.0.40 (the JS release carrying the new API).
- sdk-python middleware: get_a2ui_tools(params) + guarded A2UIToolParams
  import; pin ag-ui-langgraph >=0.0.41 (the py release with the new API).
- Update the a2ui injection test skip-reason wording.
2026-06-09 12:13:51 +02:00
Ran Shem Tov c85c140f05 feat: update all dependencies to use latest a2ui implementation features 2026-06-08 12:09:20 +02:00
Ran Shem Tov 2b5d2e0113 chore: release python sdk 0.1.94 2026-06-04 19:39:44 +02:00
Ran Shem Tov 02ae7895e9 chore: restore copilotkit py version 2026-06-04 18:37:52 +02:00
Ran Shem Tov 3ca0f194b8 feat(sdk): gate auto-A2UI injection on injectA2UITool (opt-in)
The A2UI middleware (@ag-ui/a2ui-middleware) forwards injectA2UITool on
forwardedProps; ag-ui-langgraph surfaces it into agent state at
state["ag-ui"]["inject_a2ui_tool"]. The CopilotKit LangGraph middleware
(py + js) now reads that flag and only injects generate_a2ui when it is
truthy (opt-in), drops the runtime's render_a2ui so the model sees one
A2UI tool, and skips if the agent already defines generate_a2ui. The
catalog only binds surfaces; it is no longer the gate.

Reverts the earlier runtime-forward + context-channel approach.

Deps: ag-ui-langgraph>=0.0.38 (py), @ag-ui/langgraph 0.0.37 (sdk-js),
@ag-ui/a2ui-middleware 0.0.6 + @ag-ui/langgraph 0.0.37 (runtime);
.npmrc min-release-age exclude for @ag-ui/a2ui-middleware. Showcase
langgraph pins bumped to copilotkit==0.1.94a3 / sdk-js 1.59.3-alpha.3 /
@ag-ui/langgraph 0.0.37.
2026-06-04 18:37:03 +02:00
Ran Shem Tov ce4e4142b2 feat(sdk): auto-inject A2UI tool in CopilotKitMiddleware
Prebuilt agents get dynamic A2UI with no extra wiring — adding the
middleware is enough. When the frontend registers an A2UI catalog
(surfaced by the runtime into state["ag-ui"].a2ui_schema), the
middleware infers the agent's own model, advertises the generate_a2ui
tool in the model-call hook, and executes it in the tool-call hook.
No catalog → the tool is never advertised.

Covers both @copilotkit/sdk-js and the copilotkit Python SDK. Bumps
the A2UI tool-factory dependency to where get_a2ui_tools ships
(@ag-ui/langgraph 0.0.35, ag-ui-langgraph >=0.0.37).
2026-06-04 18:36:12 +02:00
Jordan Ritter e77856e6b7 chore(sdk-python): release v0.1.93 2026-05-28 21:15:00 -07:00
Jordan Ritter 6b6e08fb8a chore(sdk-python): release v0.1.92 2026-05-28 14:39:07 -07:00
Maxim dff634d462 Merge branch 'main' into feature/emit-tool-call-optional-id 2026-05-27 15:12:10 +02:00
Jordan Ritter 5f679863c6 chore(sdk-python): release v0.1.91
Cuts copilotkit 0.1.91 with forwarded-header extraction landed in
#4984 (_extract_forwarded_headers_from_config + lowercase-at-insertion
precedence + exception-safe ContextVar clearing).
2026-05-26 08:58:31 -07:00
Maxim cc69fd04ef fix(sdk): add pytest-asyncio dev dependency for async test support
The new test_emit_tool_call_optional_id.py uses async test methods
decorated with @pytest.mark.asyncio, but pytest-asyncio was missing
from dev dependencies — causing all 11 async tests to fail in CI
across all Python versions (3.10–3.14).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 23:36:29 +02:00
Ran Shem Tov 6f3080ce05 chore: release sdk python 0.1.90 2026-05-21 10:24:13 -05:00
Ran Shemtov 5aaca65485 chore: release sdk-python 0.1.88 2026-05-01 09:33:19 +00:00
Ran Shem Tov 46079baf32 chore(sdk-python): pin pydantic-core floor to 2.35 for 3.14 wheels
Plain `poetry lock` (no --regenerate) was resolving pydantic-core 2.33.2,
which has no cp314 wheel and forces a Rust source build that fails on
PyO3 0.24 (capped at 3.13). Floor pin steers the resolver to 2.46.3
which ships cp314 wheels, so contributor PRs that bump deps and re-lock
keep CI green on 3.14.
2026-04-29 14:02:04 +02:00
Ran Shem Tov b3ead812da chore(sdk-python): bump ag-ui-langgraph floor for 3.14 support
ag-ui-langgraph 0.0.35 lifts requires-python to <3.15. Bump floor
from 0.0.29 so 3.14 environments resolve. Add 3.14 classifier.
Regenerate poetry.lock.
2026-04-29 14:02:04 +02:00
Ran Shem Tov ce9434d1e6 chore: raise python ceiling to 3.14 2026-04-29 14:02:04 +02:00
Alem Tuzlak 35a68aea90 Merge remote-tracking branch 'origin/main' into fix/crewai-import-compat-3268
# Conflicts:
#	sdk-python/pyproject.toml
2026-04-22 14:36:35 +02:00
Alem Tuzlak d02c5eed6a fix: allow Python 3.13+ in SDK version constraint (#3834)
## Summary
- Widens the python dependency from `>=3.10,<3.13` to `>=3.10,<4`
- Adds Python 3.13 classifier to enable installation on newer Python
versions

Closes #3156
2026-04-22 14:23:04 +02:00
Alem Tuzlak 3f6c80d8a0 Merge branch 'main' into fix/issue-2921 2026-04-22 12:59:18 +02:00
Alem Tuzlak 95fe4889b6 Merge remote-tracking branch 'origin/main' into fix/crewai-import-compat-3268
# Conflicts:
#	sdk-python/pyproject.toml
2026-04-22 12:26:49 +02:00
Alem Tuzlak 51b0513eab Merge remote-tracking branch 'origin/main' into fix/issue-3156
# Conflicts:
#	sdk-python/pyproject.toml
2026-04-22 12:13:45 +02:00
Ran Shem Tov 6986a1c120 fix: use latest agui langgraph packages 2026-04-15 18:11:17 +02:00
Jordan Ritter 19798bbbd3 fix(sdk-python): support both old and new crewai import paths (#3268) 2026-04-14 16:24:09 -07:00
Jordan Ritter aa8a9e0688 fix: cap Python at <3.14 to match ag-ui-langgraph constraint 2026-04-12 15:43:12 -07:00
Jordan Ritter 906ab8d6e2 fix: add Python version constraint for crewai dependency
crewai requires Python <3.13, so add a python marker to prevent
resolution failures when the project supports >=3.10,<4.
2026-04-12 15:38:49 -07:00
Jordan Ritter 9483051492 fix: allow Python 3.13+ in SDK version constraint (#3156)
Widen the python dependency from >=3.10,<3.13 to >=3.10,<4 and add
Python 3.13 classifier to enable installation on newer Python versions.
2026-04-12 15:09:38 -07:00
Jordan Ritter 9fa923e421 fix: add py.typed marker to Python SDK for PEP 561 compliance (#2921)
Creates the empty py.typed file and adds it to pyproject.toml's
include list so type checkers recognize the package as typed.
2026-04-12 15:05:13 -07:00
Jordan Ritter f5462915c3 ci: fix static_danger matrix bug, python-sdk concurrency and dep pin
- static_danger: removed undefined matrix.node-version, upgraded to
  v4, added concurrency and timeout
- python-sdk: added concurrency and timeout, pinned ag-ui-langgraph
  <0.0.32 (0.0.32 imports non-existent ImageInputContent from ag_ui.core)
2026-04-10 10:37:42 -07:00
Markus Ecker 0a11a05772 feat(sdk-python): A2UI helpers and before_agent ID reuse fix
Add copilotkit.a2ui module with operation builders and prompt helpers,
fix SystemMessage ID reuse in before_agent to prevent LangGraph duplication,
add Pydantic model_dump serialization for app_context.
2026-04-08 12:50:28 -07:00
Ran Shem Tov a7e3e131d5 chore: loosen up langgraph dependencies on copilotkit and release 2026-04-07 13:14:00 +02:00
Ran Shem Tov aae2c5cee1 chore: use latest ag-ui langgraph version 2026-04-03 14:57:45 +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
Tyler Slaton 368663dd08 fix(sdk-python): add missing import re in copilotkit_lg_middleware
The re module was used in _fix_messages_for_bedrock (re.compile) but
never imported, causing NameError at runtime when the middleware is
invoked. Bumps version to 0.1.83.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 16:42:56 -07:00
Tyler Slaton a33d24496b chore(sdk-python): bump version to 0.1.82
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-20 16:27:22 -07:00
Ran Shem Tov 3c98ceab9c chore: release py-sdk 0.1.81 2026-03-19 13:45:33 +01:00
Ran Shem Tov 2f2fdec7ee chore: fix python test ci process 2026-03-19 13:45:10 +01:00
Ran Shem Tov c3adbd4113 chore: release py-sdk 0.1.80 2026-03-19 13:00:14 +01:00
Ran Shem Tov 31a721cdae feat: re-export state streaming langgraph middleware 2026-03-19 12:58:55 +01:00
Ran Shem Tov 82eaf93f11 chore: release lg python sdk 0.1.79 2026-03-13 17:31:15 +01:00
Ran Shem Tov 4506570206 chore: use latest python langgraph ag-ui 2026-03-13 13:49:15 +01:00
Jordan Ritter 973b4e460e fix(sdk-python): loosen FastAPI version ceiling from ^0.115.0 to >=0.115.0,<1.0.0 (#3261)
## Problem

The Poetry caret constraint `^0.115.0` in `sdk-python/pyproject.toml`
resolves to `>=0.115.0,<0.116.0` for 0.x versions (per [PEP 440 / Poetry
docs](https://python-poetry.org/docs/dependency-specification/#caret-requirements)).
This blocks installation alongside any FastAPI release since **0.116.0
(June 2025)**.

Current stable FastAPI is **0.129.0** — 14 minor versions ahead of the
ceiling.

## Impact

- Cannot `pip install copilotkit` in any project using FastAPI >=0.116.0
- Multiple users blocked (see #2771 comments)
- Our production project has **~90 tests bypassed** with
`COPILOTKIT_AVAILABLE = False` guards because of this

## Fix

```diff
- fastapi = "^0.115.0"
+ fastapi = ">=0.115.0,<1.0.0"
```

This allows all current and future 0.x FastAPI releases while still
capping at the upcoming 1.0 major version boundary, which may introduce
breaking changes.

## Testing

- The SDK uses standard FastAPI features (routing, dependency injection,
middleware) that have been stable across all 0.11x–0.12x releases
- No FastAPI APIs used by the SDK were deprecated or removed in
0.116.0–0.129.0
- `ag-ui-langgraph` (also in deps) uses `>=0.115.0` without an upper
bound, so this change aligns the two constraints

## Note on `ag-ui-langgraph`

`ag-ui-langgraph[fastapi]` also depends on FastAPI. Its constraint is
already `>=0.115.0` (no ceiling), so this change to `copilotkit` is the
only fix needed.

Fixes #2771
2026-03-06 14:39:52 -04:00
Jordan Ritter 8bad9f30ac test: add unit tests for emit_messages/emit_tool_calls filtering
Tests the two bugs fixed in this PR:
1. Dict raw_event metadata must be read with .get(), not getattr()
2. Filtered events must return None (not ""), and run() strips them

Adds pytest as a dev dependency.
2026-03-06 08:32:06 -08:00
BreBryBro 62ba11fe1c fix(sdk-python): loosen FastAPI version ceiling from ^0.115.0 to >=0.115.0,<1.0.0
The Poetry caret constraint `^0.115.0` resolves to `>=0.115.0,<0.116.0` for
0.x versions, blocking installation alongside any FastAPI release since 0.116.0
(June 2025). This prevents adoption of the Python SDK in projects using current
FastAPI versions.

Change to `>=0.115.0,<1.0.0` to allow all 0.x releases while still capping
at the upcoming 1.0 major version boundary.

Fixes #2771
2026-02-23 16:19:04 -06:00