Building an AI Agent
An AI agent is different from an automation.
Automations follow a predefined sequence that does something when a trigger is called.
An agent is capable of understanding and reasoning. It's a digital employee that can think, remember, and act.

3 Key Components of an agent
- Brain(LLM) - handles the reasoning, planning and language generation.
For e.g Open AI, Claude
- Memory - gives the agent ability to remember past intereactions to make better decisions.
- Tools - How the agent interacts with outside world
- Retieve data - searching the web
- Taking action - sending an email, update database or create event
- Orchestration - call other agents, trigger a workflow or chaining actions
With agents, you have single-agent system or multi-agent system
Single agent system
The user prompts, the agent reads the prompt, then gives the solution.
Multi agent system
Multi-agent systems have more struture. You might have different agents doing different tasks. For example, you might have a sales agent, a marketing agent and a customer support agent. Then you might also have one supervising agent who handles the prompt and decides who to send the prompt to.
Setting Guardrails
- Identify risks and edge cases in your specific use case
- Optimize for security purpose and user experience
- Adjust guardrails over time.
Asides from using a a AI agent builder like n8n to build these automations, you need to define agent prompts.
Agent Prompt
- Role - What kind of assistant it is?
- Ask - What is it trying to accomplish
- Input - What data does it have access to?
- Tools - What actions can it take?