What is an Agent?

Definition

An AI agent is a system that combines a Large Language Model (LLM) with the ability to take actions in the real world.

Unlike a simple chatbot that can only respond with text, an agent can interact with external systems, retrieve information, and execute tasks autonomously.

Key Components

LLM: The agent uses an LLM for reasoning, planning, and decision-making.

Tools: Agents have access to a set of tools that extend their capabilities beyond text generation. Tools are typically retrievers that can:

  • Access databases

  • Make API calls to external services

  • Undertake File system operations

  • Search the web

  • Execute code

Decision Making: The agent uses the LLM to analyze tasks, determine which tools are needed, and coordinate their use to achieve goals.

How Agents Work

  1. Receive a task or query from a user

  2. Plan and reason using the LLM to break down complex tasks

  3. Select and execute tools based on what’s needed

  4. Observe and process results and determine next steps

  5. Iterate until the task is complete or provide a final response

This autonomous capability makes agents particularly powerful for complex, multi-step tasks that require both reasoning and real-world interaction.

A flowchart showing the agent process from user input to LLM reasoning, tool selection, tool execution, and final output.

Creating an Agent

You will use Neo4j, Python, and LangChain to build an agent that will use the retrievers you’ve already learned about as tools.

You will progressively add more tools to the agent, starting with a simple schema introspection tool, then adding document retrieval, and finally text-to-Cypher capabilities.

Lesson Summary

In this lesson, you learned how agents use reasoning and tools to perform complex tasks autonomously.

In the next lesson, you review a simple Python agent that uses LangChain to interact with Neo4j.

Chatbot

How can I help you today?