Skip to main content

Unified Orchestration Layer

Three authoring APIs. One compiled intermediate representation. A single runtime that executes every graph with streaming, checkpointing, guardrails, memory, and capability discovery built in.

Architecture

Every orchestration surface in AgentOS — AgentGraph, workflow(), and mission() — compiles to the same CompiledExecutionGraph IR. The GraphRuntime executes that IR regardless of which API produced it.

Node Types

Node TypePurposeNotes
gmiLLM reasoning with tool callingCore reasoning node
toolSingle tool invocationUses the shared tool runtime
extensionExtension pack executionPartial in the bare runtime; host bridges may be required
humanHuman-in-the-loop gateApproval/review checkpoint
guardrailSafety check nodeInput/output policy node
routerConditional branchingState-based routing
subgraphNested graph executionPartial in the bare runtime; host bridges may be required
voiceVoice pipeline nodeVoice orchestration surface

Edge Types

Edge TypeBehavior
staticUnconditional transition
conditionalArbitrary routing function evaluates state and returns next node
discoverySemantic search over the capability registry determines the next node
personalityHEXACO trait thresholds determine branching

Three APIs

AgentGraph — Full Graph Control

Explicit nodes, edges, cycles, and subgraphs. Use this when you need the full graph model: conditional routing with arbitrary logic, agent loops that cycle back, memory-aware state machines, and personality-driven branching.

import { AgentGraph, END, START, gmiNode, toolNode } from '@framers/agentos/orchestration';
import { z } from 'zod';

const graph = new AgentGraph({
input: z.object({ topic: z.string() }),
output: z.object({ summary: z.string() }),
})
.addNode('search', toolNode('web_search'))
.addNode('summarize', gmiNode({ instructions: 'Summarize the results.' }))
.addEdge(START, 'search')
.addEdge('search', 'summarize')
.addEdge('summarize', END)
.compile();

workflow() — Deterministic DAG

Fluent DSL for sequential pipelines with branching and parallelism. Every workflow is a strict DAG, and cycles are caught at compile time. All GMI steps default to single_turn to keep execution deterministic and cost-bounded.

import { workflow } from '@framers/agentos/orchestration';
import { z } from 'zod';

const wf = workflow('onboarding')
.input(z.object({ userId: z.string() }))
.returns(z.object({ welcomed: z.boolean() }))
.step('fetch-user', { tool: 'get_user' })
.step('send-email', { tool: 'send_email', effectClass: 'external' })
.compile();

mission() — Intent-Driven Orchestration

Describe what you want to achieve and let the mission compiler generate the current stub graph shape for you. Today that means a fixed phase-ordered mission skeleton with your goal preserved in generated reasoning nodes, plus any anchors and mission-level policies you attach.

import { mission } from '@framers/agentos/orchestration';
import { z } from 'zod';

const m = mission('deep-research')
.input(z.object({ topic: z.string() }))
.goal('Research {{topic}} and produce a structured report')
.returns(z.object({ report: z.string() }))
.planner({ strategy: 'linear', maxSteps: 8 })
.compile();

Decision Guide

SituationUse
Exact steps known upfrontworkflow()
Steps known but complex branching neededAgentGraph
Goal-first authoring with a fixed mission skeleton todaymission()
Need agent loops / cyclesAgentGraph
Cost-bounded, deterministic executionworkflow()
Prototype quickly, then reuse the generated IR directlymission() -> toWorkflow()

Why This Still Matters

  • One IR means one streaming/checkpointing model across all three authoring APIs.
  • Memory, guardrails, and tool orchestration are shared runtime concerns instead of separate orchestration stacks.
  • The runtime can keep evolving without forcing authors to rewrite every orchestration surface at once.

Detailed Guides