Pre-release Harn is pre-1.0 — the language, standard library, and CLI may change between releases. See the release notes

Coming from elsewhere

Harn's vocabulary doesn't always match what you'd read in OpenAI's, Anthropic's, Flue's, LangGraph's, Inngest's, Mastra's, Cloudflare's, AWS Strands', BAML's, or the ACP/A2A/MCP specs. This page is the cross-reference.

If a term in your home system collides with a Harn term, find your row in the table for that system.

OpenAI Agents SDK#

OpenAI termHarn equivalentNotes
Agent (class)agent_loop(harness, ...) invocation, or a personaOpenAI's Agent bundles instructions, tools, and output type; the closest Harn shape is a configured agent_loop call site.
Runner.run(...)one agent_loop(harness, ...) invocationOne OpenAI "turn" wraps many model round-trips. One Harn agent loop invocation does the same.
"turn"Harn prompt turn / agent_loopOpenAI's "turn" is the outer cycle (one user request → final answer), not Harn's per-iteration counter.
"model roundtrip" (unnamed)Harn iterationThe inner unit.
max_turnsmax_iterationsBoth bound a budget, but the nouns are off-by-one — OpenAI counts outer SDK invocations, Harn counts inner LLM calls.
Session (SQLiteSession("id"))session_id + harness.agent.open(id)Direct match.
handoffpersona handoff or spawn_agentDirect match in shape.
input_guardrails / output_guardrailsagent_input_guardrail + tool middleware + completion gatesHarn exposes input guardrails as a named pre-loop bookend; output checks use completion gates, judges, validators, and tool middleware.

Anthropic Claude Agent SDK#

Anthropic termHarn equivalentNotes
"agent loop"agent_loopDirect vocabulary match.
query() / ClaudeSDKClientagent_loop(harness, ...)Pass history or reuse session_id for stateful prompt turns.
AssistantMessage, TextBlock (typed stream)transcript eventsAnthropic streams typed messages; Harn streams typed transcript events.
Session resumptionharness.agent.open(id) + transcript continuityDirect match.
"hook"register_tool_hook, register_session_hook, register_reminder_providerHarn's hook registry is the richer version.

Anthropic and Harn align closely on agent-loop vocabulary; this is the easiest mapping in the table.

LangGraph#

LangGraph termHarn equivalentNotes
Nodestage (workflow)Both encode a unit of computation.
Edgeworkflow transitionSame shape; Harn doesn't expose it as a separate noun.
State (typed dict)Workflow artifacts + optional state-channel proposalLangGraph's strict typed-dict-with-reducers is not Harn's default state model. The v0 design is tracked in Workflow state channels.
Channelproposed workflow state channelLangGraph channels are typed slots with merge reducers. Harn's agent_channels are something else entirely (pub/sub for agent-to-agent communication).
Thread (thread_id)session_idDirect match.
super-stepiterationLangGraph's super-step is one parallel barrier; semantically Harn's per-iteration.
checkpoint / checkpointersession bundle, snapshotDirect match.
interrupt / Command(resume=...)agent_await_resumptionDirect match.

LangGraph's biggest Harn-doesn't-have-this-by-default is typed-state channels with reducers. Harn's v0 design keeps artifacts and transcripts as the common path, then adds explicit workflow state channels for structured fan-out/reduce cases.

Flue#

Flue and Harn both put agents inside a harness and separate continuing agents from finite workflows. Flue is a TypeScript framework. Harn is a language and runtime with host adapters.

Flue termHarn equivalentNotes
defineAgent()configured agent_loop or personaBoth bind a model, instructions, tools, skills, and an execution environment.
Agent instancesessionBoth preserve one continuing conversation identity.
defineWorkflow()workflow or pipelineBoth describe finite work; Harn uses a typed stage graph when the graph must be inspectable.
Durable event streamtranscript plus EventLogBoth retain replayable runtime events. Harn also uses the EventLog for deterministic effect replay.
@flue/react hooksHarn Apps host plus MCP Apps UI resourceFlue projects durable state into React hooks. Harn serves host-neutral app resources and lets each host own native presentation.
Virtual, local, or remote sandboxHarn sandbox and host capabilitiesBoth keep conversation persistence separate from workspace lifetime and access policy.
Targethost or deployment adapterFlue targets Node.js and Cloudflare. A Harn program runs through CLI, IDE, protocol, self-hosted, or cloud adapters.

