22 min read
ByDiego Carrion·Co-Founder & Software Engineer, Duotach
Complete GuideAI AgentsClaude CodeEnterprise

AI Agents with Claude Code: Complete Guide for Businesses

AI agents in Claude Code are autonomous systems that read code, plan complex tasks, execute commands, create files, and coordinate multiple instances working in parallel. This guide is written from the experience of Duotach, a consultancy that built a system of 16 AI agents with Claude Code to automate SEO operations for multiple clients.

In This Article

This guide covers everything about AI agents with Claude Code: what types exist, how they are built, what they cost, and how we use them in production every day. This is not a documentation translation or a generic tutorial — it is written from the real experience of a consultancy that builds them for clients.

51%
of companies already have AI agents in production
200K
context tokens to understand complete projects
16
AI agents in our production SEO system
01

What Are AI Agents in Claude Code

An AI agent in Claude Code is a program that receives an objective, reasons about how to accomplish it, plans the steps, executes concrete actions using tools, evaluates results, and decides whether to iterate or finish.

Agent vs Chatbot

A chatbot receives a question and returns an answer. An agent receives an objective and accomplishes it. It can create files, edit code, execute terminal commands, search the web, send data to external APIs, and coordinate other agents to work in parallel.

All of this without a human needing to intervene at each step.

Three Key Components

Reasoning model. Extended Thinking with up to 128K tokens of internal reasoning before acting.

Tools and actions. File read/write, bash command execution, web search, code editing, and connection with external tools via MCP.

Memory and context. 200,000 tokens that allow it to read and understand complete projects — not isolated fragments.

Why is Claude Code particularly good for agents? Because it is not an IDE or an autocompleter. It is a native agent that lives in the terminal, reads your entire codebase, and executes autonomously. With 200,000 context tokens (vs ~10,000 for Cursor, ~128K for GPT-4), it can keep an entire complex project in mind while working.

Adoption numbers confirm this: 73% of developers use AI tools in 2026 (vs 45% in 2023), and 51% of companies already have agents in production according to LangChain's State of AI Agents 2025. This is not experimental technology — it is productive infrastructure.

02

Types of AI Agents: Sub-agents, Skills, and Agent Teams

Claude Code offers three levels for building AI agents, each solving a different problem.

Sub-agents

A separate Claude instance that the main agent invokes for a specific task. It operates with its own isolated context: it does not “contaminate” the main agent's context. When done, it returns the result and closes.

When to use: when the agent needs to perform a specific task requiring research or processing without losing focus on the main task.

Skills

SKILL.md files that provide specialized instructions to the agent. They are not executable code — they are “specialized knowledge” that the agent loads when needed.

When to use: for recurring tasks with a defined pattern. If your team generates a weekly report with the same format, that process is a Skill.

Agent Teams

Multiple Claude Code instances working in parallel on the same codebase, coordinated by an orchestrator. This is the heavy artillery — for massive tasks that can be parallelized.

When to use: when the task is so large that a single agent would take too long. Refactoring 50 files, auditing a 200-page site, or migrating an entire codebase.

FeatureSub-agentsSkillsAgent Teams
What it isSeparate Claude instanceInstruction file (.md)Multiple Claudes in parallel
ContextIsolated (not shared with main)Shared (loaded into current agent)Isolated per agent, coordinated
Best forSpecialized one-off tasksRecurring tasks with defined patternsMassive parallelizable tasks
Setup complexityMediumLowHigh
Concrete exampleResearch the top 10 Google results for a keywordGenerate a content brief using a templateAudit 200 site pages in parallel

How we use it at Duotach: in our SEO agent system, we combine all three levels. We have 14 specialized Skills (keyword research, SERP analysis, content writing, schema generation, and more), we use sub-agents for isolated research tasks that should not contaminate the main context, and we have Agent Teams capability for running massive audits when a client has hundreds of pages.

03

How Claude Code Creates AI Agents: The Architecture

