DEV Community

Cover image for Getting Started with AI Agents
neo one
neo one

Posted on • Originally published at do-nothing.ai

Getting Started with AI Agents

This article was originally published on do-nothing.ai. The canonical version is there.


Getting Started with AI Agents

Everyone is talking about AI agents. Most of them have never built one.

This guide gets you from zero to a working agent in under an hour. No frameworks to install. No courses to finish. Just the loop that makes agents work, and a code example you can run right now.

An AI agent is a system that uses a language model to decide what actions to take, executes those actions via tools, and observes the results to determine next steps. That is it.

Core Concepts

The agent loop: Perceive → Reason → Act → Observe → Repeat. It is a while loop with an LLM inside it. The industry spent a year naming this.

Tools: Functions the agent can call. Examples: web search, code execution, database queries, API calls.

Memory: How the agent retains context across steps. Short-term (within a conversation), long-term (vector stores or databases).

Framework Options

Framework Language Best For
Claude API (native) Python / JS Simple tool use, direct control
LangChain Python / JS Complex chains, many integrations
AutoGen Python Multi-agent conversations
CrewAI Python Role-based multi-agent teams

Quickstart with Claude

import anthropic

client = anthropic.Anthropic()

tools = [
    {
        "name": "get_weather",
        "description": "Get the current weather for a location",
        "input_schema": {
            "type": "object",
            "properties": {
                "location": {"type": "string"}
            },
            "required": ["location"]
        }
    }
]

response = client.messages.create(
    model="claude-opus-4-6",
    max_tokens=1024,
    tools=tools,
    messages=[{"role": "user", "content": "What's the weather in Paris?"}]
)
Enter fullscreen mode Exit fullscreen mode

What to Build Next

You now have an agent that does exactly one thing. That is more than most people who talk about agents at conferences can say.

  • Give it a second tool and let it choose which one to use
  • Add a loop that feeds tool results back to the model until it says "done"
  • Hook it up to something real: your email, your CRM, your content queue

When you are ready to hand actual business functions to agents, start with How to Delegate Tasks to AI Agents.

Top comments (0)