Kodex Labs - internal tooling

Agentflow. Every agent in its place.

Agentflow is the orchestrator we use to run Claude agents on client work: typed handoffs between agents, retries with backoff, and traces you can actually read. This page is an interactive walkthrough of how a run behaves.

The trace below is simulated in your browser - no API calls, no live agents.

agentflow.ts
import { flow, verify } from "./agentflow";
import { planner, retriever, writer } from "./agents";
import { withCitations } from "./checks";

export const research = flow("ResearchBrief", (f) =>
  f.route(planner)
    .then(retriever, { retries: 3, backoff: "exponential" })
    .then(writer)
    .verify(withCitations)
);
trace / research briefcomplete
0 msrequestorchestrator accepts a typed job: ResearchBrief
+480 msrouterouter picks planner -> retriever -> writer from the job type
+620 msagent: plannerhandoff in: ResearchBrief / out: ResearchPlan (schema-validated)
+780 msagent: retrievertool call search() fails: rate_limited - retry 1 of 3 with backoff
+810 msagent: retrieverretry succeeds - handoff out: SourceSet (14 sources, deduped)
+900 msagent: writerhandoff in: SourceSet / out: BriefDraft
+410 msverifyschema and citation checks pass - response returned
Typed handoffs

Every agent boundary is a schema. A handoff that doesn't validate never reaches the next agent.

Retries with backoff

Tool calls fail. The orchestrator retries with exponential backoff and records every attempt.

Readable traces

Each run is a timeline of spans you can actually read: inputs, outputs, retries, timings.

Provider-agnostic

Agents and tools are plain functions. Swap models without rewriting the flow.

We build systems like this for clients.

LLM features, agent pipelines and the products around them - scoped, estimated and delivered end to end. Tell us what you're building.