Skip to content

Commit 8cf3078

Browse files
committed
Add Pydantic AI durable capability example
1 parent 82c377a commit 8cf3078

5 files changed

Lines changed: 873 additions & 0 deletions

File tree

packages/aws-durable-execution-sdk-python-examples/examples-catalog.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,20 @@
596596
},
597597
"path": "./src/comprehensive_operations/many_operations.py"
598598
},
599+
{
600+
"name": "Pydantic AI Durable Capability Prototype",
601+
"description": "Prototype Pydantic AI capability for checkpointing Lambda durable model and tool calls",
602+
"handler": "pydantic_ai_agent.handler",
603+
"integration": true,
604+
"durableConfig": {
605+
"RetentionPeriodInDays": 7,
606+
"ExecutionTimeout": 300
607+
},
608+
"environment": {
609+
"PYDANTIC_AI_MODEL": "us.amazon.nova-micro-v1:0"
610+
},
611+
"path": "./src/pydantic_ai_agent/pydantic_ai_agent.py"
612+
},
599613
{
600614
"name": "Create Callback Concurrency",
601615
"description": "Demonstrates multiple concurrent createCallback operations using context.parallel",

packages/aws-durable-execution-sdk-python-examples/pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ dependencies = [
1313
"aws-durable-execution-sdk-python-otel"
1414
]
1515

16+
[project.optional-dependencies]
17+
pydantic-ai = [
18+
"pydantic-ai",
19+
]
20+
1621
[tool.hatch.build.targets.wheel]
1722
packages = ["src"]
1823

packages/aws-durable-execution-sdk-python-examples/scripts/build_examples.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def build_examples() -> None:
2222
packages_dir / "aws-durable-execution-sdk-python",
2323
packages_dir / "aws-durable-execution-sdk-python-otel",
2424
packages_dir / "aws-durable-execution-sdk-python-testing",
25+
"pydantic-ai",
2526
]
2627

2728
if build_dir.exists():

0 commit comments

Comments
 (0)