cambium ▸ docs/prd/prd-cambium-core-and-hypha.md
updated 2026-03-27

PRD — Cambium Core + Hypha

Document Status

Draft V1

Purpose

This PRD defines the first product and engineering requirements for Cambium Core and Hypha, the foundational platform and orchestration runtime.

This is the heart of Cambium V1. If this layer is weak, everything above it becomes a fragile demo. If this layer is solid, Loom, Quorum, health, immune, and seed systems can all grow on top of it without needing a rewrite every few weeks.


Product Summary

Cambium Core provides the platform substrate: - identity and workspace boundaries - shared contracts and domain model - persistence model - event backbone - integration boundaries - permissions model

Hypha provides the execution runtime: - graph-based workflow execution - stateful orchestration - task routing - retries and fallback behavior - pause/resume behavior - event emission for all major transitions

Together, they form the engine room of Cambium.


Problem

Most agent workflow systems fail in one or more of these ways: - workflows are linear and brittle - execution state is poorly modeled - failures are opaque - retry and fallback behavior is ad hoc - orchestration logic is tightly coupled to the UI - systems are hard to inspect and impossible to recover cleanly

That makes them fine for demos and annoying for real work.

Cambium needs a runtime that is built for: - adaptive execution - durable state - inspectable runs - policy-aware routing - recovery hooks - future governance and health systems


Goals

Product goals

  1. Allow operators to define and run graph-based workflows.
  2. Persist workflow runs with durable, inspectable state.
  3. Support branching, retries, waits, failures, and fallback paths.
  4. Emit structured events for every meaningful transition.
  5. Provide clean interfaces for Loom, Quorum, health, immune, and seed layers.

Engineering goals

  1. Build as a modular monolith with clear internal domain boundaries.
  2. Make workflow execution stateful and event-driven.
  3. Define stable core data contracts early.
  4. Keep the runtime extensible enough for later policy and recovery features.
  5. Avoid premature complexity from distributed services.

Non-Goals

This PRD does not require V1 to ship: - full marketplace-style agent ecosystems - advanced credit routing or internal economies - elaborate multi-tenant billing - autonomous self-modifying workflow generation - full no-code workflow authoring sophistication - high-scale distributed orchestration across many physical clusters on day one

We are building a serious platform core, not trying to cosplay the final form immediately.


Primary Users

1. Operator

A human who wants to: - create or configure workflows - inspect runs - understand failures - intervene when needed

2. Platform builder

An internal developer building new capabilities on top of Cambium who needs: - stable contracts - reusable execution primitives - clean extension points

3. Governed execution consumer

A downstream system such as Quorum, health, or seed that needs: - event streams - durable state - hooks for pause, gate, checkpoint, and replay flows


V1 User Stories

Workflow definition

Workflow execution

Observability

Extensibility


Core Requirements

1. Workflow Definition Model

The platform must support a durable workflow definition model.

Functional requirements

V1 node types

At minimum, support: - task node - condition node - wait node - approval/gate node - terminal success node - terminal failure node

V1 edge behavior

At minimum, support: - default next edge - conditional edge - fallback edge - retry edge


2. Workflow Run Model

Every workflow execution must create a durable run record.

Functional requirements

V1 run states

At minimum: - created - queued - running - waiting - blocked - failed - completed - cancelled - paused


3. Task Execution Model

Each runnable node should produce a durable task execution record.

Functional requirements

V1 task execution states

At minimum: - pending - dispatched - running - succeeded - failed - retrying - blocked - cancelled


4. Graph-Based Runtime

Hypha must execute workflows as graphs.

Functional requirements

Design requirement

The runtime must not assume exactly one active next step at all times.


5. Event Backbone

Cambium Core must provide a structured event backbone.

Functional requirements

The system emits events for at least: - workflow definition created - workflow version activated - workflow run created - workflow run started - node entered - node completed - node failed - retry scheduled - workflow paused - workflow resumed - workflow blocked - workflow failed - workflow completed - intervention requested - intervention applied

Event requirements


6. Pause / Resume / Intervention Hooks

The platform must support controlled intervention.

Functional requirements


7. Integration Boundary

Cambium Core and Hypha must expose clear internal interfaces for future modules.

Integration consumers in V1 or near-V1

Requirements


8. Permissions and Identity Model

V1 needs a sane internal identity model.

Functional requirements

We do not need enterprise IAM theater in V1, but we do need clean attribution and boundaries.


Data Model

WorkflowDefinition

WorkflowRun

TaskExecution

EventRecord

InterventionRecord


Operator Experience Requirements

Even before Loom gets fancy, operators should be able to: - create and version workflows - start runs - inspect run status - inspect event history - see current active nodes - pause and resume runs - identify failure points

If the engine works but nobody can tell what the hell it is doing, that still counts as failure.


Reliability Requirements

Required for V1

Nice to have if feasible


Success Metrics

Product success

Engineering success


Open Questions

  1. What is the canonical workflow definition format for V1?
  2. Should nodes compile into an internal intermediate representation before execution?
  3. How much of task execution is local vs provider/integration driven?
  4. What persistence model best balances speed and replayability?
  5. Which events must be guaranteed durable before state transitions are acknowledged?

Build Recommendation

The implementation should likely start with: 1. Workflow definition schema 2. Run state model 3. Graph executor 4. Event emission layer 5. Operator inspection endpoints 6. Pause/resume/intervention controls

That gets us to a credible Hypha core quickly while keeping room for Quorum, Loom, and resilience systems to plug in cleanly.


Final Requirement Statement

Cambium Core + Hypha must provide a modular, stateful, event-driven orchestration foundation that supports graph-based workflows, durable run state, structured events, controlled intervention, and clean extension points for the rest of the Cambium platform.