Repo has been renamed from workflows-py to llama-agents. Update remaining
references in README, docs, CI workflows, and example notebooks.
Co-authored-by: Claude <noreply@anthropic.com>
* Refactor migrations to per-package sequencing, async launch/destroy, and is_launched health
- Migrate from single flat migration sequence to composite (package, version)
keyed schema_migrations table, supporting parallel package-specific migrations
- Move workflow_journal and run_lifecycle tables to dbos package migrations
- Make Runtime.launch() and destroy() async throughout the codebase
- Add is_launched property to Runtime and use it for server health endpoint (503 when not launched)
- Add launch_sync/destroy_sync convenience wrappers for sync contexts
- Extract shared migration utilities into migration_utils module
* rm dbos dep
* constants
* tests
* prep packages
* wrong coverage detection I think
* add ts deps?
* extend path for namespaces
* the big move, import issues though
* llama_index.workflows
* llama_agents
* alias may be working
* add type checker ignores for workflows secondary namespace, update ty, and add re-exports
* Add descriptions to new client and server packages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Rather, commit the outputs
* keep the py files separate
* ignore examples deps
* Create afraid-books-own.md
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add resource nodes to workflow graph export
Add support for visualizing resource dependencies in workflow graphs:
- Enhanced _Resource class with source location metadata (file, line,
docstring, unique hash for deduplication)
- Added ResourceDefinition.type_annotation to capture the type from
Annotated[T, Resource(...)]
- Added WorkflowGraphResourceNode protocol model with full metadata
- Added DrawWorkflowResourceNode class for intermediate representation
- Updated DrawWorkflowEdge to support edge labels (variable names)
- Modified extract_workflow_structure to extract and deduplicate
resource nodes, connecting them to steps with labeled edges
- Updated Pyvis and Mermaid renderers to display resource nodes
(hexagon shape, plum color) with metadata tooltips
* test: add tests and example for resource nodes visualization
- Add tests for resource node extraction in test_representation_utils.py
- Add tests for resource rendering in test_drawing.py (Mermaid + Pyvis)
- Add workflow_with_resources fixture with multiple resources
- Add runnable example (examples/visualization/resource_nodes_example.py)
that generates both Mermaid and Pyvis output with resource nodes
* chore: add changeset for resource nodes feature
* fix: reverse resource edge direction to step -> resource
* refactor: unify DrawWorkflowNode and DrawWorkflowResourceNode
- Merge resource-specific fields into DrawWorkflowNode
- Add to_resource_response_model() for resource serialization
- Keep DrawWorkflowResourceNode as backwards compat alias
- Simplify type annotations in rendering code (remove unions)
- Remove isinstance checks since all nodes are now DrawWorkflowNode
* refactor: simplify _get_clean_node_id to use node_type prefix
* refactor: merge resource_nodes into nodes list
Unify resource nodes with the main nodes list instead of a separate
resource_nodes field. This simplifies the API and rendering code while
maintaining backwards compatibility through a property accessor.
- Remove resource_nodes field from DrawWorkflowGraph
- Add resource_nodes property for backwards compatibility
- Merge WorkflowGraphResourceNode fields into WorkflowGraphNode
- Simplify rendering loops to single iteration over nodes
* refactor: remove unnecessary backwards compatibility aliases
This is all new code in this PR - no need for backwards compat aliases.
Removes WorkflowGraphResourceNode, DrawWorkflowResourceNode,
to_resource_response_model, and resource_nodes property.
* perf: make resource metadata extraction lazy
Move expensive inspect operations (getfile, getsourcelines, getdoc)
and hash computation from Resource creation time to graph extraction
time. This avoids the overhead when resources are used at runtime
but visualization is not needed.
* test: remove unnecessary async from mermaid drawing tests
* consolidate types
* Split types
* feat: add description and schema fields to workflow graph nodes
- Add description field to WorkflowGraph (workflow class docstring)
- Add description field to WorkflowStepNode (step function docstring)
- Add event_schema field to WorkflowEventNode (Pydantic JSON schema)
- Rename WorkflowResourceNode.docstring to description for consistency
- Rename WorkflowGraphNodeEdges to WorkflowGraph
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* filter by node type
* Update add_resource_nodes.md
* remove resource hash
---------
Co-authored-by: Claude <noreply@anthropic.com>
* wip: workflow visualization
* feat: update the UI to add execution animation
* feat: clickable nodes with event metadata
* chore: styling 💅
* chore: make the backend agnostic with respect to Cytoscape
* wip: expose internal events
* chore: add test
* feat: handle state change
* feat: expose internal events
* fix: accept also no events as output
* chore: implement suggestions discussed offline
* fix: adjust for 3.9
* chore: implementing pr review feedback
* fix: patch for unhashable dicts
* feat: refactoring and renaming according to PR review feedback
* chore: renaming and state handling
* chore: move StateSnapshot into StepStateChanged; docs: add section in docs and example
* feat: add WorkflowServer to serve workflows as web services
* add serve() method to start uvicorn
* add license headers
* add tests
* add unit tests
* fix linter
* fix for python 3.9
* add event streaming endpoint
* fix linter
* add SSE support
* pass start_event to the run methods
* return 202 if workflow is still running
* store workflow results so the /results endpoint becomes idempotent
* Apply suggestions from code review
Co-authored-by: Adrian Lyjak <adrianlyjak@gmail.com>
* remove scoped imports
* Apply suggestions from code review
Co-authored-by: Adrian Lyjak <adrianlyjak@gmail.com>
* fix unit test
* clean up examples and turn them into notebooks
* add the 'server' extra to the package
* install extras in CI
* refresh lockfile
* add H1 titles to notebooks
---------
Co-authored-by: Adrian Lyjak <adrianlyjak@gmail.com>