Hybrid Architecture (Workflow + Agent)

A production pattern: Workflow owns side effects; a bounded agent handles uncertainty inside guardrails.
On this page
  1. The idea
  2. Why it works in production
  3. Diagram (Workflow owns side effects)
  4. Guardrails checklist (minimum)
  5. When not to use hybrid
  6. Related

The idea

A hybrid system splits responsibility:

  • The agent decides which safe option to take next.
  • The Workflow executes side effects (writes, notifications, irreversible actions).

This keeps autonomy where it helps (uncertainty) and determinism where it matters (state changes).

Why it works in production

Hybrid is the default pattern when:

  • you can’t enumerate all paths upfront,
  • but you still need predictable cost, latency, and write behavior.

It also makes debugging sane: you can trace “what the agent chose” separately from “what the Workflow executed”.

Diagram (Workflow owns side effects)

Guardrails checklist (minimum)

  • Budgets: max steps + wall-clock + $ per run
  • Tool policy: allowlist, default-deny, scoped credentials
  • Stop reasons: always return why the run stopped
  • Approvals for writes: human-in-the-loop for irreversible actions
  • Traces: log every decision, tool call, and state transition

When not to use hybrid

  • If the steps are deterministic → build a Workflow.
  • If you truly need open-ended exploration → use a read-only agent first, then add writes one tool at a time.

Not sure this is your use case?

Design your agent ->
⏱️ 2 min readUpdated Mar, 2026Difficulty: ★★★
Integrated: production controlOnceOnly
Add guardrails to tool-calling agents
Ship this pattern with governance:
  • Budgets (steps / spend caps)
  • Tool permissions (allowlist / blocklist)
  • Kill switch & incident stop
  • Idempotency & dedupe
  • Audit logs & traceability
Integrated mention: OnceOnly is a control layer for production agent systems.
Author

This documentation is curated and maintained by engineers who ship AI agents in production.

The content is AI-assisted, with human editorial responsibility for accuracy, clarity, and production relevance.

Patterns and recommendations are grounded in post-mortems, failure modes, and operational incidents in deployed systems, including during the development and operation of governance infrastructure for agents at OnceOnly.