The agent architecture in Claude Code follows a clear pattern. At the center is the CLAUDE.md file — the brain of the system.

The Agent Flow

1

Receives an instruction — in natural language, can be vague or specific.

2

Reasons — uses Extended Thinking (up to 128K reasoning tokens) to analyze the task.

3

Plans steps — breaks the task into concrete, sequential actions.

4

Executes actions — reads files, writes code, runs commands, searches the web.

5

Evaluates results — verifies if the output meets the objective.

6

Iterates or finishes — if something failed, corrects and retries. If everything is good, delivers the result.

Available Tools for Agents

File read and writeCan read any project file and create or modify files
Bash command executionRuns any terminal command: builds, tests, scripts, deployments
Web searchWebSearch and WebFetch for finding up-to-date information on the internet
Code editingEdits multiple files simultaneously with precision
MCP ServersConnects with Google Search Console, Slack, databases, and more

Project Structure with Agents

CLAUDE.md (global system instructions)
    |
    +--> .claude/skills/
    |       +--> skill-1/ (SKILL.md + references/ + assets/)
    |       +--> skill-2/
    |       +--> skill-n/
    |
    +--> Sub-agent A (isolated task with own context)
    +--> Sub-agent B (isolated task with own context)
    |
    +--> MCP Server 1 (Google Search Console)
    +--> MCP Server 2 (Slack, Drive, etc.)

The CLAUDE.md defines global rules. Skills within .claude/skills/ define specialized behaviors. Sub-agents are invoked dynamically. And MCP Servers connect everything to the outside world. Hooks allow configuring automatic actions before or after certain agent operations — for example, running a linter after each code edit.

More information about the complete architecture in the official Claude Code documentation.

04

Anthropic's Agent SDK: Programmatic AI Agents

The Agent SDK is a framework for creating programmatic AI agents that integrate directly into applications and automated workflows, without needing to use the Claude Code terminal.

Claude Code Direct

For software development, internal automation, projects where a human supervises. This is what you use when you want an agent to help you work.

Agent SDK

For creating agents that live inside your client's app. A chatbot embedded in a SaaS, an automatic processing pipeline running without supervision, a customer service agent integrated into WhatsApp.

Agent SDK Components

1
Client

The connection with the Anthropic API.

2
Tools

The tools the agent can use (custom functions, APIs, databases).

3
Guardrails

Security rules that limit what the agent can do.

4
Handoffs

Context transfer between specialized agents.

5
Tracing

Detailed tracking of each action for debugging and auditing.

Complete documentation of the Anthropic Agent SDK.

How we use it at Duotach: for clients who need AI agents integrated into their own platforms — for example, a customer service agent embedded in a SaaS — we use the Agent SDK. For internal automation and Claude Code development projects, we use Claude Code directly. Most service businesses start with Claude Code and evaluate the Agent SDK when they need to scale.

05

MCP Servers: Connecting AI Agents to the Real World

MCP (Model Context Protocol) is an open protocol by Anthropic that connects AI agents with external tools. Think of it as USB ports for your agent — each MCP Server is a “port” connecting the agent to a real-world tool.

MCP ServerBusiness Use Case
Google Search ConsoleAutomatically monitor SEO rankings and generate reports
SlackSend automatic reports to the team, task notifications
Google DriveRead and create documents, share outputs with clients
PostgreSQL / MySQLQuery production data for analysis and reports
GitHubManage PRs, code reviews, automate deployments
Brave SearchEnriched web searches for market research

Custom MCP Servers

For companies with proprietary tools, you can create an MCP Server that connects the agent to any internal API. The process: define the tools the server exposes, implement the handlers for each tool, and configure the connection in the Claude Code project.

For custom MCP Server implementations, you can contact us and we will design the integration to your needs.

Our Experience with MCP

The combination of AI agents with MCP Servers transforms Claude Code from a development tool into a complete enterprise automation platform. At Duotach, we use MCP Servers to connect our SEO agent system with Google Search Console, allowing us to monitor rankings and generate automatic reports for each client.

