Are You Building REAL AI Agents or Just Using LLMs?

Cole MedinAbout 4 min readMar 24, 2025Watch original
THE SUMMARYAI-generated

Key Concepts

  • AI Agent: A program where the LLM's outputs control the workflow in a non-deterministic manner, interacting with the environment to achieve a specific goal.
  • Workflow: A sequence of steps, often involving LLM calls, executed in a predetermined order.
  • Non-deterministic: The agent decides what actions to take, when to take them, and how many times to repeat them, rather than following a fixed sequence.
  • Tools: Functions or abilities given to an agent to interact with the environment (e.g., accessing Google Drive, sending Slack messages, querying a database).
  • System Prompt: Instructions given to the LLM to guide its behavior and define its goals and preferences.
  • Observations: The agent's perception of the results of its actions in the environment.
  • RAG (Retrieval-Augmented Generation): A technique for providing an LLM with relevant information from a knowledge base to improve its responses.

Defining AI Agents

  • Hugging Face Definition: AI agents are programs where LLM outputs control the workflow. Key aspect: non-deterministic behavior.
  • Hugging Face Definition (Expanded): AI agents are AI models given the ability to interact with the environment to achieve a certain goal. This highlights the goal-oriented nature of agents.
  • Anthropic Definition: An agent lets the LLM decide how many times to run and continues to loop until it finds a resolution. The number of steps to complete is unknown.
  • Key takeaway: Agents are not just chained LLM calls; they involve the LLM making decisions about the workflow itself.

Agent Architecture and Functionality

  • Agent Components:
    • Abilities (Tools): Allow interaction with the environment (e.g., Google Drive, Slack).
    • Goals and Preferences: Defined through the system prompt.
    • Prior Knowledge: Provided through short-term (conversation history) or long-term memory (RAG).
  • Agent Process:
    1. Agent receives input and uses its tools to interact with the environment.
    2. Agent observes the results of its actions.
    3. Agent decides whether to take further actions based on its observations, potentially looping back to step 1.
    4. Once the goal is achieved, the agent provides the final result.

Examples of Workflows That Are NOT Agents

  • Example 1: Automated Social Media Posting
    • Description: A workflow that takes a user prompt, crafts posts for X, LinkedIn, and a blog, and then summarizes the posts.
    • Why it's not an agent: The workflow is sequential (step A, step B, step C). There is no non-determinism; the LLM does not decide which platforms to post to or how many times to post.
    • Value: Useful for crafting platform-specific messages using an LLM with a well-defined system prompt.
    • Key Point: Sometimes a simple workflow is better than an agent because you don't want the agent to make unwanted decisions (e.g., posting to X twice).
  • Example 2: Tech Stack Expert Chatbot
    • Description: A chatbot that asks questions to determine the user's technology needs and recommends a tech stack.
    • Why it's not an agent: Although the conversation flow is non-deterministic (the chatbot may ask questions in a different order), it does not interact with the environment. It relies solely on the system prompt and the user's input.
    • Key Point: Non-determinism alone does not make something an agent; it must also interact with the environment.

Examples of Actual AI Agents

  • Example 1: Long-Term Memory Manager
    • Description: An agent that manages long-term memories and notes using Google Docs.
    • Why it's an agent: It has tools to interact with the environment (Google Docs) and is non-deterministic (it decides whether to save information to the notes).
    • Functionality: The agent can save notes to Google Docs and retrieve them later to answer questions.
  • Example 2: GitHub Repository Analyzer
    • Description: An agent that analyzes the structure of a GitHub repository.
    • Why it's an agent: It interacts with the environment (GitHub) and is non-deterministic (it decides which files to analyze).
    • Functionality: Given a GitHub repository URL, the agent can analyze the repository structure and describe the different versions of the code.

Real-World Examples

  • Not an Agent: ChatGPT
    • Reason: It's primarily a conversational chatbot. Even with web search enabled, it simply feeds the search results as context to the LLM. It cannot decide to refine its search or take other actions based on the initial results.
  • Agent: Windsurf
    • Reason: Windsurf makes decisions about which files to analyze and which tools to invoke, demonstrating a high degree of non-determinism and interaction with the environment.
    • Example: Updating the model used for an agent involves Windsurf analyzing files and invoking tools to make the necessary changes.

Synthesis/Conclusion

The key distinction between AI agents and workflows lies in the LLM's ability to control the workflow in a non-deterministic manner and interact with the environment to achieve a specific goal. While both are valuable, AI agents offer greater potential due to their ability to make decisions and adapt to changing circumstances. The examples provided illustrate the importance of understanding these differences to effectively leverage AI in various applications.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.