BiTree
  • Search For Lessons
  • Curriculum
  • Pricing
  • For Educators
  • Become a Tutor
  • About
  • Contact
Log InGet Started

Questions, concerns, bug reports, or suggestions? We read every message, write to us at [email protected].

More ways to reach us →
BiTree

Live coding lessons for aspiring developers and security professionals.

[email protected]

(201) 785-7951

Mon–Fri, 9 AM–5 PM EST

Learn

  • Search For Lessons
  • Curriculum
  • Pricing

Company

  • About
  • For Educators & Schools
  • Become a Tutor
  • Contact Us

Legal

  • Terms of Service
  • Privacy Policy
© 2026 BiTree. All rights reserved.
Curriculum/Artificial Intelligence/AI Agents and Agentic Systems
50 minAdvanced

AI Agents and Agentic Systems

After this lesson, you will be able to: Understand AI agents: tool calling, agent frameworks (LangChain, CrewAI), and the Model Context Protocol.

An agent is an LLM with tools and a loop: think → act → observe → repeat. This lesson covers tool calling fundamentals, the major frameworks, and the emerging MCP standard.

Prerequisites:Building with AI APIs

What an agent is

Plain LLM: input → output. Agent: input → think → call tool → see result → think again → ... → output. The loop is what makes them useful for tasks beyond a single response.

Tool calling (Anthropic)

Define tools. Model decides when to call them.

json
tools = [
{
"name": "get_weather",
"description": "Get current weather in a city",
"input_schema": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"],
},
}
]
response = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
tools=tools,
messages=[{"role": "user", "content": "Weather in Paris?"}],
)
# Inspect response.content for tool_use blocks
# Execute tool, send result back, loop until response is final.

💡 Model Context Protocol (MCP)

Open standard from Anthropic for connecting LLMs to tools/data. Servers expose resources/tools; clients (Claude Desktop, IDEs) consume them. Adopted broadly, the 'USB-C of AI tools'.

Agent frameworks

  1. 1

    LangChain, most popular, broad ecosystem, sometimes over-engineered for simple cases.

  2. 2

    LlamaIndex. RAG-focused.

  3. 3

    CrewAI, multi-agent crews (different specialized agents collaborate).

  4. 4

    AutoGen (Microsoft), research-grade multi-agent.

  5. 5

    Anthropic Agent SDK, first-party for Claude.

  6. 6

    DIY, for many cases, just a while loop with tool calls is enough.

Production agents are hard

Failure modes: infinite loops, hallucinated tool calls, runaway costs, security (prompt injection through tool outputs). Add: max iterations, tool authorization, monitoring, rollback on failure.

Sign in and purchase access to unlock this lesson.

Sign in to purchase
←Building with AI APIs
Back to Artificial Intelligence
AI Safety, Alignment, and Prompt Injection→