How to Build an AI Agent in 2026: No Code and Code Paths
Seven steps that work whether you drag boxes in a no code builder or write Python, with the exact setup for the Claude Agent SDK and the OpenAI Agents SDK and what each path costs.
By , research by the BestBots team · Updated Oct 19, 2026
Fact checked against each company's published pricing, documentation and verified user ratings. How we score
To build an AI agent, pick one repeatable job, choose a model, give it two or three tools and clear rules, then test it on real examples before letting it act alone. Without code, use a builder like n8n, Make or Zapier. With code, the Claude Agent SDK or OpenAI Agents SDK gets a working agent running in about a dozen lines of Python.
n8n4.3
Relevance AI3.9
OpenAI AgentKit4.0Pick your path
| No code builder | Code (SDK) | |
|---|---|---|
| Who it suits | Operators, marketers, founders | Developers |
| Tools | n8n, Make, Zapier, Gumloop, Relevance AI, Lindy | Claude Agent SDK, OpenAI Agents SDK |
| Time to first agent | An afternoon | An hour if you code |
| Cost to start | Free (n8n self hosted) to $29.99 a month | Free SDK plus API usage |
| Flexibility | Limited to the platform's nodes and integrations | Anything you can code |
| Hosting | The platform, or your server (n8n) | Your server, container or CI |
Both paths follow the same seven steps.
The seven steps
1. Pick one job with a clear finish line
Good first agents: "every morning, research new inbound leads and add a summary to the CRM," "draft replies to support emails about shipping," "find and fix failing tests." Bad first agents: "run my marketing." Write down what done looks like and what the agent must never do.
2. Choose the model
Use the model family you already pay for. Claude models are strong at long documents and code, OpenAI's at broad tool use, Gemini's inside Google's stack. Smaller, cheaper models handle routing and summaries; save the frontier model for the hard step. API prices per model are in each vendor's docs and our AI Price Index.
3. Give it tools
Tools are what turn a chatbot into an agent: web search, a browser, your email, a spreadsheet, a CRM, a file system, a shell. Start with two or three. Most builders and both SDKs support MCP (Model Context Protocol), a standard way to plug in tools and data sources without custom code for each.
4. Write instructions and guardrails
Instructions say what the agent is for, its tone and its steps. Guardrails limit what it can do: which tools run automatically, which need your approval, spending caps, and checks on inputs and outputs. Require approval for anything that sends, buys, posts or deletes.
5. Add memory only if needed
Sessions keep context within a task or across a conversation. Long term memory or retrieval over your documents comes later, once you see the agent missing facts it should know.
6. Test on real examples
Run it on 20 past cases where you know the right answer. Read every step it took. Fix the instructions, tools or guardrails, then run again. Both SDKs include tracing, and builders like n8n log every execution.
7. Deploy with a trigger and a log
Schedule it, trigger it from an event (a new email, form or ticket), or expose it in Slack or a chat widget. Keep the logs, and read them daily for the first two weeks.
Build an AI agent without code
The quickest no code route is an automation platform with an agent step:
- Pick a platform. n8n is free to self host and about $27 a month in the cloud for 2,500 executions. Make starts at $16 a month. Zapier starts at $29.99 a month and connects 9,000+ apps. Relevance AI starts at $29 with prebuilt sales agents.
- Add a trigger, such as a new row in a sheet, a new email or a webhook.
- Add an AI agent node. Choose the model, write the instructions and attach tools, for example a search tool, an HTTP request and your CRM.
- Add an approval step that sends you a Slack message or email before the agent's final action.
- Run it on test data, read the execution log, adjust, then switch it on.
If you would rather configure an assistant than build a workflow, Lindy handles email, calendar and meeting notes from $49.99 a month. For a side by side of builder platforms, see best AI agent builders and Relevance AI vs n8n.
Build an AI agent with Claude (Claude Agent SDK)
The Claude Agent SDK gives you the same agent loop, built in tools and context management that power Claude Code, in Python and TypeScript. Built in tools read, write and edit files, run commands and search the web, and you also get hooks, subagents, MCP, permissions and sessions.
Setup. Python 3.10+ or Node.js 18+, then:
pip install claude-agent-sdk # Python
npm install @anthropic-ai/claude-agent-sdk # TypeScript
export ANTHROPIC_API_KEY=your-api-key
A minimal agent that reviews a folder and fixes problems, auto approving only file reads and edits:
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions
async def main():
async for message in query(
prompt="Find bugs in utils.py that would crash it and fix them.",
options=ClaudeAgentOptions(
allowed_tools=["Read", "Edit", "Glob"],
permission_mode="acceptEdits",
),
):
print(message)
asyncio.run(main())
Add "WebSearch" or "Bash" to allowed_tools to let it search or run commands, set system_prompt for its role, and pass mcp_servers to connect databases and apps. The SDK also authenticates through Amazon Bedrock, Google Cloud and Microsoft Foundry with an environment variable.
Two rules from Anthropic's docs matter if you ship a product: you may not offer claude.ai login or Claude subscription rate limits to your users unless approved, so use API keys; and you may call your product "Powered by Claude" but not "Claude Code." If you would rather Anthropic host the agent loop, its Managed Agents service runs sessions in a managed or self hosted sandbox. Pricing is API usage; see our Claude Code review for the subscription side.
Build an AI agent with OpenAI (Agents SDK)
OpenAI's Agents SDK is a lightweight Python toolkit with five core pieces: agents (a model with instructions and tools running in a loop), handoffs (agents delegating to other agents), guardrails (input and output checks that run in parallel and fail fast), sessions (memory within a run) and tracing (step by step debugging).
Setup:
pip install openai-agents
export OPENAI_API_KEY=your-api-key
A minimal agent:
from agents import Agent, Runner
agent = Agent(
name="Lead researcher",
instructions="Summarize a company in three bullets for a sales rep.",
)
result = Runner.run_sync(agent, "Summarize Acme Corp's public website.")
print(result.final_output)
Give it function tools or hosted tools (web search, file search, code interpreter) to act, and add a second agent as a handoff for specialist steps. It uses the Responses API by default and supports other providers through LiteLLM and Any-LLM adapters.
Costs. No platform fee; models bill at API rates, for example $0.10 per million input tokens on gpt-6-luna and $2.00 on gpt-6.1-sol. Web search is $10 per 1,000 calls and file search $2.50 per 1,000. OpenAI's visual Agent Builder is deprecated and scheduled to shut down November 30, 2026, so build new projects on the SDK or the Agents API. Full rates in our OpenAI AgentKit review.
What it costs to run
| Setup | Monthly cost to start | What drives the bill |
|---|---|---|
| n8n self hosted | $0 plus a server | Model API usage |
| n8n cloud Starter | About $27 | 2,500 executions, then plan upgrades |
| Make | From $16 | Credits per operation |
| Zapier | From $29.99 | Tasks, Agents add on |
| Relevance AI Pro | $29 | 2,500 Actions plus Vendor Credits |
| Claude Agent SDK | $0 SDK | Claude API tokens and tools |
| OpenAI Agents SDK | $0 SDK | OpenAI API tokens and hosted tools |
Prices from each vendor's pricing page in October 2026. A light agent that runs a few hundred times a month often costs less than $20 in tokens; a browsing or coding agent that reads long pages costs much more, because every page it reads is input tokens.
Mistakes to avoid
- Too many tools. Each extra tool is another way to go wrong. Add tools one at a time.
- No approval step. Agents act fast; mistakes do too. Require approval for anything irreversible.
- Trusting what it reads. Web pages and emails can contain hidden instructions (prompt injection). Never let an agent follow instructions found in content it reads.
- No evaluation set. Without 20 known good examples, you cannot tell whether a change made the agent better.
- Building what you can buy. For phone answering, support chat or coding, a finished agent is usually cheaper than a custom build. Start with what is an AI agent and best AI agents.
Frequently asked questions
Can I build an AI agent without coding?
Yes. n8n, Make, Zapier, Gumloop and Relevance AI let you connect a model to your apps visually, add an agent step that chooses tools, and run it on a trigger. n8n is free if you self host it, Make starts at $16 a month and Relevance AI at $29.
How do I build an AI agent with Claude?
Install the Claude Agent SDK (pip install claude-agent-sdk or npm install @anthropic-ai/claude-agent-sdk), set ANTHROPIC_API_KEY, and call query() with a prompt and the tools the agent may use, such as Read, Edit, Bash or WebSearch. The SDK runs the same agent loop and tools that power Claude Code.
How do I build an AI agent with OpenAI?
Install the Agents SDK with pip install openai-agents, set OPENAI_API_KEY, create an Agent with a name, instructions and tools, and run it with Runner. Add handoffs to other agents, guardrails to check inputs and outputs, and sessions for memory.
How much does it cost to build an AI agent?
A prototype can cost almost nothing: SDKs are free and you pay API rates, for example $0.10 per million input tokens on OpenAI's gpt-6-luna. No code platforms charge $16 to $349 a month depending on volume. Hiring an agency to build a custom agent is quote only and usually far more.
Which is easier, the Claude Agent SDK or the OpenAI Agents SDK?
The Claude Agent SDK gives you more built in tools, such as file editing, shell commands and web search, so a working agent takes fewer lines. The OpenAI Agents SDK is lighter and model flexible, with adapters for other providers through LiteLLM and Any-LLM. Pick the one whose models you already use.
Can I use my Claude Pro subscription to power an agent I sell?
No. Anthropic says third party developers may not offer claude.ai login or rate limits in their products unless approved, including agents built on the Agent SDK. Use an API key, Amazon Bedrock, Google Cloud or Microsoft Foundry instead.
What is the most common mistake when building an agent?
Giving it too much at once: every tool, every account and a vague goal. Start with one job, two or three tools, approval before any action that sends, buys or deletes, and a log you read daily for the first two weeks.
Do I need a vector database or RAG?
Only if the agent must answer from a large set of your own documents. For most first agents, connecting the few files or apps it needs through tools or MCP is simpler. Add retrieval when the agent keeps missing information it should know.