06

Real Case Study: Our 16 AI Agent System for SEO

This is not a hypothetical example. It is the system we use in production every day at Duotach to deliver SEO, GEO, and AEO services for multiple clients.

The Problem We Solved

We needed to scale SEO services for multiple clients without multiplying the team. The manual professional SEO workflow — keyword research, SERP analysis, content briefs, optimized writing, schema markup, reports — easily takes 40+ hours per week per client. With 3-5 active clients, that is unsustainable for a small team.

The Solution: 14 Skills in 6 Automated Phases

Phase 1
Onboarding

Client setup with config.json and brand voice.

Phase 2
Audit

Technical SEO audit, schema generation, competitor analysis.

Phase 3
Strategy

Keyword research, SERP analysis, content brief creation.

Phase 4
Production

Article writing, GEO optimization, conversion to Next.js components.

Phase 5
Monitoring

Search Console reports, GA4 analysis, Google Business Profile management.

Phase 6
Authority

Link building, digital PR, local citations.

MetricBefore (manual)With AI agentsImprovement
Time per content brief + article8 hours1 hour87% faster
New client setup4 hours30 minutes87% faster
Technical SEO audit6 hours1 hour83% faster
Monthly API costsVariable$0 (free tools)100% savings

The system runs with $0 in paid APIs because it leverages Claude Code's native tools: WebSearch for searches, WebFetch for page analysis, and file tools for generating all content. Each new client is configured in minutes with a config.json and a brand-voice.md.

And a fact that speaks for itself: the Duotach website — duotach.com — was built entirely with Claude Code. Next.js 14, TypeScript, Tailwind CSS, 10+ schema markup types, blog articles, case studies, service pages. Everything.

Read the full SEO agent system case study
07

AI Agents for Business Automation: Beyond Code

AI agents with Claude Code are not just for programmers. They can automate processes for any service business — you do not need to be a tech company.

IndustryUse CaseManual TimeWith AgentSavings
Digital marketingWeekly campaign reports4 hours/week15 minutes93%
SEO / ContentContent brief + optimized article8 hours1 hour87%
E-commerceOptimize 100 product listings40 hours3 hours92%
ConsultingDocument analysis + executive summary3 hours20 minutes89%

Claude Code + N8N

For end-to-end automation (where the agent runs automatically without anyone activating it), the winning combination is Claude Code for intelligent processing + N8N for workflow automation. N8N detects an event (new email, new invoice, end of week), activates the agent, and distributes the output where it belongs.

Estimated ROI

If an agent saves you 20 hours per week of manual work, and the hourly cost is $25-50 USD, you are saving $2,000-4,000 USD/month. With a cost of $100-200/month for Claude Code, the ROI is 10x to 40x — and it pays for itself from the first month.

08

Claude Code vs LangChain vs CrewAI vs AutoGen

If you are evaluating platforms for building AI agents, here are the real differences between the four main options.

CriterionClaude CodeLangChainCrewAIAutoGen
LanguageTerminal (any language)PythonPythonPython
Initial setup2 minutes (npm install)30+ minutes (env, deps)15 minutes30+ minutes
Learning curveLow (natural language)High (complex API)MediumHigh
Parallel agentsYes (Agent Teams)ManualYes (Crews)Yes
External toolsMCP Servers (plug & play)Tools (custom code)Tools (custom code)Tools (custom code)
Ideal forDevelopment + automationCustom LLM appsPredefined teamsResearch & prototypes
Total cost$20-200/month (all-inclusive)Free + API costsFree + API costsFree + API costs

Our position at Duotach: we use Claude Code as our primary tool because it allows creating functional agents in minutes, not days. For projects that require custom integration into client apps, we evaluate LangChain or Anthropic's Agent SDK on a case-by-case basis. In our experience, 80% of service businesses solve everything they need with Claude Code directly — they do not need the complexity of additional frameworks.

