Building Your Own Custom AI Agents

 Building Your Own 

Custom AI Agents


Difference of AI Agents verses alternatives?

  1. Automation - static steps
  2. AI agents - rough instructions. An agent covers single specific topic. Think in terms of standard operating procedures.
  3. Employees - can free form 

AI agents are composed of Instructions, Actions (tools, 70%), and Knowledge.


   Tips of Building AI Agents:

  1. Start from well-documented processes. Get the SOP documents.
  2. Business owners have no idea which AI agents they need. Thus they need consultants.
  3. Map out using Figma tool the customer journey.
  4. Scrape internal and external sources.
  5. AI agents give value through Actions
  6. No more than 4-6 tools per AI agent
  7. Model costs don't matter
  8. Prompt engineering is an art. 1) Provide enough examples. 2) Order matters. Most important at end. 3) Iterate.
  9. Customer support done in Zendesk, then agent must as well.
  10. Agent reliability has been solved.
  11. Clients don't care about which model you use. But if they do, then Azure OpenAI service.
  12. OpenAI is still the choice because of dev experience.
  13. Don't automate until value has been established.
  14. Don't think about Use Cases, but rather think about ROI. ROI = Rate x Hours - (Model Costs + Server Costs) / Dev Costs
  15. Kaggle competition (https://www.kaggle.com/)
  16. Do agent creation by department so can merge some together.
  17. Evals are important to big clients, but not small businesses because not consistent traffic.
  18. Types of agents: agents and workflows. crewai. 
  19. Agents need to be adaptable on feedback. Add tools to analyze the results. Ex: no database update agent without tool to get feedback. 
  20. Don't build around limitations.
  21. Deploying agents is hard.  Suggestion of using:  VRSEN/agency-swarm repo in Github.
  22. Use Agile on agent projects.
  23. Include human-in-loop for mission critical agents.
  24. Vertical AI agents in 2025.


Types of AI agents

1. Simple reflex agents

Simple reflex agents are the simplest agent form that grounds actions on current perception. This agent does not hold any memory, nor does it interact with other agents if it is missing information. These agents function on a set of so-called reflexes or rules. 

Example: A thermostat that turns on the heating system at a set time every night. The condition-action rule here is, for instance, if it is 8 PM, then the heating is activated.


2. Model-based reflex agents

Model-based reflex agents use both their current perception and memory to maintain an internal model of the world. As the agent continues to receive new information, the model is updated. The agent’s actions depend on its model, reflexes, previous precepts and current state. These agents, unlike simple reflex agents, can store information in memory and can operate in environments that are partially observable and changing. 

Example: A robot vacuum cleaner. As it cleans a dirty room, it senses obstacles such as furniture and adjusts around them. The robot also stores a model of the areas it has already cleaned to not get stuck in a loop of repeated cleaning.


3. Goal-based agents

Goal-based agents have an internal model of the world and also a goal or set of goals. These agents search for action sequences that reach their goal and plan these actions before acting on them. Example: A navigation system that recommends the fastest route to your destination. The model considers various routes that reach your destination, or in other words, your goal. In this example, the agent’s condition-action rule states that if a quicker route is found, the agent recommends that one instead.


4. Utility-based agents

Utility-based agents select actions that reach the goal and also maximize utility or reward. The criteria can include factors such as progression toward the goal, time requirements, or computational complexity. The agent then selects the actions that maximize the expected utility. Example: A navigation system that recommends the route to your destination that optimizes fuel efficiency and minimizes the time spent in traffic and the cost of tolls. This agent measures utility through this set of criteria to select the most favorable route.


5. Learning agents

Learning agents hold the same capabilities as the other agent types but are unique in their ability to learn. New experiences are added to their initial knowledge base, which occurs autonomously. 

   Learning: This improves the agent’s knowledge by learning from the environment through its precepts and sensors.

   Critic: This provides feedback to the agent on whether the quality of its responses meets the performance standard.

   Performance: This element is responsible for selecting actions upon learning.

   Problem generator: This creates various proposals for actions to be taken.

Example: Personalized recommendations on e-commerce sites. These agents track user activity and preferences in their memory. This information is used to recommend certain products and services to the user. The cycle repeats each time new recommendations are made. The user’s activity is continuously stored for learning purposes. In doing so, the agent improves its accuracy over time.


Risks and limitations

  1.   Multi-agent dependencies
  2.   Infinite feedback loops
  3.   Computational complexity


Best practices

  1.   Activity logs 
  2.   Interruption
  3.   Unique agent identifiers
  4.   Human supervision






Comments

Popular posts from this blog

Upgrading to .NET8 from desktop versions 4.8.X

JSON Web Tokens

GHL > Set website so shorter URL address