Start with Flue's agent guide, workflow guide, event reference, and React guide when comparing a specific developer path.

Inngest#

Inngest termHarn equivalentNotes
FunctionpipelineBoth are the durable unit.
Runsession, run_idDirect match.
step.run(key, ...)step.run(key, input?, handler, options?)Harn memoizes completed step results in the EventLog and replays matching steps without re-invoking the handler.
step.sleep / step.waitForEventagent_await_resumption + resume_whenConceptually equivalent.
Eventtrigger event, agent eventDirect match.
Step replaystep.run + session resume + worker snapshotHarn supports both replay-from-top memoized steps and checkpoint/snapshot resume.

If you arrive from Inngest expecting step.run-style memoized replay, start with Durable step stdlib. Durable timers and event waits remain separate primitives: use agent_await_resumption and resume_when for long waits.

Mastra#

Mastra termHarn equivalentNotes
Agentagent_loop invocationDirect match.
WorkflowworkflowDirect match.
Thread (per-conversation)session_idMastra's thread is Harn's session.
Resource (per-user/entity)partial — tenant_id covers some of itMastra splits per-user vs per-conversation; Harn collapses to session + tenant.
working memory / semantic recallmemory builtinsConceptually similar, less typed.

Cloudflare Agents SDK#

Cloudflare's model is the most different one on this page: an agent is a Durable Object, so identity, state, and compute are the same thing.

Cloudflare termHarn equivalentNotes
Agent (a Durable Object class)session plus its transcriptCloudflare fuses the agent's identity, its storage, and the compute that serves it into one addressable object. Harn keeps the session as data and lets any host run it.
this.setState() / this.sqlsession state, transcript, artifactsEach Durable Object carries its own embedded SQLite. Harn's equivalents are host-provided, so the same program can run against a local file or a database.
@callable methodtool, exported functionBoth expose a typed entry point to a caller.
this.schedule(...)agent_await_resumption + resume_whenBoth let work sleep and wake later without a process staying alive.
WebSocket hibernationsession suspend and resumeSame intent: stop paying for an idle conversation without losing it.

Cloudflare's durability comes from where the code runs. Harn's comes from the EventLog, so you get replay on a laptop and in CI, not only in production. The tradeoff is real in the other direction too: Cloudflare hands you global addressing and hibernation for free, and Harn asks the host to provide them.

AWS Strands Agents#

Strands termHarn equivalentNotes
"agent loop"agent_loopDirect vocabulary match, and the same inner unit.
Agent(model=..., tools=...)configured agent_loop call siteDirect match in shape.
@tool decoratortool registrationStrands infers the schema from Python type hints; Harn takes it from the declared shape.
Swarmspawn_agent plus agent channelsBoth fan work out to several agents that can hand off.
GraphworkflowBoth are a deterministic node graph over agent steps.
Agents as Toolsspawn_agent from inside a toolDirect match.
Session persistencesession, snapshotDirect match.

Strands is explicitly model-driven: the loop decides what to do next, and the framework's argument is that you should let it. Harn's argument is the inverse one, that the program should decide when a step is worth a model call. Both are reasonable, and they optimize for different failure modes. Strands recovers from situations you did not anticipate; Harn keeps cost and behavior predictable in the ones you did.

BAML#

BAML is the closest thing to a peer language rather than a framework, so it is worth being precise. Both projects are pre-1.0, both are implemented in Rust, and both argue that agent orchestration deserves language-level support rather than another library.

BAML termHarn equivalentNotes
function with a typed returnharness.llm.call into a declared shapeBoth make "the model returns this type" a language-level promise instead of a parsing chore.
Schema-aligned parsingshape coercion and diagnosticsBoth repair almost-valid model output rather than failing on a stray comma. BAML's is exposed as a reusable stdlib call and published against a function-calling benchmark.
spawn / await, Future<T, E>spawn_agent, structured concurrencyBoth give you real concurrency. The semantics differ; see below.
test and testset blocksharn test, replay, evalsBoth treat testing a prompt as a first-class activity.
Client registry, retry policiesprovider config, retry and fallback policyDirect match, including retry, fallback, and round-robin wrappers.
Generated SDKs for Python, TypeScript, Go, Java, C#, Rust, and moreharn serve, embedding in RustThe clearest difference in distribution model. BAML's primary path is generating a typed client so an existing codebase calls into it. Harn's is running the program, or embedding the runtime.

