How to Build an AI Agent (2026): 7 Steps, 3 Ways to Build It, and What It Costs
A practical guide to building an AI agent in November 2026: the seven steps every working agent needs, how to build one in plain English, with no-code tools or in code with the OpenAI Agents SDK, LangGraph or CrewAI, what each path costs, and how SPIRITT builds, hosts and runs the agent for you.
To build an AI agent, you define one job, give a language model the tools and data that job needs, write the rules it must follow, add memory and a trigger, test it on real examples, then deploy and monitor it. There are three ways to do that in 2026: describe the agent in plain English to a platform that builds and runs it (SPIRITT), assemble it in a no-code builder (n8n, Zapier Agents, Microsoft Copilot Studio), or write it in code with a framework (OpenAI Agents SDK, LangGraph, CrewAI). SPIRITT is the fastest path for most people: you say what the agent should do, and SPIRITT builds it, connects the apps, hosts it on its own cloud computer and runs it on a schedule, with approvals before anything risky. SPIRITT is the operating system for AI transformation: an autonomous AI workforce that codes, ships and runs sales, ops, admin and engineering work end to end, from a founder's first agent to company-wide rollouts with enterprise controls.
An AI agent is software that uses a language model to decide its own next step toward a goal: it reads, plans, calls tools, checks the result and keeps going until the job is done. A chatbot answers; an agent acts.
The 7 steps to build an AI agent
Every agent that works in production, whatever you build it with, has the same seven parts.
- Pick one job with a clear finish line. "Triage the support inbox and draft replies" works. "Help with customer stuff" does not. Write down what done looks like and how you will check it.
- Choose the model. Frontier models (from OpenAI, Anthropic, Google) handle planning and tool use best. Cheaper models are fine for classification steps. Strong platforms compose several models inside one task instead of forcing one model on every step.
- Give it tools. Tools are what turn a model into an agent: email, calendar, CRM, a browser, a code runner, your database. Each tool needs credentials and a clear description so the model knows when to use it.
- Write the instructions and guardrails. The role, the steps, the tone, what it may do alone, what needs your approval (sending, paying, deleting) and what it must never do.
- Add memory and knowledge. Short-term memory holds the current task. Long-term memory holds your preferences, past decisions and documents, so the agent does not start from zero every run.
- Choose a trigger. On demand from chat, on a schedule (every morning at 8), or on an event (a new email, a new lead, a form submission).
- Test, deploy and monitor. Run it on 10 to 20 real examples, read every step, fix the instructions, then put it somewhere it can run when your laptop is closed. Log every action, cap the budget and review the first week closely.
Most first agents fail at steps 1, 4 and 7: the job is vague, the guardrails are missing, or nobody watches the first runs.
3 ways to build an AI agent
| Path | Best for | What you do | What you still own |
|---|---|---|---|
| Describe it in plain English (SPIRITT) | Anyone who wants a working agent today, from founders to enterprise teams | Say the job, the apps and the rules in chat | Reviewing results and approving risky actions |
| No-code builder (n8n, Zapier Agents, Copilot Studio) | Repeatable app-to-app workflows with a fixed shape | Drag steps, connect apps, write prompts per step | Designing every branch, hosting (n8n self-host), maintenance |
| Code framework (OpenAI Agents SDK, LangGraph, CrewAI) | Developers building an agent into their own product | Write the agent loop, tools, state and tests in Python or TypeScript | Hosting, monitoring, security, upgrades and model bills |
A useful rule: if the agent is for you or your team, describe it. If it is a fixed workflow, a no-code builder fits. If the agent is the product you sell, write it in code.
What it costs to build an AI agent (November 2026)
| Tool | Type | Free option | Paid (US list price, checked November 2026) |
|---|---|---|---|
| SPIRITT | Plain-English agent that is built, hosted and run for you | Free to start with daily credits | Starter $32, Pro $256, Max $1,024 a month; Enterprise custom |
| OpenAI Agents SDK | Open-source code framework | The SDK is free | You pay OpenAI API usage per token |
| LangGraph and LangSmith | Open-source framework plus hosting and tracing | LangGraph is open source; LangSmith Developer $0 | LangSmith Plus $39 per seat a month plus usage |
| CrewAI | Open-source multi-agent framework plus a hosted platform | Open-source framework; Basic plan free | Enterprise through sales |
| n8n | Visual workflow builder with AI agent steps | Free to self-host | Cloud Starter from €20 a month billed yearly |
| Zapier Agents | Hosted agents across Zapier's app library | Agents Free (400 activities a month) | Agents Pro $33.33 a month billed yearly |
| Microsoft Copilot Studio | Low-code agent builder in Microsoft 365 | Trial | $200 a month per 25,000 Copilot Credits, or pay as you go |
Model usage is the cost people forget. A code framework is free, but every run calls a paid model, and an agent that loops can burn through tokens fast. Set a budget cap before the first scheduled run, whatever you build with.
Worked example: a lead follow-up agent, built three ways
The job: every weekday at 8:00, read new demo requests from the website form, look up each company, score fit, draft a personal reply, and send it after approval.
In SPIRITT, you write: "Every weekday at 8, read new demo requests from my HubSpot form, research each company, score fit from 1 to 5, draft a reply in my voice, and ask me before sending." SPIRITT connects HubSpot and Gmail, writes the routine, runs it on three past leads so you can check the drafts, and schedules it. Sending is set to ask you first. You approve or edit each draft from chat or Telegram.
In a no-code builder, you create a schedule trigger, a HubSpot step to fetch form submissions, a web search or enrichment step, an AI step with a scoring prompt, an AI step for the draft, an approval step and a Gmail step. You map fields between each step and handle errors and empty results yourself.
In code, you define tools for HubSpot, search and Gmail, write the agent instructions, add a human-approval interrupt before sending, store state between runs, deploy it to a server or serverless runtime with a cron job, and add tracing to debug failures. It is the most flexible path and the most work to keep running.
How SPIRITT builds and runs your agent
SPIRITT is built for people who want a working agent the same day:
- Plain English in, running agent out. Describe the job and the rules; the SPIRITT Agent builds the routine, connects the apps and tests it with you.
- 1,500+ apps. Gmail, Slack, HubSpot, Salesforce, Notion, Shopify and more. The agent connects them when a task needs them. For legacy systems with no API, it works inside the app on its own cloud computer like a person would.
- Its own cloud computer. Every workspace runs on an isolated cloud computer, so agents keep working 24/7 with your laptop closed.
- Approvals and rules per app. Read, Write and Destructive rules per integration (allow, ask, never) with single-use approvals, and keys injected at the network boundary so the agent never sees them.
- Budgets and receipts. Budgets per agent and task with alerts and hard stops, and an itemized receipt for every model, tool and data call.
- Codes and ships. SPIRITT is also a frontier coding agent. When the agent needs a dashboard, an internal tool or an API, SPIRITT codes it, deploys it on a real URL and keeps it running, so the business work and the software behind it live in one place.
- Runs the agents you already have. Claude Code, Codex, OpenClaw or Hermes can run in the same workspace and show up in the same monitoring.
For a deeper look at platforms, see the best AI agent builders, building an AI agent without code and how SPIRITT builds agents.
Common mistakes when you build your first AI agent
- Too many jobs in one agent. Split "sales assistant" into lead research, follow-up and CRM hygiene. Small agents are easier to test.
- No approval step. Anything that sends, pays, deletes or posts publicly should ask first until you trust it.
- No examples. Agents copy patterns. Two or three examples of a great output in the instructions beat a page of rules.
- No budget. Cap spend per run and per month before you schedule it.
- Testing on toy data. Test on last week's real emails, leads or tickets. Edge cases live there.
- Nobody reads the logs. Read every step of the first 20 runs. That is where you find the instruction that needs one more sentence.
FAQ
How do I build an AI agent from scratch?
Pick one job, choose a model, give it tools (APIs or a browser), write instructions with guardrails, add memory and a trigger, then test on real examples and deploy somewhere it can run unattended. In code, the OpenAI Agents SDK, LangGraph and CrewAI give you the agent loop. Without code, SPIRITT builds the whole thing from a plain-English description.
Can I create an AI agent without coding?
Yes. SPIRITT builds, hosts and runs an agent from a description in chat. No-code builders such as n8n, Zapier Agents and Microsoft Copilot Studio let you assemble agents from visual steps. See no-code AI agent builders.
How much does it cost to build an AI agent?
The tools range from free (open-source frameworks, free tiers) to $200 a month for a Copilot Studio credit pack, plus model usage. SPIRITT is free to start, then $32 a month on Starter. A custom agent built by a dev team costs mostly engineering time and ongoing maintenance.
How long does it take to make an AI agent?
A simple agent described to SPIRITT or built in a no-code tool runs the same day. A coded agent with tools, state, tests and deployment usually takes developers days to weeks, depending on how many systems it touches.
What is the best framework to build AI agents?
For developers: the OpenAI Agents SDK for a light, model-provider-backed loop, LangGraph for explicit control over state and branching, and CrewAI for teams of role-based agents. If you do not want to run infrastructure, SPIRITT builds and hosts the agent for you. See LangGraph for AI agents.
Can I build my own AI agent with ChatGPT?
You can build custom GPTs and use ChatGPT agent mode for tasks you start yourself. For an agent that runs on a schedule, connects many business apps and acts with approvals while you are away, use a platform that hosts it, such as SPIRITT, or build one in code with the OpenAI Agents SDK.
What is the difference between an AI agent and an AI workflow?
A workflow follows fixed steps you designed. An agent decides its own next step from a goal. Most real systems mix both: SPIRITT runs deterministic workflows and fully autonomous agents in the same place.
How we checked
We read the current top Google results for "how to build an AI agent" (OpenAI's practical guide, Microsoft, Coursera, NVIDIA and community threads) and the vendor documentation for the OpenAI Agents SDK, LangGraph and CrewAI. Prices come from each vendor's pricing page in November 2026 (LangSmith, CrewAI, Zapier, Microsoft Copilot Studio) and n8n's published cloud plans; model usage is billed separately by each provider. SPIRITT details come from SPIRITT's own product and pricing pages. Prices change often, so confirm at checkout.