You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -171,7 +170,7 @@ validate state contained in [`RunAgentInput.state`](https://docs.ag-ui.com/sdk/j
171
170
If the `state` field's type is a Pydantic `BaseModel` subclass, the raw state dictionary on the request is automatically validated. If not, you can validate the raw value yourself in your dependencies dataclass's `__post_init__` method.
172
171
173
172
174
-
```python {title="ag_ui_state.py" py="3.10"}
173
+
```python {title="ag_ui_state.py"}
175
174
from pydantic import BaseModel
176
175
177
176
from pydantic_ai import Agent
@@ -211,7 +210,7 @@ which returns a (subclass of)
211
210
[`BaseEvent`](https://docs.ag-ui.com/sdk/python/core/events#baseevent), which allows
@@ -217,10 +214,10 @@ Unlike `run_stream()`, it always runs the agent graph to completion even if text
217
214
To get the best of both worlds, at the expense of some additional complexity, you can use [`agent.iter()`][pydantic_ai.agent.AbstractAgent.iter] as described in the next section, which lets you [iterate over the agent graph](#iterating-over-an-agents-graph) and [stream both events and output](#streaming-all-events-and-output) at every step.
Copy file name to clipboardExpand all lines: docs/changelog.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,16 @@ Pydantic AI is still pre-version 1, so breaking changes will occur, however:
12
12
!!! note
13
13
Here's a filtered list of the breaking changes for each version to help you upgrade Pydantic AI.
14
14
15
+
### v0.8.0 (2025-08-26)
16
+
17
+
See [#2689](https://github.com/pydantic/pydantic-ai/pull/2689) - `AgentStreamEvent` was expanded to be a union of `ModelResponseStreamEvent` and `HandleResponseEvent`, simplifying the `event_stream_handler` function signature. Existing code accepting `AgentStreamEvent | HandleResponseEvent` will continue to work.
18
+
19
+
### v0.7.6 (2025-08-26)
20
+
21
+
The following breaking change was inadvertently released in a patch version rather than a minor version:
22
+
23
+
See [#2670](https://github.com/pydantic/pydantic-ai/pull/2670) - `TenacityTransport` and `AsyncTenacityTransport` now require the use of `pydantic_ai.retries.RetryConfig` (which is just a `TypedDict` containing the kwargs to `tenacity.retry`) instead of `tenacity.Retrying` or `tenacity.AsyncRetrying`.
24
+
15
25
### v0.7.0 (2025-08-12)
16
26
17
27
See [#2458](https://github.com/pydantic/pydantic-ai/pull/2458) - `pydantic_ai.models.StreamedResponse` now yields a `FinalResultEvent` along with the existing `PartStartEvent` and `PartDeltaEvent`. If you're using `pydantic_ai.direct.model_request_stream` or `pydantic_ai.direct.model_request_stream_sync`, you may need to update your code to account for this.
Copy file name to clipboardExpand all lines: docs/cli.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,3 +108,31 @@ async def main():
108
108
```
109
109
110
110
_(You'll need to add `asyncio.run(main())` to run `main`)_
111
+
112
+
### Message History
113
+
114
+
Both `Agent.to_cli()` and `Agent.to_cli_sync()` support a `message_history` parameter, allowing you to continue an existing conversation or provide conversation context:
The CLI will start with the provided conversation history, allowing the agent to refer back to previous exchanges and maintain context throughout the session.
0 commit comments