Skip to content

Marg and other frameworks ​

Marg is not a replacement for a general agent framework. It is the layer you would otherwise write on top of one when the agent has to finish a job for real users: collect what the backend needs, validate it, show it, get an explicit yes, write exactly once.

Orchestration libraries (graphs, handoffs)Low-code buildersMarg
Who reads "yes"the modelthe modelthe runtime, by the whole message
Forms, pickers, confirmationyour UI code, if anythe builder'sdrawn and read by the runtime, carried into tool calls
Many domains, one entry pointyou wire itone bot per flowdrop-in domains, typed routing, sticky
Decisionsprompt and parseprompt and parserules → decision model → logprobs, calibrated
Regression gateyour harnessmanualscenario runner, mock model, CI with no key
Identity, limits, caps, cost, telemetrybring your ownplatform'sincluded, model-agnostic

Where the line is ​

Tool confirmation. Most frameworks offer a confirmation hook: a tool pauses, the model asks the user, a dialog answers. The model still reads the reply. On a blind corpus of 521 typed replies, a reader that looked at the leading word mis-read 235 as a bare yes or no; reading the whole message mis-read none. Marg's gate is the runtime's, three times over: the skill rule, the tool schema, the runtime guard. The pattern.

Human input. A graph node that pauses for input (an interrupt, a RequestInput), now often with a response schema, validates the shape of what comes back; the question's wording, the choice of control and the reading of a typed reply are still the model's or your code's. In Marg a step draws its ask (a form card, chips, a picker), reads the reply by its whole content, carries the value into every later tool call, and tells the model one fact. Three helpers cover most steps. A new step.

Evaluation. Trajectory and rubric evaluation judge a run after the fact, often with another model. Marg's scenarios assert what must always hold, deterministically, against a writes-off gateway, on a scripted mock model, so the gate runs in CI with no key. Both have their place; Marg ships the one that can be a merge gate. Evals.

Breadth. Graph workflows, agent-to-agent protocols, live audio, visual builders and a hundred integrations are not Marg's job. Marg reaches those ecosystems through MCP (your tools, any language) and the client protocol (any client). Use the general framework for the general part; put Marg where the write happens.

The review of adk.dev goes through one of them in detail.

Apache-2.0. The docs are mirrored from the repository on every merge.