AI Agents
AI that can take actions and use tools
AI that can take actions and use tools
An LLM by itself can only generate text. An Agent is an LLM that can also take actions โ search the web, write files, run code, call APIs. It thinks about what to do, does it, checks the result, and repeats.
THE AGENT LOOP
AGENT = LLM + TOOLS
Every AI agent has two types of instructions. The system prompt is the hidden personality โ it defines who the agent is, what it can do, and how it should behave. The user prompt is what you actually say to it. Same agent, different system prompt = completely different behavior.
Hidden instructions that define who the AI is and how it should behave. The user never sees this. It's like giving an actor their character description before the scene starts.
What the user actually says to the AI. This is the visible message โ the question, request, or conversation.
You are a friendly, helpful assistant. Be warm and encouraging.
Try the same user message with different system prompts โ the AI's personality changes completely. Powered by flan-t5-base via Transformers.js. Running 100% in your browser. In production, larger models (GPT-4, Claude) follow system prompts much more precisely.
A chatbot is like emailing a colleague for advice. An agent is like having an executive assistant who checks your calendar, drafts the email, and sends it โ all while you focus on other work.