Model-generated, backend-neutral dynamic workflows for Google ADK
Project description
ADK Dynamic Workflows
Model-generated, validated workflows that can execute against Google ADK 2 or Temporal without evaluating arbitrary generated Python.
This project is an early bootstrap. The implemented vertical slice includes:
- A strict, versioned
WorkflowSpecsuitable for structured LLM output - An ADK planner agent backed by LiteLLM structured output
- Agent, sequence, parallel, map, condition, and bounded-repeat steps
- Stable execution IDs for replay and caching
- A backend-neutral asynchronous interpreter
- An ADK 2 adapter built on
Context.run_node() - A Temporal adapter that dispatches agent calls as child workflows
Install
uv sync
Install the Temporal adapter dependencies when needed:
uv sync --extra temporal
The official temporalio[google-adk] extra currently requires
google-adk<2. This project therefore uses Temporal's core SDK and leaves the
ADK 2 child-workflow implementation as the next integration milestone.
Validate A Workflow
uv run adk-dynamic-workflows validate examples/review.json
Generate A Workflow With LiteLLM
Edit the gitignored .env file with your OpenAI or OpenAI-compatible provider:
DYNAMIC_WORKFLOWS_LLM_MODEL=openai/gpt-4o-mini
DYNAMIC_WORKFLOWS_LLM_API_BASE=https://api.openai.com/v1
DYNAMIC_WORKFLOWS_LLM_API_KEY=replace-with-your-api-key
For a compatible gateway, retain LiteLLM's openai/ model prefix and replace
the model name and base URL with values supported by that gateway.
Generate, review, approve, and save a workflow:
uv run adk-dynamic-workflows plan \
"Review every file provided in the files input" \
--agent-profile explorer \
--agent-profile reviewer \
--output generated-review.json
The planner uses ADK LlmAgent.output_schema to request a WorkflowSpec, then
validates the result locally. It retries once with validation feedback when the
provider returns a structurally invalid workflow. The generated workflow may
only reference profiles passed through --agent-profile.
Execute Locally
Register the agent profiles that a generated spec is allowed to invoke, then build a normal ADK workflow:
from adk_dynamic_workflows.adk_backend import build_adk_workflow
from adk_dynamic_workflows.spec import WorkflowSpec
spec = WorkflowSpec.model_validate_json(open("examples/review.json").read())
root_agent = build_adk_workflow(
spec,
{
"reviewer": reviewer_agent,
},
)
The allowlisted registry is intentional: generated workflows select an agent profile but cannot create unrestricted agents or grant themselves new tools.
Development
uv run ruff format --check .
uv run ruff check .
uv run pyright
uv run pytest
Run the real LiteLLM integration test after configuring .env:
uv run pytest -m integration tests/integration/test_litellm_planner.py
With placeholder credentials the integration test is skipped. With configured credentials it performs a real provider request and verifies that the returned workflow is valid and uses only the requested agent profile.
Next Milestones
- Implement an ADK 2-compatible Temporal child workflow for one agent run.
- Add budget estimates, progress queries, and cancellation.
- Store large outputs as artifact references instead of workflow-history data.
- Add semantic validation for branch scope and step-output dominance.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file adk_dynamic_workflows-0.1.0.tar.gz.
File metadata
- Download URL: adk_dynamic_workflows-0.1.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d570806052a70f6b424514cb3c7452cd9689c8003921819a05b59de0711b61a
|
|
| MD5 |
14a71f87e13a9cf18aae06a677b55cc7
|
|
| BLAKE2b-256 |
0ae3e572e9d7aa2d0f5df5ce005f57d87abe20f622e76b1fd28e28c9331818c2
|
Provenance
The following attestation bundles were made for adk_dynamic_workflows-0.1.0.tar.gz:
Publisher:
publish.yml on manojlds/adk-dynamic-workflows
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adk_dynamic_workflows-0.1.0.tar.gz -
Subject digest:
6d570806052a70f6b424514cb3c7452cd9689c8003921819a05b59de0711b61a - Sigstore transparency entry: 2145961169
- Sigstore integration time:
-
Permalink:
manojlds/adk-dynamic-workflows@a65e7b8ea6e03c435f6111c0c625b711b1cce302 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/manojlds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a65e7b8ea6e03c435f6111c0c625b711b1cce302 -
Trigger Event:
release
-
Statement type:
File details
Details for the file adk_dynamic_workflows-0.1.0-py3-none-any.whl.
File metadata
- Download URL: adk_dynamic_workflows-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57f83ef8c4e4c0d3c90659b648e9a132352a9bf3f85c5f17dc71d2d3fa13601c
|
|
| MD5 |
5c7c4d028e3696481f49a21322945ffc
|
|
| BLAKE2b-256 |
d906beb112553e7e1e5cfd2a8520c135a43ef8a0ed638d4b3b4d3ee7331bd5f7
|
Provenance
The following attestation bundles were made for adk_dynamic_workflows-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on manojlds/adk-dynamic-workflows
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adk_dynamic_workflows-0.1.0-py3-none-any.whl -
Subject digest:
57f83ef8c4e4c0d3c90659b648e9a132352a9bf3f85c5f17dc71d2d3fa13601c - Sigstore transparency entry: 2145961189
- Sigstore integration time:
-
Permalink:
manojlds/adk-dynamic-workflows@a65e7b8ea6e03c435f6111c0c625b711b1cce302 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/manojlds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a65e7b8ea6e03c435f6111c0c625b711b1cce302 -
Trigger Event:
release
-
Statement type: