Skip to content

Update framework documentation#184

Merged
anbuzin merged 19 commits into
mainfrom
update-docs-alpha2
Jul 8, 2026
Merged

Update framework documentation#184
anbuzin merged 19 commits into
mainfrom
update-docs-alpha2

Conversation

@anbuzin

@anbuzin anbuzin commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Restructures and refactors framework documentation, both docs and skills.

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-python Ready Ready Preview, Comment Jul 8, 2026 5:55pm

Comment thread docs/ai-python/content/docs/basics/agents.mdx

@msullivan msullivan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM mostly!

I didn't look at the SKILLs really. Let me know if you think I should

Comment on lines +8 to +17
This adapter provides integration with the UI part of the sister AI SDK
in TypeScript.

## Parse UI messages
AI SDK UI provides `useChat`, which handles streaming complexity on the
client side, such as collecting message chunks and optimistically updating
the UI when the user submits a new message.

Accept `UIMessage` values from an AI SDK UI client, then convert them to
runtime messages:
The AI SDK UI's data model is significantly different from the AI SDK for
Python's, which is why you need to convert events and messages back and forth
using the adapter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we want to put some links in here


@app.post("/chat")
async def chat(request: ChatRequest):
messages, approvals = ai.agents.ui.ai_sdk.to_messages(request.messages)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to mention the new tools argument?

behavior.

## When to customize the loop
## Explore the standard loop shape

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should mention somewhere explicitly that loop runs in a separate task that communicates via a queue and so doesn't run in lock-step with the calling code?

Comment on lines +104 to +105
`ai.stream` accepts a list of `ai.Tool`, however, it does not have any
framework-side tool execution machinery. Use an agent when you want the SDK to

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should stick with saying that it does not execute function tools locally, or some such. I think "does not have any framework-side tool execution machinery" is unduly complicated

yield part
```

Return `UI_MESSAGE_STREAM_HEADERS` on streamed AI SDK UI responses.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm?

Comment on lines +60 to +61
Keep messages as the durable boundary. Streams, tool runners, hook futures, and
provider clients are runtime state.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too AI-terse to be helpful

Comment on lines +43 to +46
stream.context
stream.messages
stream.output
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to explain these some more?

- `HookSuspension`
- `HookResolution`

Stream event unions:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

`yield_from`.
- `HookEvent`: Carries an internal hook message and `HookPart`.

Agent event unions:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Comment thread README.md

async def main() -> None:
model = ai.get_model("gateway:anthropic/claude-sonnet-4")
model = ai.get_model("anthropic/claude-sonnet-4")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update all the claude-sonnet-4's to 4.6 or 5?

@anbuzin
anbuzin force-pushed the update-docs-alpha2 branch from 66e5f3c to 48c25e2 Compare July 8, 2026 17:53
@anbuzin
anbuzin merged commit f34f6a4 into main Jul 8, 2026
6 checks passed
@anbuzin
anbuzin deleted the update-docs-alpha2 branch July 8, 2026 17:57
@anbuzin anbuzin mentioned this pull request Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants