MMOOZZGG.com

How to build an AI agent

Components of an AI agent: the seven parts, explained without code

5 min read14 sources

The components of an AI agent are seven parts: model, instruction, tools, knowledge, memory, channel and control. Almost every part has an open option. For example, the Qwen 3 models came out on 29 April 2025 with open weights under the Apache 2.0 license.

On this page · 4 sections

For all levels

The seven parts of an agent

How these parts work together in the “think, act, check” loop is explained on the page about how an agent works. Here each part is described on its own.

1. Model: the neural network that understands the task and picks the next step.

2. Instruction (system prompt): a standing task that says who the agent is, what it may do and when to call a person.

3. Tools: connections through which the agent acts, such as finding an order in the CRM or sending an email. They have a common standard, MCP (Model Context Protocol), which Anthropic opened on 25 November 2024 as one way to connect AI to data and services.

4. Knowledge (RAG): your documents, which the agent searches before it answers.

5. Memory: the history of the current conversation and facts about the customer needed in later conversations.

6. Channel: where the agent works with people, such as Telegram, email, a website chat or the phone.

7. Control: access rights, an action log and a human check before a risky step.

Not every agent needs all seven. A personal assistant needs only a model, an instruction and a couple of files. An agent that answers customers needs every part, and companies most often save on the last one, control, and then pay for it with mistakes.

Open options for each part

Model. DeepSeek R1 came out on 20 January 2025 with open weights (model files you can download) under the MIT license, and Qwen 3 under the Apache 2.0 license. The program Ollama runs them on your computer or server, and its license is MIT too.

Which open models suit a business and how much memory they need is covered in detail on the page about open models.

Instruction. This is plain text, and it needs no separate program. Tools connect through MCP or through the ready nodes of a builder.

Knowledge. The vector databases Chroma and Qdrant (stores where text is searched by meaning) come under the Apache 2.0 license. The Flowise builder, under the same license, loads documents, splits them into pieces and saves them to such a database with the “Upsert” button.

Memory. The documentation of the open LangChain library describes both kinds of memory: short-term memory keeps the history of one conversation, and long-term memory keeps facts between conversations.

Channel. You create a Telegram bot in @BotFather with the /newbot command, and BotFather then gives you a token (a key through which a program controls the bot). Keep the token like a password: according to the Telegram documentation, anyone who has it controls the bot.

Control. Langfuse, an open platform for logging and evaluating AI applications, comes under the MIT license, except for the ee folders, and installs on your own server. A comparison of open build tools is on the page about open tools.

AI agent1Model2Instructions3Tools4Knowledge (RAG)5Memory6Channel7Control
Seven parts of an AI agent

What costs money

An open license removes the fee for software, but not for work. Money goes to three things: hardware or cloud for the model, time to build and test, and support after launch.

A model on your own hardware. A powerful graphics card for a mid-size open model costs about $8,890, and renting a similar card in Russia costs about $1 an hour; prices checked 29.09.2026.

A model in the cloud. You pay for tokens (pieces of words by which the model counts text), and the price depends on the model and the volume. You can calculate the cost for your own load in the cloud API calculator.

A cloud abroad does not fit all data. Under 152-FZ, Russia’s personal data law, data of Russian citizens is collected and stored in databases in Russia, and before a transfer abroad the operator notifies Roskomnadzor, the data regulator. How we handle this is on the page about data security.

Support costs money too, even when all the software is open. Prices, rules and the models themselves change, and someone must update the instruction and the knowledge base and check the log at least once a week.

Time usually costs the most: testing the agent on real questions, editing the instruction, reviewing mistakes after launch. The local AI cost calculator helps you compare your own server and the cloud in money.

Design of a typical agent

Take a support agent for an online store that answers the question “where is my order”. Here is how the seven parts work in it.

The model on the company server understands the question. The instruction tells it to ask for the order number and never promise delivery dates that are not in the system.

A tool reads the order status in the accounting system. Knowledge gives the delivery and return rules, so the agent answers by them and not from the model’s memory.

Memory keeps the conversation history, so the customer does not repeat the order number. The channel is a Telegram chat.

Control: the agent only reads orders and changes nothing in them, and each of its actions is logged. A person handles refunds: OpenAI advises giving risky actions, such as order cancellations, large refunds and payments, to a person.

You can remove a part, but the agent will lose some of its work. Without a tool it does not know the order status, without knowledge it mixes up the rules, and without control you cannot let it near customers.

Sources and fact-checking

Checked by the editors on 16 October 2026.

  1. GitHub, 16 October 2026 (github.com)
  2. Alpine Linux packages, 2026 (pkgs.alpinelinux.org)
  3. Anthropic, 25 November 2024 (anthropic.com)
  4. Simon Willison, 20 January 2025 (simonwillison.net)
  5. Simon Willison, 29 April 2025 (simonwillison.net)
  6. Brace Law Firm, 9 July 2023 (brace-lf.com)
  7. GitHub, chroma-core/chroma, 2026 (github.com)
  8. GitHub, qdrant/qdrant, 2026 (github.com)
  9. LangChain Docs, 2026 (docs.langchain.com)
  10. GitHub, langfuse/langfuse, 2026 (github.com)
  11. OpenAI, A practical guide to building agents, April 2025 (cdn.openai.com)
  12. Flowise documentation: Document Stores, checked 16 October 2026 (docs.flowiseai.com)
  13. Telegram documentation: Bot Features: BotFather, checked 16 October 2026 (core.telegram.org)
  14. Ollama documentation: README, checked 16 October 2026 (github.com)

Found a mistake? Tell us

Publications

Contact us