Tutorial 13: Building Autonomous Agents

By Jakub RusinowskiLast updated 10 min readAdvanced

Agents are AI systems that can use tools (web search, file execution) to complete complex tasks.

Frameworks

CrewAI

Orchestrate a team of agents. Example: A 'Researcher' agent finds info, a 'Writer' agent drafts the post.

python
from crewai import Agent, Task, Crew
# Define agents and tasks...

AutoGen (Microsoft)

Multi-agent conversation framework. Agents chat with each other to solve problems.

Requirements

Agents require smart models. Small models (7B) often get stuck or hallucinate tool usage.

  • Recommended: Llama 3.1 70B (quantized) or Qwen 2.5 32B/72B.
  • Minimum: Llama 3.1 8B (it has specific tool-use training).

Routing steps ("which tool or worker next?") do not need a chat model: a decision model answers them with a probability per option, and its confidence thresholds tell you when to hand off to a bigger model. The request builder generates the call.

If your agent uses a reasoning model, every step pays its thinking time again: see thinking budget and latency for when to switch thinking off per step.