Duna runs AI agents beside people and systems, inside the same governed process. An agent reads, classifies, recommends and calls approved tools. The process still decides what happens next, who must approve it and what goes on record.
A model is good at reading a messy invoice. It is a poor place to keep your approval rules. So Duna splits the work: an agent brings intelligence to one step, and the engine keeps everything that has to be certain.
The agent is one stop on the line. While the model works, the instance is parked and its state is in PostgreSQL. The answer is checked against the agent's output schema, and a guarded transition you wrote routes a mismatch to manual review.
An agent's answer never moves an instance by itself. Only the engine does, on a transition you defined.
What you getConfigure a model connection, publish an agent and run it from a process. The result is validated, stored in a variable, visible in the history and read by a deterministic transition.
An agent is a published definition: a model connection, instructions, an input schema and an output schema. A process runs it with an agent action, placed like any other action.
The instance parks while the model works, so no request and no database transaction is held open. When the answer arrives, Duna checks it against the output schema before it reaches a variable. Your own guarded transition then decides what happens next.
An agent action stands where an instance can wait: in a state's onEntry, on a transition or in onExit. Publishing refuses it inside a loop or a transaction group, because no model call may run inside a database transaction.
Read about agents and the agent action{
"id": "analyze-invoice",
"type": "agent",
"assignTo": "invoiceAnalysis",
"timeoutMs": 120000,
"onError": { "policy": "catch", "catchTo": "manualReview" },
"config": {
"agent": "invoice-analyst",
"version": 3,
"input": {
"invoice": { "$expr": "vars.invoiceFile" },
"purchaseOrder": { "$expr": "vars.purchaseOrder" }
},
"maxModelCalls": 8,
"maxTokens": 16000,
"resultPath": "output"
}
}What you getA person who does not write code creates, tests, publishes and uses an agent entirely in the web app.
Agent Studio is where you create, test and publish agents in the web app. Every part of an agent has a form: the model, the instructions, the input and output schemas, its tools, its knowledge and its limits.
The same agent is always there as JSON, and the two views stay in step without losing data. A playground runs the agent on sample input before any process depends on it.
A run in the playground changes no instance. Tools with side effects are mocked there by default.
What you getAgents choose and call authorised Duna and MCP tools, and every call is governed, validated and on record.
A tool is a published, versioned operation with an input schema, an output schema and a side-effect class. Tools are made from what Duna already runs: HTTP calls, database statements, files, mail, broker messages and whole processes.
An agent chooses among the tools its definition lists. It never writes its own SQL, URL or shell command. Every call goes through one gateway that validates it, asks the policy, counts it against the budget, runs it and records it.
A tool description, a document or a tool result can carry instructions meant for the model. Duna treats all of them as untrusted data: a call is judged on its own facts, whatever the model's text says.
By default, read-only calls and internal writes pass straight through. External, sensitive and financial calls wait for a person. Destructive calls are refused.
What you getA long task asks for approval, survives a restart and continues without repeating the side effects it already completed.
Real tasks outlast one model call. A durable agent keeps a session, saves checkpoints it resumes from after a crash, and records its tool calls so that a finished side effect is not blindly repeated.
When a call needs a person, it becomes an ordinary Duna task. The approval is bound to the exact arguments: change them, and the call must be approved again. No worker and no transaction is held while it waits.
Duna does not claim exactly-once side effects. A tool call carries an idempotency key, and when its outcome cannot be known it goes to an operator instead of being repeated.
What you getAn agent answers from authorised knowledge with sources you can audit, and never retrieves another company's document.
A knowledge collection holds the documents an agent may consult, organised by company, project and group like everything else in Duna. Ingestion jobs extract, chunk, embed and index them.
At run time an agent retrieves only what the caller's company and the document's own permissions allow. It returns its answer with the sources it used, or says that it does not know enough.
Retrieval does not make an answer true. Duna does not present a model's claim as verified evidence because a document was found.
What you getTeams of agents run from your processes: bounded, visible and governed.
A team is a published definition too: the agents and their versions, their roles, a collaboration pattern and the budgets that end it.
Where the collaboration is really a business process, Duna runs it as one. A sequence is a sequence of states, and agents working side by side are a fork and a join, with the durability and the history that come with them.
Agreement between agents is not proof. A team's result is checked like any other output, and the rules of the process still decide.
Two specialists work in fork branches, so each has its own durable state and history. A third agent consolidates, and the process rules read the result.
What you getAn outside AI application discovers and calls an approved Duna capability under full authorization and audit.
Duna speaks the Model Context Protocol in both directions. As a client, an agent uses the tools of MCP servers you registered. As a server, Duna offers its own capabilities to outside AI applications.
An outside application can start an approved process, read its status and result, call a published tool, or run a published agent or team. Only what an administrator publishes is visible. The administrative API is never exposed as a whole.
What you getAdministrators see and control every run, its cost and its security.
Operators have the control over agents that they have over instances. A run catalogue filters by agent, version, team, company, model, status, error and cost.
The inspector shows a run's input, output, tool calls, policy decisions, approvals, handoffs, retries and usage, under the redaction rules of the instance it belongs to. Budgets apply across nested agents, tools and retries, so a limit cannot be stepped around.
The inspector records what an agent did: actions, outputs, evidence and decisions. It does not store or show hidden model reasoning.
What you getA regression is found before the agent is published.
A model's answer is not deterministic, so its quality has to be measured. Simulation replaces the model, the tools and the knowledge with canned answers and failures, and never calls a provider.
Evaluation datasets hold input cases with expected outputs, required facts, expected tool calls and forbidden actions. An organisation can require them to pass before an agent is published.
A live model does not answer the same way twice, and Duna does not pretend it does. Replaying recorded answers and running the model again are two different tests, named apart.
Six rules hold for every agent, every tool and every team. Duna and the policy enforce them, outside the model.
Agents are off by default, and Duna runs as before without them. The switch alone is not enough: nothing leaves for a model until a company's policy names a model connection.
ProcessFlow:Agents:EnabledA model sees the instructions and the values you mapped, after they passed the input schema. It never gets the whole variable bag, the environment or a secret.
additionalProperties: falseDuna validates each answer against the agent's output schema before it reaches a variable. An invalid answer becomes a classified error on your error route.
agent.outputInvalidModel calls, tokens and time are capped. The limit that applies is the smallest of the action's ask, the agent's own, the company's maximum and the host's cap.
maxModelCalls · maxTokens · timeoutMsA run belongs to the company of its instance. Another company's agent is refused when the process is published and again when it runs.
action.agentCompanyMismatchSix kinds of model connection, a local Ollama among them. The runtime, Microsoft Agent Framework today, sits behind Duna's own interfaces, and Duna keeps running when no provider can be reached.
openai · anthropic · ollama · …Instructions to a model are not a security boundary. A document, a tool result or a user's text can try to redirect it, so no limit on this page depends on the model obeying.
Duna's Procure-to-Pay showcase runs with agents in it: one reconciles the invoice, specialists check it side by side, and a person approves the payment. Every step is a state or an action you can open in the editor.
Twelve more scenarios run on synthetic data and mock systems, so you can try each pattern before you build your own.
An agent never bypasses a financial control. The rules validate the recommendation before anyone is asked to approve it.
Everything on this page is part of Duna itself: one web app, one API, one policy and one audit record. Pick a module to read about it.
Design, configure, test and publish agents.
Run agents inside your processes.
Model providers and their credentials.
The approved tools an agent may call.
Runs agents behind Duna's own interfaces.
Context that lasts across calls and restarts.
Documents, retrieval and sources.
Agents that work together within budgets.
Uses MCP tools and offers Duna's own.
Watch and control every run.
Permissions, limits and policies in one place.
Measure quality and catch regressions.
Configure a model connection, publish an agent and put it on a transition. Everything else on this page builds on that step.