What is an AI agent and how is it different from a chatbot?

A chatbot responds to a single user turn. An agent is an LLM that takes multi-step actions — it can call tools (web search, code execution, APIs), observe results, and plan its next step in a loop until a goal is achieved. Agents introduce autonomy, which requires robust error handling, guardrails, and human oversight checkpoints.

Function calling lets an LLM emit structured JSON to invoke developer-defined functions (e.g. get_weather, run_query) rather than answering in plain text. The developer executes the function, returns the result, and the model incorporates it into its response. It is the primary mechanism for giving LLMs access to live data and side-effecting actions.

MCP is an open standard introduced by Anthropic in 2024 that defines a universal interface for connecting AI models to external tools, data sources, and services. Think of it as USB-C for AI integrations instead of every app building custom connectors for every AI model, any MCP-compatible client (Claude, Cursor, VS Code, etc.) can connect to any MCP-compatible server (GitHub, Slack, databases, local files, APIs) using the same protocol.

A vector database stores and indexes embeddings for fast approximate-nearest-neighbour (ANN) search. Popular options: Pinecone (managed, easy), Weaviate (open-source, feature-rich), Qdrant (Rust-based, fast), pgvector (PostgreSQL extension — best if you’re already on Postgres). For prototyping, even FAISS in memory works.

Frameworks like LangChain, LlamaIndex, and LangGraph provide pre-built abstractions for chains, agents, RAG pipelines, and memory. They accelerate prototyping but add abstraction overhead. For production, many teams replace framework code with direct API calls and custom logic for better observability and control.

Multiple specialised AI agents collaborate to complete complex tasks — one plans, one researches, one codes, one reviews. Frameworks like AutoGen and CrewAI implement this pattern. Benefits: parallelism, separation of concerns, specialisation. Challenges: inter-agent communication overhead, error propagation, and cost.