Skip to content

Commit 71e7588

Browse files
authored
Google adk tour (#33)
* Restate runner * Improve runner abstraction * Add mcp and websearch examples * Add mcp examples * bind websearch and mcp approval agents * Cleanup * Context manager runner * Cleanup * Use SDK OpenAI extensions * add retry opts * update template * update openai agents tour * update openai agents tour * Add ADK tour examples * Add ADK tour * Use RestateSession everywhere * Google ADK tour * Google ADK tour * Fix service version * Delete experiment * Add git workflows for adk * update readme * update links * update git workflow * Formatting
1 parent 1637853 commit 71e7588

30 files changed

+1174
-667
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ jobs:
2525
draft: true
2626
files: |
2727
python-openai-agents-tour-of-agents.zip
28+
python-openai-agents-examples.zip
2829
python-openai-agents-template.zip
30+
python-google-adk-tour-of-agents.zip
2931
python-patterns.zip
3032
typescript-vercel-ai-examples.zip
3133
typescript-vercel-ai-template.zip
3234
typescript-vercel-ai-template-nextjs.zip
3335
typescript-vercel-ai-tour-of-agents.zip
36+
typescript-patterns.zip

.tools/run_python_tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ function python_mypi_lint() {
2929
# OpenAI agents Python examples
3030
pushd $PROJECT_ROOT/openai-agents/template && python_mypi_lint && popd
3131
pushd $PROJECT_ROOT/openai-agents/tour-of-agents && python_mypi_lint && popd
32+
pushd $PROJECT_ROOT/openai-agents/examples && python_mypi_lint && popd
33+
34+
# Google ADK agents Python examples
35+
pushd $PROJECT_ROOT/google-adk/tour-of-agents && python_mypi_lint && popd
3236

3337
# Pattern Python examples
3438
pushd $PROJECT_ROOT/python-patterns && python_mypi_lint && popd

.tools/update_python_examples.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ search_and_replace_version $PROJECT_ROOT/a2a
1919

2020
# OpenAI agents Python examples
2121
search_and_replace_version $PROJECT_ROOT/openai-agents/tour-of-agents
22+
search_and_replace_version $PROJECT_ROOT/openai-agents/examples
2223
search_and_replace_version $PROJECT_ROOT/openai-agents/template
2324

25+
# Google ADK agents Python examples
26+
search_and_replace_version $PROJECT_ROOT/google-adk/tour-of-agents
27+
2428
# Pattern Python examples
2529
search_and_replace_version $PROJECT_ROOT/python-patterns

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ The Restate approach works **independent of specific SDKs** but **integrates eas
3535
## Full Example Catalog
3636

3737
### Agent SDK Integrations
38-
| Integration | Example | Description | Code | Docs |
39-
|-------------|---------|-------------|------|------------------------------------------------------|
40-
| **Vercel AI SDK** | **Template** | A minimal example of how to use Restate with the Vercel AI SDK | [<img src="https://skillicons.dev/icons?i=ts&theme=light" width="20" height="20">](vercel-ai/template) | [📖](https://docs.restate.dev/ai-quickstart) |
41-
| | **Tour of Agents** | A step-by-step tutorial showing how to build resilient agents | [<img src="https://skillicons.dev/icons?i=ts&theme=light" width="20" height="20">](vercel-ai/tour-of-agents) | [📖](https://docs.restate.dev/tour/vercel-ai-agents) |
42-
| | **Examples** | More advanced examples that can be deployed as a Next.js app on Vercel | [<img src="https://skillicons.dev/icons?i=ts&theme=light" width="20" height="20">](vercel-ai/examples) | - |
43-
| **OpenAI Agents SDK** | **Template** | A minimal example of how to use Restate with the OpenAI Agents SDK | [<img src="https://skillicons.dev/icons?i=python&theme=light" width="20" height="20">](openai-agents/template) | [📖](https://docs.restate.dev/ai-quickstart) |
44-
| | **Tour of Agents** | A step-by-step tutorial showing how to build resilient agents | [<img src="https://skillicons.dev/icons?i=python&theme=light" width="20" height="20">](openai-agents/tour-of-agents) | [📖](https://docs.restate.dev/tour/openai-agents) |
38+
| Integration | Example | Description | Code | Docs |
39+
|---------------------------|---------|-------------|----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|
40+
| **Vercel AI SDK** | **Template** | A minimal example of how to use Restate with the Vercel AI SDK | [<img src="https://skillicons.dev/icons?i=ts&theme=light" width="20" height="20">](vercel-ai/template) | [📖](https://docs.restate.dev/ai-quickstart) |
41+
| | **Tour of Agents** | A step-by-step tutorial showing how to build resilient agents | [<img src="https://skillicons.dev/icons?i=ts&theme=light" width="20" height="20">](vercel-ai/tour-of-agents) | [📖](https://docs.restate.dev/tour/vercel-ai-agents) |
42+
| | **Examples** | More advanced examples that can be deployed as a Next.js app on Vercel | [<img src="https://skillicons.dev/icons?i=ts&theme=light" width="20" height="20">](vercel-ai/examples) | - |
43+
| **OpenAI Agents SDK** | **Template** | A minimal example of how to use Restate with the OpenAI Agents SDK | [<img src="https://skillicons.dev/icons?i=python&theme=light" width="20" height="20">](openai-agents/template) | [📖](https://docs.restate.dev/ai-quickstart) |
44+
| | **Tour of Agents** | A step-by-step tutorial showing how to build resilient agents | [<img src="https://skillicons.dev/icons?i=python&theme=light" width="20" height="20">](openai-agents/tour-of-agents) | [📖](https://docs.restate.dev/tour/openai-agents) |
45+
| **Google ADK** | **Tour of Agents** | A step-by-step tutorial showing how to build resilient agents | [<img src="https://skillicons.dev/icons?i=python&theme=light" width="20" height="20">](google-adk/tour-of-agents) | [📖](https://docs.restate.dev/tour/google-adk) |
4546

4647
### Composable AI Patterns
4748
| Pattern | Description | Code | Docs |

google-adk/example/.mcp.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

google-adk/example/app/durable_stateful_agent.py

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ AI agent examples using [Restate](https://restate.dev) for durable execution and
1212
- **Human-in-the-loop** - Resilient approval workflows (with timeouts) ([see human-in-the-loop agent](./app/human_approval_agent.py))
1313
- **Parallel processing** - Concurrent agent and tool execution that can be deterministically recovered ([see parallel agent](./app/parallel_agents.py) and [parallel tools](./app/parallel_tools.py))
1414

15+
16+
## Tour of AI Agents with Restate - Python OpenAI Agents SDK
17+
Learn how to implement resilient agents with durable execution, human-in-the-loop, multi-agent communication, and parallel execution.
18+
19+
[Learn more](https://docs.restate.dev/tour/google-adk)
20+
21+
To run:
22+
```shell
23+
uv run .
24+
```
25+
1526
## Quick Start
1627

1728
Export your Google API key:
@@ -46,3 +57,4 @@ For example, click on the `run` handler of the `WeatherAgent` service and send t
4657

4758
In the invocations tab, you see the execution journal when clicking on the invocation ID:
4859
![See journal](./docs/images/journal.png)
60+
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44

55
from app.chat import chat
66
from app.durable_agent import agent_service as weather_agent
7-
from app.durable_stateful_agent import agent_service as stateful_weather_agent
87
from app.human_approval_agent import agent_service as human_claim_approval_agent
8+
from app.human_approval_agent_with_timeout import (
9+
agent_service as human_claim_approval_with_timeout_agent,
10+
)
911
from app.multi_agent import agent_service as multi_agent_claim_approval
12+
from app.multi_agent_remote import agent_service as multi_agent_remote
1013
from app.parallel_agents import agent_service as parallel_agent_claim_approval
1114
from app.parallel_tools import agent_service as parallel_tool_claim_agent
15+
from app.sub_workflow_agent import human_approval_workflow
16+
from app.sub_workflow_agent import agent_service as sub_workflow_agent
17+
from app.error_handling import agent_service as error_handling_agent
1218
from app.utils.utils import (
1319
fraud_agent_service,
1420
rate_comparison_agent_service,
@@ -21,14 +27,19 @@
2127
chat,
2228
# Durable execution
2329
weather_agent,
24-
stateful_weather_agent,
2530
# Orchestration
2631
multi_agent_claim_approval,
32+
multi_agent_remote,
33+
human_approval_workflow,
34+
sub_workflow_agent,
2735
# Human-in-the-loop
2836
human_claim_approval_agent,
37+
human_claim_approval_with_timeout_agent,
2938
# Parallel processing
3039
parallel_agent_claim_approval,
3140
parallel_tool_claim_agent,
41+
# Error handling
42+
error_handling_agent,
3243
# Utility agents
3344
fraud_agent_service,
3445
rate_comparison_agent_service,

0 commit comments

Comments
 (0)