Emergent

Building Your App › Custom Agent Building

Agent Architecture

Overview

Agents in Emergent are autonomous systems that can plan tasks, use tools, make decisions, and complete multi step work. This page introduces the core building blocks that define how agents are designed and how they operate.

What Is an Agent

An agent is a program that uses a large language model for reasoning and combines it with tools, memory, and structured instructions. The result is a system that can understand goals, plan steps, act on those steps, and adjust when something goes wrong.

Agents are not simple chat prompts. They are active processes that carry out work and evaluate the results.

Agents, Wrappers, and Workflows

It helps to understand how agents differ from simpler systems.

TypeDescriptionMain Limitation
WrapperA language model with a basic promptNo decision making
WorkflowA fixed sequence of stepsCannot adapt to changes
AgentA system that plans and actsCan adapt and self correct

Agents have the ability to choose actions, call tools, analyze results, and continue until the task is complete.

Core Components of an agent in Emergent

Agents are structured around a small set of essential parts. Understanding these parts makes it easier to build your own custom agent.

Brain

The brain is the language model that performs reasoning. It reads instructions, analyzes information, and decides what to do next. You can choose from multiple models depending on your needs.

Tools

Tools allow agents to act in the world. They may run code, call APIs, read or write files, or handle data. Tools give the agent the ability to do more than generate text.

Environment

The environment is the space where the agent operates. This might include a file system, a code repository, external services, or any resource the agent uses during its tasks.

System Prompt

The system prompt defines the role of the agent. It includes rules, goals, constraints, and guidance. A clear prompt helps the agent stay focused and behave consistently.

Feedback Loop

Agents review their own progress. When something goes wrong, the agent can read the error, understand what happened, and try again. This self correction is part of what makes agents reliable.

Sub-Agents

Sub-agents are smaller agents with narrow responsibilities. The main agent can assign tasks to sub-agents to keep work organized and predictable.

How Agents Execute Tasks

When an agent receives a goal, it follows a general pattern.

  1. Understand the instructions
  2. Break the goal into steps
  3. Choose a tool or method for each step
  4. Execute actions
  5. Check the results
  6. Repeat if needed

This loop continues until the agent completes the task or reaches a stopping condition.

Why Agent Architecture Matters

A clear architecture creates predictable behavior. Each component has a purpose and can be configured independently. This makes it easier to build agents that are dependable, easy to test, and suitable for real work.

Made with Emergent