How to Build an AI Agent (No-Code and Code)

How to build an AI agent with no-code tools or a code framework

Short answer: How to build an AI agent comes down to four moves: pick one narrow job, choose a route, give the agent the tools it needs and test it on real tasks before you trust it. The no-code route means using a ready-made agent you configure, such as Lindy. The code route means a framework such as the OpenAI Agents SDK, which installs with pip install openai-agents and runs a first agent in five lines of Python.

An agent is different from a chatbot because it plans its own steps and calls tools. Anthropic describes an agent as an application that completes a task by planning its own steps and calling tools that read files, run commands or edit code. If you want the plain definition first, our AI glossary covers the terms. This guide is the build path, and the AI agent frameworks page lists the options side by side.

Building an AI agent at a glance

Step 1 Pick one job with a clear finish line
Step 2 Choose a route: no-code or code
Step 3 Give the agent tools: apps, files, search
Step 4 Test on real tasks and add a human check
No-code route Configure a ready-made agent, no programming
Code route A framework such as LangGraph, CrewAI or an SDK
Skills needed for code Python or TypeScript basics and an API key
Cost to start The frameworks below are free; you pay your model provider

Step 1: Pick the job

Most failed agents were given a vague job. “Handle my business” is not a job. “Sort my inbox and draft replies to booking requests” is. Write the job as one sentence with three parts: what comes in, what the agent does and what a finished result looks like.

Start with work that is repetitive, has clear rules and can be checked quickly. Inbox triage, lead research, support answers and code review fit well. Work where one wrong action is costly, such as sending money, should keep a person in the loop for now.

Our job pages group agents by the task they do, so you can see whether someone has already built what you need. If a ready-made agent does the job, you may not need to build anything.

Step 2: Choose a route

There are two routes, and the choice depends on who will maintain the agent.

No-code Code
You write Instructions in plain language Python or TypeScript
Setup time Minutes to hours Hours to days
Control Limited to what the product offers Full: you own the loop and the data
Hosting The vendor hosts it You host it
Best for Personal and small-team tasks Products and custom workflows
Example Lindy OpenAI Agents SDK

The no-code route

A no-code agent is one you configure instead of program. You describe the job, connect your apps and set the rules. Lindy, for example, is an assistant you message on iMessage, Slack or email to handle inbox, calendar and app tasks. Browse more in our AI personal assistants picks and the full directory.

Choose no-code when the job is personal or internal, nobody on the team writes code and you can live with the limits the product sets. Check the pricing page of any no-code tool before you commit, since many bill by usage.

The code route

A framework gives you the loop, the tool calling and the state handling, so you write only the parts that are yours. These four are the ones most teams look at first:

Framework Language Best when
OpenAI Agents SDK Python, JavaScript You want a light setup with handoffs between agents
Claude Agent SDK Python, TypeScript The agent works with files, commands and code
CrewAI Python You want a team of role-based agents
LangGraph Python You need long-running, stateful agents with human review

All four are free to install. You pay your model provider for the tokens your agent uses. Our page on each one has the licence and the limits.

Step 3: Give the agent tools

A model on its own can only talk. Tools are what let it act: search the web, read a file, call an API, update a record. Frameworks turn a normal function into a tool, so the first tools you build are usually small.

The fastest way to add many tools at once is the Model Context Protocol. MCP is an open standard for connecting AI applications to external systems such as data sources, tools and workflows. Instead of writing a connector for every app, you point your agent at an MCP server. The Claude Agent SDK lists MCP among its built-in capabilities, and our MCP servers directory lists 100 servers by category. Good first picks are Filesystem MCP for local files, GitHub MCP Server for repositories and Playwright MCP for browser tasks.

Give the agent the fewest tools that do the job. Each extra tool is one more way for it to go wrong. Read-only tools are the safe place to start.

Step 4: Build a first agent in code

Here are the exact commands for two routes. Both need an API key from the model provider.

With the OpenAI Agents SDK

pip install openai-agents
export OPENAI_API_KEY=sk-...
from agents import Agent, Runner

agent = Agent(name="Assistant", instructions="You are a helpful assistant")

result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)

The SDK’s main pieces are agents, handoffs that let one agent delegate to another, guardrails that validate inputs and outputs, tools made from Python functions and built-in tracing for debugging. The OpenAI Agents SDK docs walk through each one.

With the Claude Agent SDK

