@@ -7,34 +7,36 @@ Implementation of the AG-UI protocol for PydanticAI.
7
7
This example uses a PydanticAI agent using an OpenAI model and the AG-UI dojo.
8
8
9
9
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 )
12
11
13
12
## Running
14
13
15
14
To run this integration you need to:
16
15
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
18
17
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
21
20
22
21
``` 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
27
23
```
28
24
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:
31
33
32
34
` ` ` shell
33
35
cd typescript-sdk
34
36
pnpm install && pnpm run dev
35
37
` ` `
36
38
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)
38
40
39
41
# # Feature Demos
40
42
@@ -97,7 +99,8 @@ Generate a list of steps for cleaning a car for me to review
97
99
### [Predictive State Updates](http://localhost:3000/pydantic-ai/feature/predictive_state_updates)
98
100
99
101
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.
101
104
102
105
#### Story Tools
103
106
0 commit comments