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

> ## Agent Instructions
> The docs are served at https://docs.devias.io. Every path in these docs is relative to that root: /llms.txt is https://docs.devias.io/llms.txt.
> Devias is an open-source platform that works as an operating system for a business: a core (records, views, workflows, agents, permissions) with installable modules.
> Pages are typed by folder. concepts/ explains what things are, guides/ gives procedures, reference/ is exhaustive (SDK, CLI, HTTP API), operate/ covers hosting. Use /start/glossary for exact terms.
> Every id in a module (module, object, field, view, action, workflow, step, connection, variable, event, policy) is a uuid. Generate them with `devias id <count>`. Never invent dotted or readable ids.
> Run `devias plan` and read its output before `devias apply`. Apply only what the plan says.
> The OpenAPI document, including the routes of the modules in the reference setup, is at /reference/api/openapi.json.
> Devias is young and changes quickly. If a page and the source repository (github.com/devias-io/devias) disagree, the repository is right.

# Define an agent

> How to create an agent. In the studio, start from a template (Blank, Read-only analyst or General) and set name, instructions, tools, starter prompts, Takes tasks and Default agent. In a module, declare it with defineAgent. Includes rules for writing instructions.

An agent can be defined in two places: in the studio for one workspace, or in a module so that every workspace that installs the module gets it.

## Define an agent in the studio

Choose **Agents** in the sidebar and create one. Start from a template.

| Template | What it gives |
| - | - |
| Blank | Nothing. Everything is chosen by hand. |
| Read-only analyst | Looks things up and answers questions. It cannot change anything. |
| General | Every tool the person may use, including tools added later. |

Then set these properties.

| Property | Meaning |
| - | - |
| Name and What it is for | Shown when picking an agent. |
| Instructions | Added to every conversation with this agent. |
| Tools | All of them, or a chosen list. Each is set to **Ask first** or **Runs freely**. |
| Starter prompts | Suggestions shown at the start of a conversation. |
| Takes tasks | Lets people assign tasks to the agent. |
| Default agent | Makes Home and new conversations start with this agent. |

An agent's page has a tab for each part: General, Instructions, Tools, Skills and Usage.

## Define an agent in a module

A module declares agents in its manifest with `defineAgent`. They are created when the module is installed, updated with it, and archived when it is uninstalled. See [Agents and skills in a module](https://docs.devias.io/guides/modules/agents-and-skills.md).

## Write effective instructions

* State what the agent is for in the first line.
* Describe how the business works in plain words: stages, rules and units.
* State what it must never do, and who to ask instead.
* Tell it to look a record up before creating one, to avoid duplicates.
* Keep the instructions short. A few clear rules are followed better than a long list.

Step-by-step procedures belong in a [skill](https://docs.devias.io/guides/agents/skills.md), not in the instructions: an agent loads a skill only when it needs it.

## Related

* [Skills](https://docs.devias.io/guides/agents/skills.md): teach an agent a procedure.
* [Tools and approvals](https://docs.devias.io/guides/agents/tools-and-approvals.md): set what an agent may do.
* [Agents](https://docs.devias.io/concepts/agents.md): the concept.


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