mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
77a1df2593
Align the claude-sdk-python and claude-sdk-typescript demo integrations behind the published quickstarts: move the @region markers used for doc snippet extraction, add the state-streaming and weather-tool snippet files, and add setup-doc content. Runtime alignment: the TS agent handlers consistently emit text/event-stream; the streaming snippets emit a fresh STATE_SNAPSHOT per delta and drop the undeclared partial-json dependency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
12 lines
422 B
Plaintext
12 lines
422 B
Plaintext
<Steps>
|
|
<Step>
|
|
### Put shared state in the system prompt and tools
|
|
|
|
The demo exposes frontend preferences to Claude and gives the agent a tool
|
|
for writing notes back into CopilotKit state. Keep the state contract small,
|
|
typed, and mirrored by the UI components that read the same values.
|
|
|
|
<DemoCode file="src/agents/shared_state_read_write_agent.py" region="shared-state-setup" />
|
|
</Step>
|
|
</Steps>
|