File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
examples/pydantic_ai_ag_ui_examples Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,16 @@ What is the time in New York?
58
58
Change the background to blue
59
59
` ` `
60
60
61
+ A complex example which mixes both AG-UI and PydanticAI tools:
62
+
63
+ ` ` ` text
64
+ Perform the following steps, waiting for the response of each step before continuing:
65
+ 1. Get the time
66
+ 2. Set the background to red
67
+ 3. Get the time
68
+ 4. Report how long the background set took by diffing the two times
69
+ ` ` `
70
+
61
71
# ## [Agentic Generative UI](http://localhost:3000/pydantic-ai/feature/agentic_generative_ui)
62
72
63
73
Demonstrates a long running task where the agent sends updates to the frontend
@@ -108,8 +118,7 @@ Bruce was a good dog,
108
118
Agent prompt
109
119
110
120
```text
111
- Help me complete my story about bruce the dog, is should be no longer than a
112
- sentence.
121
+ Help me complete my story about bruce the dog, is should be no longer than a sentence.
113
122
```
114
123
115
124
### [Shared State](http://localhost:3000/pydantic-ai/feature/shared_state)
Original file line number Diff line number Diff line change 20
20
21
21
instructions : str = """When planning tasks use tools only, without any other messages.
22
22
IMPORTANT:
23
- - Use the `human_in_the_loop ` tool to display the suggested steps to the user
23
+ - Use the `generate_task_steps ` tool to display the suggested steps to the user
24
24
- Never repeat the plan, or send a message detailing steps
25
25
- If accepted, confirm the creation of the plan and the number of selected (enabled) steps only
26
- - If rejected , ask the user for additional information
26
+ - If not accepted , ask the user for more information, DO NOT use the `generate_task_steps` tool again
27
27
"""
28
28
router : APIRouter = APIRouter (prefix = '/human_in_the_loop' )
29
29
agui : AGUIAgent = AGUIAgent (instructions = instructions )
You can’t perform that action at this time.
0 commit comments