Commit Graph

40 Commits

Author SHA1 Message Date
Adrian Lyjak d9fd0d3afd docs: update run-llama/workflows-py references to run-llama/llama-agents (#537)
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>
2026-04-14 22:45:47 +00:00
Adrian Lyjak 3fb159201d docs: add example READMEs and top-level examples index (#484)
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-06 20:34:30 -04:00
Vasudev Awatramani c119879660 chore: Eval-driven prompt refinement example notebook (#444) 2026-03-28 22:13:55 -04:00
Adrian Lyjak b32ec53ef9 Drop python 3.9 support (#434) 2026-03-17 19:53:33 -04:00
Adrian Lyjak 5e7f9e5437 Observability improvements (#414) 2026-03-11 11:02:54 -04:00
Adrian Lyjak 6ec262cc09 Graceful teardown leading to poisoned workflow (#409) 2026-03-07 12:24:47 -05:00
Adrian Lyjak 6ba96c6ac3 Add ExecutorLeaseManager to avoid having to predefine stable executor ids (#398) 2026-02-27 17:02:02 -05:00
Adrian Lyjak 9870d4e205 Refactor migrations to per-package sequencing, async launch/destroy, and is_launched health (#399)
* 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
2026-02-27 17:02:02 -05:00
Adrian Lyjak 1b1031765b k8s example (#392) 2026-02-27 17:02:02 -05:00
Adrian Lyjak 77a3f9c28d add dbos idle (#386) 2026-02-27 17:02:02 -05:00
Adrian Lyjak 6457ca64c9 Fix dependency version ranges and re-organize dbos examples (#374) 2026-02-27 17:02:02 -05:00
Adrian Lyjak d56be471f3 DBOS/Postgres server support (#367) 2026-02-27 17:02:02 -05:00
Adrian Lyjak 57902d5045 DBOS runtime (#157) 2026-02-27 17:02:02 -05:00
Adrian Lyjak 10d619a551 rename llama-index-workflows-* -> llama-agents-* (#319)
* rename llama-index-workflows-client -> llama-agents-client

* integration tests too
2026-02-02 16:40:17 -05:00
Adrian Lyjak db90f89b74 Separate server/client, and move to llama_agents namespace (#277)
* 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>
2026-01-29 18:16:02 -05:00
Adrian Lyjak e53c654b42 Add resource nodes to workflow graph export (#269)
* 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>
2026-01-10 13:01:12 -05:00
Adrian Lyjak 300fd05416 Update ruff checks (#204) 2025-11-18 14:24:17 -05:00
Tuana Çelik f233982bc4 Adding new example (#198)
* adding new example

* ci: lint

---------

Co-authored-by: Clelia (Astra) Bertelli <clelia@runllama.ai>
2025-11-06 15:07:34 +01:00
Adrian Lyjak 7b97d338d5 Add more error logging, and add handler and run dispatcher context (#194) 2025-11-05 23:02:57 -05:00
Terry Zhao 3d512ac8e2 fix bugs (#178) 2025-10-30 08:55:52 -04:00
Adrian Lyjak 18d9bb9669 Refactor context to (eventually) support runtime plugins (#127) 2025-10-28 14:32:41 -04:00
Adrian Lyjak 8a0a8aabea Normalize server/client event schema (#152) 2025-10-20 13:04:49 -04:00
Logan 470a9de670 Update workflow server example to include HITL (#142) 2025-10-13 20:04:15 -06:00
Clelia (Astra) Bertelli 5607489f9e Add python workflow client (#109) 2025-10-10 16:23:06 -04:00
Adrian Lyjak 62150fcfef Fix result serialization, and externalize debugger (#112) 2025-09-25 18:57:36 -04:00
Adrian Lyjak 2d3d3a4f72 feat: switch to SSE by default (#107)
* feat: switch to SSE by default

* Remove commented out comment
2025-09-22 16:51:23 -04:00
Clelia (Astra) Bertelli c7d29bc548 feat: workflow visualization (#104)
* 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
2025-09-22 11:38:07 +02:00
Massimiliano Pippi dce680007a Add UI to Workflow server (#87)
* add a plain python version of the example

* add ui endpoint

* add a basic UI prototype

* move to tailwind

* Proposals for UI improvements (#90)

* feat: represent event details as collapsibles

* feat: customize input form

* fix: server-side start event handling logic

* feat: add output schema

---------

Co-authored-by: Clelia (Astra) Bertelli <133636879+AstraBert@users.noreply.github.com>
2025-09-12 10:59:26 +02:00
Clelia (Astra) Bertelli 5a9b31bd3c feat: expose internal events (#73)
* 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
2025-09-08 12:33:09 +02:00
Logan d5f1566e02 Revert "feat: simplify the fan-in/fan-out logic (#64)" (#76)
This reverts commit 5947de2f13.
2025-08-27 11:26:43 +02:00
Clelia (Astra) Bertelli 5947de2f13 feat: simplify the fan-in/fan-out logic (#64) 2025-08-22 09:23:32 -06:00
Massimiliano Pippi 95b847ecae Add documentation for writing durable workflows (#71)
* add example

* add durable workflows material
2025-08-19 11:23:31 -06:00
Clelia (Astra) Bertelli b880f45deb feat: adding an examples with vector databases for state management (#34) 2025-07-31 16:24:05 +00:00
Massimiliano Pippi 419e90dd34 feat: add startup script to ease server startup in Docker (#38)
* add entrypoint and example

* fix dockerfile

* do not hardcode the server instance name

* add unit tests

* revert test commit, ready to ship
2025-07-30 19:46:12 +02:00
Massimiliano Pippi b58eb9c681 feat: add WorkflowServer to serve workflows as web services (#28)
* 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>
2025-07-25 16:45:51 +02:00
Logan 6c49f30a38 update state handling in notebooks (#25) 2025-07-18 14:57:04 -06:00
Jannik Maierhöfer 1397212077 docs: add notebook on tracing workflows (#19) 2025-07-08 15:23:31 -06:00
Clelia (Astra) Bertelli eba6af4c70 Adding an observability example (#22) 2025-07-07 09:47:40 -06:00
Logan aeb557616b add notebook for HITL + Llama Extract (#20) 2025-07-02 10:05:43 -06:00
Logan 6ccc7e71eb add example notebooks (#17) 2025-06-26 15:32:07 -06:00