Platform Pipelines Agents Human review Self-improvement Observability Deployment Security Use cases Compare Docs Pricing Roadmap Get early access

Millstream vs LangGraph and CrewAI

LangGraph and CrewAI are frameworks for building agents: LangGraph as a stateful graph of model calls and tools, CrewAI as a crew of role-based agents working through tasks. Millstream works one level up: it runs a stream of items through a pipeline in which an agent is one step among crawlers, filters, calculations and human reviews.

In the vocabulary of agent harnesses (chains, graphs, code), LangGraph structures the reasoning inside one agent. Millstream is a graph of durable steps around it: each item runs through code, agents and people, and a LangGraph graph can run inside one of those steps.


At a glance

Millstream LangGraph, CrewAI
What it orchestrates Items flowing between steps, across runs and pipelines Model calls, tools and agents within one invocation
Definition pipeline.yaml; each step an action in any language Python code (LangGraph also has a JavaScript version)
Where it runs A self-hosted engine with nodes, from a laptop to a server with a standby A library inside your own process
Durable state Every item, delivery and decision in SQLite or Postgres Checkpointed state per thread (LangGraph)
Agent output Validated against the action's output schema before it goes anywhere Shaped by your code
Human decisions review builtin with an inbox, edits, reason codes and timeouts Interrupts (LangGraph), human input on tasks (CrewAI)
Cost Recorded per delivery and model; maxCostUsd, runUsd, dayUsd enforced at dispatch Through tracing tools
Licence Apache-2.0 core, commercial edition MIT
Status Pre-release: M1 to M5 built and tested Released, widely used

Where the layers differ

An agent step is bounded on purpose

A Millstream agent action takes one item and returns structured output. Its manifest declares everything the agent may do:

name: lab/score-listing
version: 2.1.0
kind: agent
effects: none
runtime:
  agent:
    harness: api
    model: claude-sonnet-5-5
    network: [api.anthropic.com]
    maxTurns: 10
    maxCostUsd: 0.50

It runs in a sandbox container with a read-only file system, only the declared tools and network destinations, and a fresh process per item so no context leaks between them. Output that fails the schema is a retryable error. The transcript of every attempt is stored, with secrets redacted. The engine never knows which model ran: the adapter drives Claude Code or a direct API call, Anthropic or any OpenAI-compatible endpoint.

What happens around the agent

The work an agent framework leaves to you is the pipeline itself: getting items in on a schedule or a webhook, deduplicating them, filtering on a threshold, retrying a failed call, sending the uncertain cases to a person, recording what each item cost and where it came from. In Millstream those are pipeline steps and engine features: dedupe, filter, review, retry, dead letters, lineage and budgets.

Tested and improved like code

Agent calls are recorded and replayed, keyed by the rendered prompt, so millstream eval and millstream test pipeline run in CI without an API key. Reviewer edits feed lessons files, and an agent step whose answers have become predictable can be distilled into code that keeps the agent as its fallback. In the M5 exit scenario, on synthetic listings whose answers follow a rule, distilled code covered 260 of 270 holdout items with agreement 1.000, and a day of traffic cost 3.7% of the agent-only day.


When to choose LangGraph or CrewAI


Using them together

The two combine directly. A LangGraph graph or a CrewAI crew can run inside a Millstream action: a Python program that reads item messages on stdin and writes emit and done on stdout. millstream init action <name> --lang raw scaffolds such a program with the standard library only. The action can report its own tokens_in, tokens_out and cost_usd as metric messages. The framework keeps the reasoning; Millstream adds the triggers, the per-item retries and dead letters, schema checks between steps, review and lineage.


Next

How agents run · Self-improvement · Action protocol