Skip to main content

AI Agents

Analysis | Toolkit | Trend

An AI agent is a software program or system that can perceive its environment, process that information, and take actions to achieve specific goals.

Multi-Agent Workflows: AI agents are designed to operate with some degree of autonomy, making decisions and taking actions based on their observations, knowledge, and programming.

Contents

Related

Agent Roles

BusinessCost CentresAI%
Executive/FounderStrategy, Product20%
Commercial OfficerSales, Product, Marketing30%
Financial OfficerFinancial, Treasury40%
Operations OfficerPerformance35%
Human Resources OfficerHuman Resources25%
Legal OfficerCompliance15%
Marketing OfficerMarketing, Product, Sales50%
Risk Officer30%
Information Security Officer40%
Information Officer45%
Technology Officer60%
Data Officer55%
Engineering RolesAI Impact
Creator80%
AI Engineer50%
Product Engineer45%
Platform Engineer50%
Protocol Engineer40%
Game Engineer40%

Characteristics

Key characteristics of AI agents include:

  • Perception: AI agents can perceive their environment through sensors or input data. This could involve visual perception, audio input, sensor data, etc.
  • Knowledge Representation: Agents have a knowledge base that represents information about the world, goals, constraints, and potential actions.
  • Reasoning: Agents use reasoning mechanisms to process their observations, existing knowledge, and goals to decide what actions to take.
  • Planning and Acting: Based on their reasoning, agents plan a sequence of actions to achieve their goals and then carry out those actions through effectors (output mechanisms).
  • Learning: Many AI agents have the ability to learn from experience and adapt their behavior over time to improve performance.

Prompt Format

Basic interaction with AI, need to build agents to do anything really valuable.

Five most important components of a prompt:

  1. Model
  2. Purpose
  3. Variables
  4. Examples
  5. Output

Related concepts:

No Framework

Crafting well-designed abstractions is hard, better go stay close to the metal.

Minimal Prompt Chainable

  1. Stay close to the metal: Focus on raw prompts rather than relying on complex libraries or abstractions.
  2. The prompt is the most crucial element in generative AI - don't abstract it away.
  3. Break down complex tasks into smaller, manageable chunks using prompt chains.
  4. Use prompt chains to build on previous results and create more sophisticated workflows.
  5. Avoid unnecessary abstractions and premature optimizations in your AI workflows.

Step-by-Step Process:

  1. Start with a minimalist chainable API:
    • Create a simple class with a single method for chaining prompts.
    • Allow for context passing and back-referencing to previous prompt results.
  2. Determine when to use prompt chains by asking these questions:
    • Is the task too complex for a single prompt?
    • Do you need to increase performance and reduce errors?
    • Do you need to use the output of previous prompts as inputs?
    • Do you need an adaptive workflow that changes based on the flow of the prompt?
  3. Design your prompt chain:
    • Break down your complex task into smaller, focused prompts.
    • Plan how each prompt will build upon the results of previous ones.
  4. Implement the prompt chain:
    • Use a minimalist approach with no external libraries (except for the LLM API).
    • Create a list of prompts, each solving a specific sub-task.
    • Implement a method to run the prompts sequentially, passing context and results between them.
  5. Test and refine:
    • Run your prompt chain and analyze the outputs.
    • Adjust individual prompts or the chain structure as needed to improve results.
  6. Scale up to full agentic workflows:
    • Use your minimalist prompt chain as a building block for more complex workflows.
    • Implement additional logic for handling agent state and responses as needed.
    • Keep your abstractions simple and focused on your specific use case.
  7. Stay adaptable:
    • Keep your implementation flexible to accommodate new LLM models and capabilities.
    • Regularly review and update your prompts and chains as the AI landscape evolves. By following this process, you can create valuable agentic workflows that remain close to the metal, giving you full control over your AI agents while avoiding the pitfalls of over-relying on complex libraries or frameworks.

Resources:

Source Code:

Frameworks

Search APIs

Essential search APIs for building AI agents:

YouTube Creators