# Basics

LLM agents represent an advanced AI paradigm where large language models are augmented with tools, memory, and decision-making processes to tackle complex tasks. Each agent functions autonomously, performing specific roles, interacting with tools, and dynamically adapting to achieve defined goals. These agents can be customized, and orchestrated to form cohesive workflows.

### Core Components of LLM Agents

#### **Base LLM**

* Acts as the primary language-processing engine.
* Processes natural language inputs and generates relevant outputs.
* Makes decisions and provides responses based on predefined prompts and roles.

#### [**Tool Integration**](/low-code-builder/tools-and-external-integrations.md)

Agents can leverage various tools to extend their capabilities:

**Search Category**

* **Tavily**: For semantic search and general web information retrieval
* **Jina**: AI-powered search capabilities
* **Exa**: Knowledge-focused search tool
* **ScaleSerp**: Structured search results from multiple engines

**Scraping Category**

* **ZenRows**: Advanced web scraping with anti-bot protection
* **Jina**: Intelligent content extraction
* **Firecrawl**: High-performance web crawling and extraction

**Execution Category**

* **E2B Interpreter**: For secure and isolated code execution
* **Python**: For embedding custom logic, performing API calls, and running complex workflows
* **SQL Executor**: For database querying and management
* **HTTP API Call**: For connecting with external services or internal APIs

#### Tool Usage Examples

1. **Search Category**: Use **Tavily** or **ScaleSerp** when the agent needs to retrieve real-time data from the web, like finding the latest news or gathering information on a specific topic.
2. **Scraping Category**: Use **ZenRows** or **FireCrawl** to extract data from specific URLs when structured data from websites is required, such as collecting information from a list of articles or scraping details from an e-commerce site.
3. **Execution Category**:
   * **E2B** is used for secure and isolated code execution where agents need to perform calculations or data transformations.
   * **Python** is ideal for embedding custom logic, performing API calls, and running complex workflows that involve data processing or integrating other custom functions.
4. **API Requests**: Use the **HTTP API** tool to allow agents to connect with external services or internal APIs, supporting seamless integration with a wide range of web services.

**Agent Types**:

* **Simple Agent**:
  * Handles straightforward input/output processing in single-turn interactions.
  * Limited to basic prompt handling without tool utilization.

* **ReAct Agent**:

  * Designed for sophisticated, multi-step reasoning tasks.
  * Combines decision-making and execution in a single workflow.
  * Capable of handling more complex tasks and better tool utilization.
  * Includes configurations for iterative processing (e.g., max loops) and complex error handling.

* **Reflection Agent**:&#x20;

Enhances reasoning by adding self-assessment capabilities, allowing the agent to evaluate its own responses before finalizing outputs

### Key Features

#### **Memory Systems**

* Supports **short-term** memory for tracking conversation context within a single session.
* **Long-term memory** for retaining important knowledge across sessions, enhancing personalization and continuity.
* **Context window management** allows agents to summarize information and avoid memory overflow.

#### **Prompting Mechanisms**

* Role-based prompting (e.g., "helpful AI assistant") specifies the general behavior and tone of the agent.
* Task-specific instructions guide agents on how to execute particular types of requests.
* System prompts enable developers to control agent behavior, providing an additional layer of customization.

#### **Reflection Capabilities**

* Allows agents to evaluate their responses and adjust strategies accordingly.
* Built-in error handling for more robust interaction.
* Self-improvement mechanism enables agents to learn from past interactions and enhance response quality over time.

#### Configuring Agents for Specific Roles and Goals

Agents can be tailored for specialized tasks by defining their roles and goals explicitly. For example:

* **Role**: Specifies the primary function or task focus (e.g., “Market Analyst” or “Customer Support Assistant”). Provides an objective, guiding the agent’s decision-making process (e.g., “Analyze sales trends” or “Assist users with account inquiries”)

### Workflow Orchestration

#### Linear Orchestrator

* Manages agents in a sequential, predefined flow
* Ideal for tasks that follow a strict order

#### Adaptive Orchestrator

* Allows dynamic branching based on real-time results
* Enables conditional paths through the workflow
* Adapts processing based on intermediate outputs

#### Graph Orchestrator

* Provides the most flexible workflow management
* Supports complex, non-linear agent interactions
* Enables parallel processing and sophisticated decision trees
* Allows for feedback loops and iterative refinement

Workflow orchestration allows developers to structure complex, multi-agent workflows where agents can pass information to each other, delegate tasks, or engage in sequential decision-making.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getdynamiq.ai/low-code-builder/llm-agents/basics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