You need Python 3.10+ or Node.js 18+ and an Anthropic API key.

pip install claude-agent-sdk
export ANTHROPIC_API_KEY=your-api-key

The SDK reads the key from the shell and does not load .env files on its own. Its query function runs the agent loop, and you choose which tools the agent may use, for example Read, Edit and Glob. The Agent SDK quickstart builds an agent that finds and fixes bugs in a file, which is a good first project.

With CrewAI or LangGraph

CrewAI needs Python 3.10 or newer and below 3.14. Its docs install it with uv and scaffold a project for you:

uv tool install crewai
crewai create crew <your_project_name>
crewai install
crewai run

CrewAI describes Crews as teams of agents that collaborate on tasks and Flows as event-driven workflows that manage state. LangGraph installs with pip install -U langgraph and is a low-level framework for long-running, stateful agents. It keeps state so a workflow can resume after a failure, and it lets a person inspect and change that state. Expect a steeper learning curve than the SDKs above.

Step 5: Test it before you trust it

Run the agent on ten real examples of the job, not on one easy demo. Read every step it took, not just the final answer. Frameworks help here: the OpenAI Agents SDK has built-in tracing, and LangGraph connects to LangSmith for the same purpose.

Then add limits:

  • Keep write actions behind an approval step until the agent has a clean record.
  • Set a cap on how many steps or how much spend one run can use.
  • Log what it did so you can answer “why did it do that” later.

What AI agents can’t do yet

An agent is only as reliable as its instructions and tools. It can misread a vague task, call the wrong tool or repeat a step. It does not know your business rules unless you write them down. Keep a person responsible for anything that touches customers, money or private data. If you are unsure where to begin, build the smallest version first: one job, one or two read-only tools and a person who reads every result. Widen the agent’s reach only after a week of clean runs, and write down each change so you can undo it. For picking tools more broadly, see our checklist for choosing AI tools.

FAQ

How do I build an AI agent with no code?

Pick a ready-made agent you configure in plain language, such as Lindy, connect your apps and describe the job in one sentence. Test it on real tasks and keep approvals on for any action that sends something out.

Which language should I use to build an AI agent?

Python has the widest support, since the OpenAI Agents SDK, the Claude Agent SDK, CrewAI and LangGraph all work with it. The first two also support JavaScript or TypeScript. Use the language your team already writes.

Are AI agent frameworks free?

The four frameworks in this guide are free to install. You pay your model provider for the tokens your agent uses. Check each vendor’s docs for the current terms before you ship a product.

What is the easiest way to give an agent tools?

Connect it to an MCP server. The Model Context Protocol is an open standard for linking AI applications to tools and data, so you reuse an existing server instead of writing your own connector.

Do I need an API key to build an AI agent?

For the code route, yes. The OpenAI Agents SDK reads OPENAI_API_KEY and the Claude Agent SDK reads ANTHROPIC_API_KEY. No-code products handle the model for you.

How long does it take to build an AI agent?

A no-code agent can run in under an hour. A first code agent from a framework quickstart runs in an afternoon. A reliable one takes longer, because most of the time goes into testing.

Ready to pick a framework? Our AI agent frameworks page compares them side by side, and the MCP servers directory has the tools to plug in once your agent is running.

How do I build an AI agent with no code?
Pick a ready-made agent you configure in plain language, such as Lindy, connect your apps and describe the job in one sentence. Test it on real tasks and keep approvals on for any action that sends something out.
Which language should I use to build an AI agent?
Python has the widest support, since the OpenAI Agents SDK, the Claude Agent SDK, CrewAI and LangGraph all work with it. The first two also support JavaScript or TypeScript. Use the language your team already writes.
Are AI agent frameworks free?
The four frameworks in this guide are free to install. You pay your model provider for the tokens your agent uses. Check each vendor’s docs for the current terms before you ship a product.
What is the easiest way to give an agent tools?
Connect it to an MCP server. The Model Context Protocol is an open standard for linking AI applications to tools and data, so you reuse an existing server instead of writing your own connector.
Do I need an API key to build an AI agent?
For the code route, yes. The OpenAI Agents SDK reads OPENAI_API_KEY and the Claude Agent SDK reads ANTHROPIC_API_KEY. No-code products handle the model for you.
How long does it take to build an AI agent?
A no-code agent can run in under an hour. A first code agent from a framework quickstart runs in an afternoon. A reliable one takes longer, because most of the time goes into testing.