The center of gravity differs. BAML invests in the boundary of a single model call and in making that boundary hard for a model to get wrong, which is why it reads well when an agent writes the code. Harn invests in the program around the calls, which is why transcripts, replay, capability policy, and protocol adapters are in the language.

Two differences are worth stating precisely rather than as a scoreboard.

Concurrency. BAML has green threads with spawn and await, and it deliberately rejected structured concurrency: a future outlives the scope that created it, and there is no automatic cancellation on scope exit. Harn's concurrency is scoped. Neither is strictly better. BAML's model has no syntactic cost for functions that ignore cancellation; Harn's makes lifetimes obvious and leaks harder. Pick the one whose default failure mode you prefer.

Durability. This is a real scope difference rather than a maturity gap. BAML has no durable execution, checkpointing, run replay, or human-in-the-loop, and its journal is in-memory and per-run. Harn's replay, session bundles, and approval flows are the parts BAML has not entered. On protocols, BAML has an MCP client and deliberately keeps protocol knowledge out of its core; Harn speaks MCP, ACP, and A2A directly.

If your problem is "this one call must return a reliable object" and you want to keep your existing codebase, BAML solves that directly and its generated clients are the shortest path. If your problem is "the orchestration between the calls became the hard part, and I need to replay what happened," that is what Harn is for.

ACP — Agent Client Protocol#

ACP is the most important map for anyone using Harn's serve adapter, because we speak ACP natively.

ACP termHarn equivalentNotes
session/new, session/load, session/resumeagent_session_open, session fork, snapshot resumeDirect match.
session/promptone user message → agent_loop invocationDirect match.
prompt_turnone agent_loop invocationThe outer user-message → final-response cycle, terminated by a typed terminal outcome and lossless stop_reason. One invocation contains many iterations.
stop_reasonstop_reasonSame names.
available_commandsskills, tool registryPartial match; ACP advertises slash-style commands.
Plan (agent plan updates)task_ledger, progress toolDirect match.
tool_calltool callSame names.
session/cancelclose_agent, cancellation tokenDirect match.
session/request_permissionapproval_policy, permissionsDirect match.

Read this carefully if you're writing ACP integrations: ACP's prompt_turn is the outer concept (one user request → final response with stop reason). Harn's loop counts iterations, which are model round-trips inside the prompt turn — the transcript events fire as iteration_start / iteration_end, and the steering seams use the same names. One agent_loop(...) invocation maps to one ACP prompt_turn and contains many iteration_* events.

A2A — Agent2Agent Protocol#

A2A termHarn equivalentNotes
Taskworker, agent_loop invocationA2A's Task is one unit of work with lifecycle state and history.
Messagetranscript event, messageDirect match.
TaskState (submitted, working, input-required, completed, ...)final_status, suspended statesA2A's state machine is more explicit; Harn maps closely.
Part (TextPart, FilePart, DataPart)blockDirect match.
ArtifactartifactSame name.

MCP — Model Context Protocol#

MCP deliberately avoids conversation-shape vocabulary. It defines Tool, Resource, Prompt, Sampling, Elicitation — primitives on which conversations run, not the conversations themselves.

MCP termHarn equivalentNotes
sampling/createMessageharness.llm.callOne model call.
TooltoolSame shape.
Resourcehostlib resource, transcript assetSame shape.
Promptprompt template, prompt librarySame shape.
ElicitationHITL hitl.askServer-initiated pause-and-ask pattern.

MCP has no turn / session / agent_loop — those are above MCP's layer. Use MCP as your tool surface, not as your orchestration model.

AG-UI#

AG-UI is event-based UI streaming, not loop topology. Its vocabulary (Lifecycle Events, Text Message Events, Tool Call Events, State Management Events) maps onto Harn's transcript event categories with different names but the same shapes. Harn's serve adapter emits AG-UI-compatible events.