09

Step by Step: How to Build Your First AI Agent with Claude Code

A practical guide to building your first functional agent. No prior AI experience required.

1

Install Claude Code

Open your terminal and run:

npm install -g @anthropic-ai/claude-code

You need Node.js 18+ installed. Installation takes less than 1 minute. Then run claude to sign in with your Anthropic account.

2

Create the project structure

Create a folder for your project and an initial CLAUDE.md file:

mkdir my-first-agent
cd my-first-agent
touch CLAUDE.md
3

Define the agent's objective in CLAUDE.md

Write clear instructions. Be specific about what the agent should do, what context it has, and what constraints apply:

# My Reporting Agent

## Context
This agent generates weekly marketing metrics reports.

## Instructions
- Read data from metrics.csv
- Calculate week-over-week variations
- Generate report in Markdown format with tables and conclusions
- Save in reports/ with date in the filename

## Constraints
- Do not invent data. Only use data from the CSV.
- Always include comparison with previous week.
4

Create your first Skill

Create the skills folder and a basic skill:

mkdir -p .claude/skills/generate-report
5

Test the agent with a simple task

Run Claude Code in the project folder:

claude

Ask it for a concrete task: “Generate a report with the data from metrics.csv using the reporting skill.” Watch how it plans, executes, and delivers the result.

6

Iterate: add more skills, refine instructions, connect MCP Servers

Add more skills for other recurring business tasks.

Refine instructions in CLAUDE.md and each skill based on results.

Connect MCP Servers so the agent can read data from Google Sheets, send Slack messages, or query your database.

7

Scale with sub-agents

When a task requires research or processing that should not mix with the main context, create sub-agents. The main agent delegates the task, the sub-agent solves it with its isolated context, and returns a clean result.

Total estimated time for a basic functional agent: 2-4 hours. For a complete system with multiple skills and sub-agents: 20-40 hours of configuration and testing.

If you prefer to have an experienced team configure your agents, at Duotach we offer Claude Code development for businesses that want fast results without the learning curve.

10

How Much Does It Cost to Implement AI Agents with Claude Code

Real costs, no fine print. Transparent pricing for every plan.

PlanPrice USD/monthUsage includedIdeal for
Free$0LimitedTesting the tool
Pro$20Moderate usePersonal use, 1 simple agent
Max 5x$1005x capacitySmall business, 5-10 skills
Max 20x$20020x capacityIntensive use, complete agent system
Implementation typeMonthly costInitial setupExpected ROI
Basic agent (1 skill, personal use)$20/month (Pro)2-4 hoursImmediate
Agent system (5-10 skills, business)$100-200/month (Max)20-40 hours1-2 months
Custom agents via Agent SDK$50-500/month (API)40-80 hours2-3 months
Full implementation with consultancy$100-200/month + feeIncluded in fee1-3 months

The Key Takeaway

With $200/month of Claude Code Max, a company can have an agent system that automates 40+ hours of manual work per week. If those hours cost $25-50 USD each, you are paying $200 to save $4,000-8,000 per month.

11

Security and Privacy: AI Agents with Business Data

One of the most common questions from companies evaluating AI agents is about data security.

How Claude Code Handles Your Data

Anthropic has a clear policy: it does not train its models on Claude Code user data. Your code, your documents, your clients' data — none of it is used to train the model. This is an important difference compared to tools that do use user data to improve their models.

Permissions and Sandboxing

Claude Code operates in your local terminal. It only accesses files and folders you explicitly allow. You can configure granular permissions to limit which directories it can access, which commands it can execute, and which external tools it can use.

Security Best Practices for AI Agents

1

Keep .env files and credentials outside the agent context. Add .env to .gitignore and never include them in folders the agent reads.

2

Configure granular permissions. If the agent only needs to read data, do not give it write permissions in production.

3

Review output before running in production. Agents are powerful but not infallible — review before deploying.

4

