> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doconda.com/llms.txt
> Use this file to discover all available pages before exploring further.

# What is an AI agent

> An AI agent is a system where a language model decides which steps to take and uses tools to complete a task.

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 it is done. Agents are built with
[tool calling](/en/glossary/tool-calling) or with [MCP](/en/glossary/mcp) servers.

## Why it matters when generating documents with AI

* Many agent tasks end in a file: a report in Word, a budget in Excel, a presentation.
* The agent needs tools that return a checkable result (status, link, warnings), not just text.
* An agent can check its own result and fix it if the tool explains what went wrong.
* Files the agent reads can carry hidden instructions; they shouldn't be obeyed.

## With Doconda

Doconda connects to your agent through the [MCP server](/en/agents/mcp), the SDK tools or the REST API. The agent gets
tools to create, upload, review, edit and list documents and read their report. When creating, if a source tries to
give orders, it is ignored and the report says so (`source.instructions`, see [Create](/en/guides/create)).

## Related

* [What is tool calling](/en/glossary/tool-calling)
* [What is MCP](/en/glossary/mcp)
* [Structured output vs file output](/en/glossary/structured-output)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.