Skip to main content
An AI agent is a system in which a language model decides which steps to take to complete a task and carries them out with tools: searching for information, calling an API, reading or writing files. It works in a loop: the model asks for a tool, gets the result and decides the next step until the task is done. An agent is not a chatbot with a longer prompt. A chatbot answers once with text; an agent acts, checks what happened and acts again. Agents get their tools through tool calling or from MCP servers.

Why it matters for generated documents

  • Many tasks end in a file. A report in Word, a budget in Excel or a deck in PowerPoint is often the deliverable, not a step on the way.
  • The tool must return a checkable result. Status, links and an error code let the agent decide what to do next; free text does not.
  • Errors should be fixable. When a tool says which argument was wrong, the agent corrects its call instead of giving up.
  • Inputs can carry instructions. A file the agent reads may contain text that tries to steer it, so treat file content as data, not as orders.

Agents in Doconda

Doconda gives your agent eight tools, through the MCP server or doconda.tools() in the Python and TypeScript SDKs: Every create and edit is itself made by an agent inside Doconda, which writes the file, checks it and fixes what it finds before delivering it.

What is tool calling

How a model asks your code to run a function.

What is MCP

The protocol that connects agents to tools.

MCP server

Connect Doconda to Claude, Cursor, Codex and others.

Structured output vs file output

What an agent should get back from a document tool.