docs/content/Agents/basics.mdx
import { Callout } from 'nextra/components'; import Image from 'next/image'; // Assuming you might want to embed images later, like the ones you uploaded.
DocsGPT Agents are advanced, configurable AI entities designed to go beyond simple question-answering. They act as specialized assistants or workers that combine instructions (prompts), knowledge (document sources), and capabilities (tools) to perform a wide range of tasks, automate workflows, and provide tailored interactions.
Think of an Agent as a pre-configured version of DocsGPT, fine-tuned for a specific purpose, such as classifying documents, responding to new form submissions, or validating emails.
Agents provide a more structured and powerful way to leverage LLMs compared to a standard chat interface, as they come with a pre-defined context, instruction set, and set of capabilities.
When you create or configure an agent, you'll work with these key components:
Meta: * Agent Name: A user-friendly name to identify the agent (e.g., "Support Ticket Classifier," "Product Spec Expert"). * Describe your agent: A brief description for you or users to understand the agent's purpose.
Source: * Select source: The knowledge base for the agent. You can select from previously uploaded documents or data sources. This is what the agent will "know." * Chunks per query: A numerical value determining how many relevant text chunks from the selected source are sent to the LLM with each query. This helps manage context length and relevance.
Prompt: The main set of instructions or system prompt that defines the agent's persona, objectives, constraints, and how it should behave or respond.
Tools: A selection of available DocsGPT Tools that the agent can use to perform actions or access external information.
Agent type: The underlying operational logic or architecture the agent uses. DocsGPT supports different types of agents, each suited for different kinds of tasks.
DocsGPT supports several agent types, each with a distinct way of processing information. The code for these can be found in the application/agents/ directory.
The Classic Agent follows a traditional Retrieval Augmented Generation (RAG) approach: it retrieves relevant document chunks, augments the prompt context with them, and generates a response. It can also use configured tools if the LLM decides they are necessary.
Best for: Direct question-answering over a specific set of documents and straightforward tool use.
Unlike Classic which pre-fetches documents into the prompt, the Agentic Agent gives the LLM an internal_search tool so it can decide when, what, and whether to search. This means the LLM controls its own retrieval — it can search multiple times, refine queries, or skip retrieval entirely if the question doesn't need it.
Best for: Tasks where the agent needs to dynamically decide how to gather information, use multiple tools in sequence, or combine retrieval with external tool calls.
A multi-phase agent designed for in-depth research tasks:
Includes budget controls for max steps, timeout, and token limits to keep research bounded.
Best for: Complex questions that require multi-step investigation, gathering information from multiple sources, and producing structured reports with citations.
Executes predefined workflows composed of connected nodes (AI Agent, Set State, Condition). See the Workflow Nodes page for details on building workflows.
Best for: Structured, multi-step processes with branching logic and shared state between steps.
<Callout type="info"> The legacy "ReAct" agent type is still accepted for backwards compatibility but maps to the Classic Agent internally. New agents should use Classic, Agentic, or Research instead. </Callout>You can easily access and manage your agents through the DocsGPT user interface. Recently used agents appear at the top of the left sidebar for quick access. Below these, the "Manage Agents" button will take you to the main Agents page.
<Image src="/new-agent.png" alt="API Tool configuration example for phone validation" width={800} height={450} style={{ margin: '1em auto', display: 'block', borderRadius: '8px' }} />
Once an agent is created, you can:
You can bootstrap a fresh DocsGPT deployment with a curated set of agents by seeding them directly into the user-data store (Postgres).
application/seed/config/premade_agents.yaml (or copy from application/seed/config/agents_template.yaml) to describe the agents you want to provision. Each entry lets you define prompts, tools, and optional data sources.POSTGRES_URI from .env (schema applied via python scripts/db/init_postgres.py), and a Celery worker should be available if any agent sources need to be ingested via ingest_remote.python -m application.seed.commands init. Add --force when you need to reseed an existing environment.The seeder keeps templates under the system user so they appear in the UI for anyone to clone or customize. Environment variable placeholders such as ${MY_TOKEN} inside tool configs are resolved during the seeding process.