-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support DBOS Agent by wrapping run as DBOS workflows and moving model requests and MCP to DBOS steps #2638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
All review comments addressed. Updates from last review:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qianl15 Thanks Qian, we're getting there :) If you could port the HITL tool approval test we have for Temporal, as you suggested in the description, that'd be great!
docs/dbos.md
Outdated
|
||
## Observability with Logfire | ||
|
||
DBOS emits OpenTelemetry traces and events for every workflow and step, and Pydantic AI generates events for each agent run, model request and tool call. These can be sent to [Pydantic Logfire](logfire.md) to get a complete picture of what's happening in your application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are they sent to Logfire automatically, assuming it is set up?
It would be great to see that in the span tree in the test_complex_agent_run_in_workflow
test -- as you can see in the temporal test it has StartWorkflow
events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the docs and tests for this. Right now DBOS and Logfire generate overlapping spans since OpenTelemetry doesn't interoperate cleanly, so I changed the defaults/docs to disable DBOS OTLP traces.
Because DBOS runs workflows and steps as normal function calls, you won't see extra spans like "StartWorkflow"
or "RunWorkflow"
events.
Co-authored-by: Douwe Maan <[email protected]>
Co-authored-by: Douwe Maan <[email protected]>
Summary
Closes #2629
This PR integrates DBOS with
Agent.run
and related methods to provide out-of-the-box durable execution and checkpointing.Changes
Workflows:
Agent.run
andAgent.run_sync
are now decorated as DBOS workflows.Steps:
get_tools
,call_tool
) are decorated as DBOS steps.Tooling:
TODO