Use separate config files per environment. Development, staging, production — each with its own credentials and permissions.

5

Implement logging and auditing. Record what actions each agent took, when, and on what data.

For companies with strict compliance requirements or regulated sensitive data (healthcare, finance), Anthropic offers enterprise options with additional security and data retention controls.

Conclusion

AI agents with Claude Code are not science fiction or a future promise — they are productive tools that companies like Duotach already use every day to deliver real results for real clients. In 2026, 51% of companies already have agents in production. The question is not whether to implement AI agents, but when.

What we covered in this guide: the three levels of agents (Sub-agents, Skills, Agent Teams), the Agent SDK for programmatic integrations, MCP Servers for connecting to the real world, comparisons with LangChain/CrewAI/AutoGen, real costs, and a step-by-step guide to building your first agent. All from the experience of a consultancy that builds and maintains them for clients.

Frequently Asked Questions

What are AI agents in Claude Code?+
AI agents in Claude Code are autonomous systems that plan, execute, and complete complex tasks using tools. Unlike a chatbot that only answers questions, an agent can create files, run terminal commands, search the web, and coordinate multiple instances working in parallel to accomplish complete objectives.
What is the difference between sub-agents, Skills, and Agent Teams?+
Sub-agents are isolated Claude instances for specific tasks that should not contaminate the main context. Skills are reusable specialized instruction files the agent loads when needed. Agent Teams are multiple agents working in parallel on the same project, coordinated by an orchestrator. All three levels can be combined in a single system.
How much does it cost to build AI agents with Claude Code?+
Starting at $20/month with the Pro plan for personal use, up to $200/month with Max 20x for intensive enterprise use. The Agent SDK charges per tokens consumed, typically $50-500/month depending on usage.
Can you build AI agents without knowing how to code?+
Yes, partially. Claude Code lets you create Skills and configure agents using natural language in Markdown files. For basic agents — reports, data analysis, content generation — no coding required. For advanced integrations with custom APIs or Agent SDK implementations, technical expertise is needed.
Is Claude Code safe to use with business data?+
Yes. Anthropic does not train its models on user data. Claude Code operates in your local terminal and only accesses files and folders you explicitly allow. For sensitive data, granular permissions can be configured, and Anthropic offers enterprise options with additional security controls.
How do you build an AI agent step by step?+
Install Claude Code with `npm install -g @anthropic-ai/claude-code`, create a CLAUDE.md with agent instructions, define specialized Skills in .claude/skills/, test with simple tasks, iterate by refining instructions, and scale with sub-agents for tasks needing isolated context. A basic agent takes 2-4 hours to configure.
What business tasks can AI agents automate?+
Automated marketing and sales reports, data analysis, SEO-optimized content generation, website audits, e-commerce product optimization, document classification, competitor analysis, and any repetitive information-processing task. Typical time savings are 85-93% versus manual work.
How many agents can run in parallel?+
With Agent Teams there is no hard limit, but Anthropic recommends 5-16 parallel agents for optimal results. Performance depends on task complexity and your subscription plan. The Max 20x plan provides sufficient capacity for complete enterprise systems.
What is MCP and how does it connect with agents?+
MCP (Model Context Protocol) is an open protocol by Anthropic that connects AI agents with external tools: Google Search Console, Slack, databases, GitHub, Google Drive, and any API. It works as a standardized bridge between the agent and the real world.
Which is better for AI agents: Claude Code, LangChain, or CrewAI?+
It depends on the use case. Claude Code is ideal for development and business automation with minimal setup. LangChain is better for custom apps with complex integrations. CrewAI works well for predefined agent teams. For most service businesses, Claude Code offers the best cost-benefit ratio.
What is the ROI of implementing AI agents?+
Typically, an AI agent system pays for itself in 1-2 months. Our SEO agent system automates 40+ hours/week of manual work at $200/month. If those hours cost $30/hour, monthly savings are $4,800 versus $200 in cost — a 24x ROI from month one.