Agent framework integrations
Any Python-based agent framework works with Union.ai. Union.ai doesn’t replace your framework — it provides the production layer around it. You write your agent with whatever framework you prefer, then invoke it from inside an @env.task, where it runs in a container with durable checkpointing and full observability. Each LLM call, tool call, and routing decision can be captured as a span in the Union.ai dashboard.
Because the framework drives the loop and Union.ai wraps it, you don’t need a dedicated plugin for a framework to use it — if it runs in Python, it runs on Union.ai.
flyte SDK provides a
native agent harness that you can use to build your own agent loop.How much control does the framework give you?
Frameworks differ in how much of the agent loop they own, which determines how you integrate them with Union.ai:
| Level of control | What it means | Example | Integration pattern |
|---|---|---|---|
| You own the loop | The framework gives you primitives (graph nodes, tools) and you wire the control flow | LangGraph | Decorate nodes with @flyte.trace; run the compiled graph inside a task |
| The framework owns the loop, you own the tools | The framework runs the tool-calling loop; you provide tools as plain functions | PydanticAI | Have tools delegate to durable @env.tasks |
| First-party tool adapter | Union.ai ships a decorator that turns a task into a framework tool | OpenAI Agents SDK | Stack function_tool on @env.task |
Whichever model your framework uses, the integration is the same in spirit: the framework decides what the agent does next, and Union.ai decides where and how durably each step runs.
Supported frameworks
- LangGraph — run compiled graphs inside tasks and fan them out in parallel.
- PydanticAI — type-safe agents whose tools delegate to durable tasks.
-
OpenAI Agents SDK — expose durable tasks as Agents SDK tools with
flyteplugins-openai.
Don’t see your framework? The same pattern — invoke the framework from inside an @env.task and trace its calls — applies to any Python agent library. See
Bring your own framework for a framework-agnostic template.
Next steps
- Deploy an agent as a service: run your agent on a schedule or behind a webhook.
- Build an agent with pure Python: roll the loop yourself with no framework at all.
- The Flyte Agent harness: the built-in, batteries-included agent loop.