Skip to content

[Feature]: Python SDK — client support for streaming tool calls + demo #2800

Open

Description

@contextablemark

Follows #2799. Extends the Python client from text-only to the tool-call event surface, and
proves it with a runnable demo.

Scope

  • Decode TOOL_CALL_START / TOOL_CALL_ARGS / TOOL_CALL_END / TOOL_CALL_RESULT.
  • Accumulate argument deltas per tool_call_id and expose completed calls as typed objects.
  • Handle interleaved tool calls without mixing argument buffers.
  • Ship a small demo that connects to an existing AG-UI server and prints tool calls as they
    stream.

Acceptance criteria

  • Sequential and interleaved tool calls both decode correctly.
  • Accumulated arguments parse as valid JSON on TOOL_CALL_END.
  • Malformed argument JSON produces a clear error naming the offending tool_call_id —
    it does not take down the stream.
  • The demo runs against one of the integrations/server-starter* servers with documented
    steps.

Pointers

  • sdks/typescript/packages/client/ for the equivalent TS handling.
  • integrations/server-starter-all-features/ as the demo's counterpart server.

Out of scope

Frontend tool execution — #2801.

Activity

  1. contextablemark commented on Sep 30, 2026

    @contextablemark
    ContributorAuthor

    This issue is already claimed externally. Please don’t start new work on it. If you need this fixed immediately, please reach out to us in our Discord or via eng@copilotkit.ai.

    @zerolxy612 My apologies for deleting your comments, but I do not want to prejudice the eventual implementation of this feature, part of the goal of which is to give the implementors the experience of creating something from scratch. Thanks for your understanding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

help wantedExtra attention is needed

Type

No type

Projects

  • Status
    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions