Skip to content

Commit 04ac18a

Browse files
committed
docs(ag-ui): improve examples documentation
Various improvements to the examples documentation for the AG UI, fixing the process.
1 parent 3232c12 commit 04ac18a

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

examples/pydantic_ai_ag_ui_examples/README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,36 @@ Implementation of the AG-UI protocol for PydanticAI.
77
This example uses a PydanticAI agent using an OpenAI model and the AG-UI dojo.
88

99
1. An [OpenAI API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key)
10-
2. A clone of this repository
11-
3. A clone of the [AG-UI protocol repository](https://github.com/ag-ui-protocol/ag-ui)
10+
2. A clone of the [AG-UI protocol repository](https://github.com/ag-ui-protocol/ag-ui)
1211

1312
## Running
1413

1514
To run this integration you need to:
1615

17-
1. Make a copy of `jobs-agent/.env.local-example` as `.env`
16+
1. Make a copy of `.env-sample` as `.env` in the `typescript-sdk/integrations/pydantic-ai` directory
1817
2. Open it in your editor and set `OPENAI_API_KEY` to a valid OpenAI key
19-
3. Open terminal in the root directory of this repository clone
20-
4. Install the required modules and run the server
18+
3. Open terminal in the `typescript-sdk/integrations/pydantic-ai` of the `ag-ui` repo
19+
4. Install the `pydantic-ai-examples` package
2120

2221
```shell
23-
cd jobs-agent
24-
just install-deps
25-
source .venv/bin/activate
26-
python -m examples.pydantic_ai_ag_ui_examples.dojo_server
22+
pip/uv-add pydantic-ai-examples
2723
```
2824

29-
5. Open another terminal in root directory of the `ag-ui` repository clone
30-
6. Start the integration ag-ui dojo:
25+
5. Run the example dojo server
26+
27+
```shell
28+
python -m pydantic_ai_ag_ui_examples.dojo_server
29+
```
30+
31+
6. Open another terminal in root directory of the `ag-ui` repository clone
32+
7. Start the integration ag-ui dojo:
3133

3234
```shell
3335
cd typescript-sdk
3436
pnpm install && pnpm run dev
3537
```
3638

37-
7. Finally visit [http://localhost:3000/pydantic-ai](http://localhost:3000/pydantic-ai)
39+
8. Finally visit [http://localhost:3000/pydantic-ai](http://localhost:3000/pydantic-ai)
3840

3941
## Feature Demos
4042

@@ -97,7 +99,8 @@ Generate a list of steps for cleaning a car for me to review
9799
### [Predictive State Updates](http://localhost:3000/pydantic-ai/feature/predictive_state_updates)
98100
99101
Demonstrates how to use the predictive state updates feature to update the state
100-
of the UI based on agent responses, including user interaction via git aconfirmation.
102+
of the UI based on agent responses, including user interaction via user
103+
confirmation.
101104
102105
#### Story Tools
103106

0 commit comments

Comments
 (0)