---
title: "How to Run an AI Agent for $0 in 2026: Models, Search and Vector DB"
slug: "free-ai-agent-stack"
description: "A tool-calling AI agent on free tiers only: which free LLM APIs accept tools, free web search and vector databases, a free host, and a config to copy."
published: "2026-10-26"
updated: "2026-10-26"
verifiedAt: "2026-10-26"
canonical: "https://aifree.dev/learn/free-ai-agent-stack"
---

# How to Run an AI Agent for $0 in 2026: Models, Search and Vector DB

> A tool-calling AI agent on free tiers only: which free LLM APIs accept tools, free web search and vector databases, a free host, and a config to copy.

- Time: 30 minutes
- You need: An account and API key with each provider; none of the offers in this guide asks for a card for the free part; Python 3 with the openai package (or any OpenAI-compatible client); Optional: pip install "litellm[proxy]" to put every model behind one endpoint with fallbacks
- Last checked: 2026-10-26

An agent is a loop: the model reads the task, asks for a tool (search the web, look something up in your notes, call an API), your code runs the tool and sends the result back, and the model decides the next step until it can answer. Every piece of that loop has a free tier: an LLM API that accepts tools, a search API, a vector database for memory, and a host. The [tool-calling agent stack](https://aifree.dev/stack/agent) picks one of each from our catalog and exports a ready-to-run config; this guide explains the choices and the limits you will hit.

Every number below comes from the linked offer page; OpenRouter's model list was re-checked on 2026-10-26.

## The free agent stack at a glance

| Piece | Free pick | Free part | Card |
| --- | --- | --- | --- |
| LLM with tool calling | [OpenRouter :free models](https://aifree.dev/offer/openrouter-free-models) | 20 requests a minute, 50 a day (1,000 a day after you have bought 10 credits) | No |
| Second LLM (fallback) | [Requesty free models](https://aifree.dev/offer/requesty-free-models) | 200 requests a day on 13 models priced at $0 | No |
| Web search | [Exa](https://aifree.dev/offer/exa-free-credits) | $10 credit every month (about 2,500 Lite searches) | No |
| Memory (vectors) | [Qdrant Cloud](https://aifree.dev/offer/qdrant-cloud-free-tier) | 1 cluster: 1 GB RAM, 4 GB disk, about 1M vectors at 768 dimensions | No |
| Host | [Cloudflare Workers](https://aifree.dev/offer/cloudflare-workers-free-plan) | 100,000 requests a day | No |

## 1. A free LLM that accepts tools

The model has to support tool calling (also called function calling): you send a list of tools with a JSON schema each, and it answers with a tool name and arguments instead of text. How that works: [how does it call a function it can't run?](https://aifree.dev/explain/tool-calling)

| Offer | Tool-calling models | Limits | Note |
| --- | --- | --- | --- |
| [OpenRouter](https://aifree.dev/offer/openrouter-free-models) | 16 of its 17 `:free` chat models accept tools on 2026-10-26 (all but the content-safety classifier), e.g. `nvidia/nemotron-3-super-120b-a12b:free` | 20 requests a minute; 50 a day, or 1,000 a day once you have bought 10 credits | Some free endpoints may train on your prompts |
| [Requesty](https://aifree.dev/offer/requesty-free-models) | Nemotron, Gemma 4 and other models at $0 | 200 requests a day | OpenAI-compatible router |
| [Routeway](https://aifree.dev/offer/routeway-free-models) | `:free` models such as `deepseek-v4-flash:free` | 200 requests a day, 20 a minute, one request at a time | Shared low-priority queue |
| [NVIDIA NIM](https://aifree.dev/offer/nvidia-nim-free-inference) | Catalog models tagged "Free Endpoint", e.g. `deepseek-v4.1-flash` | NVIDIA's forums report 40 requests a minute | Prototyping only |

**Count model calls, not tasks.** Each step of the loop is one request: a task that searches twice, reads a page and answers is about 4 or 5 calls. At OpenRouter's 50 requests a day that is roughly 10 such tasks; with Requesty and Routeway as fallbacks (200 a day each) about 90 (our arithmetic). Every limit you hit comes back as a 429: [why does the free tier say 429?](https://aifree.dev/explain/rate-limits)

Minimal agent loop with the OpenAI SDK against OpenRouter:

```python
# pip install openai
import json, os
from openai import OpenAI

client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
MODEL = "nvidia/nemotron-3-super-120b-a12b:free"
tools = [{"type": "function", "function": {
    "name": "search", "description": "Search the web",
    "parameters": {"type": "object", "properties": {"query": {"type": "string"}}, "required": ["query"]}}}]

def search(query):
    return "results for " + query  # call Exa, Firecrawl or Serper here

messages = [{"role": "user", "content": "What changed in the latest Python release?"}]
for _ in range(5):  # cap the steps: every step is a request
    reply = client.chat.completions.create(model=MODEL, messages=messages, tools=tools).choices[0].message
    messages.append(reply)
    if not reply.tool_calls:
        print(reply.content)
        break
    for call in reply.tool_calls:
        result = search(**json.loads(call.function.arguments))
        messages.append({"role": "tool", "tool_call_id": call.id, "content": result})
```

## 2. Free web search

| Offer | Free part | What it buys | Resets |
| --- | --- | --- | --- |
| [Exa](https://aifree.dev/offer/exa-free-credits) | $10 credit a month plus a one-time $10 onboarding bonus | About 2,500 Lite searches a month ($4 per 1,000) | Monthly, on the 1st |
| [Firecrawl](https://aifree.dev/offer/firecrawl-free-plan) | 1,000 credits a month | About 500 searches (2 credits per 10 results), less if you also scrape the pages | Monthly; no roll-over |
| [Serper](https://aifree.dev/offer/serper-free-queries) | 2,500 Google search queries | 2,500 searches; only successful responses are charged | Never; one-time |
| [Jina](https://aifree.dev/offer/jina-ai-free-api-tokens) | 10M tokens per new API key, shared with Jina's other APIs | Up to about 1,000 searches (each costs from 10,000 tokens) | Never; one-time |

A search tool hands the model text it did not write, and a page can contain instructions aimed at your agent. Treat tool results as data, never as orders: [why can a web page hijack my AI agent?](https://aifree.dev/explain/prompt-injection) The [free web search API guide](https://aifree.dev/learn/free-web-search-api) compares these in detail.

## 3. Memory: a free vector database

Long-term memory for an agent is usually a vector store: you save notes or document chunks as embeddings and look up the closest ones before each step ([why does it find "car" when I searched "automobile"?](https://aifree.dev/explain/semantic-search)).

| Database | Free capacity | Request limit | The catch |
| --- | --- | --- | --- |
| [Qdrant Cloud](https://aifree.dev/offer/qdrant-cloud-free-tier) | 1 cluster: 0.5 vCPU, 1 GB RAM, 4 GB disk; about 1M vectors at 768 dimensions | No published cap | Suspended after 1 week unused, deleted after 4 weeks of inactivity |
| [Upstash Vector](https://aifree.dev/offer/upstash-vector-free-tier) | 1 database, 200M vectors x dimensions, 1 GB data | 10,000 queries and updates a day | Max 1,536 dimensions |
| [Supabase](https://aifree.dev/offer/supabase-free-plan) (Postgres + pgvector) | 2 projects, 500 MB database each | No published cap | Paused after 1 week of inactivity |

Free embeddings to fill it: [Jina](https://aifree.dev/offer/jina-ai-free-api-tokens) (the same 10M tokens, 100 requests a minute on embeddings) or the models in the [free embeddings API guide](https://aifree.dev/learn/free-embeddings-api). More databases: [free vector databases](https://aifree.dev/learn/free-vector-database).

## 4. A free host

| Host | Free part | The catch |
| --- | --- | --- |
| [Cloudflare Workers](https://aifree.dev/offer/cloudflare-workers-free-plan) | 100,000 requests a day | 10 ms CPU time per invocation; limits reset at 00:00 UTC |
| [Deno Deploy](https://aifree.dev/offer/deno-deploy-free-plan) | 1M requests and 10 hours of active CPU a month | 10 active apps, logs kept 1 day |

## Use the exported config

Open [/stack/agent](https://aifree.dev/stack/agent), set your country if you want only offers available there, and replace any pick you don't like. The **[Use this stack](https://aifree.dev/stack/agent#use-this-stack)** block then gives three files built from the LLM picks that have a public API base URL in our catalog:

- **config.yaml** for a LiteLLM proxy: one OpenAI-compatible endpoint at `http://localhost:4000`; a 429 on the first free tier goes straight to the next one.
- **.env.example** with one key per provider.
- **chat.py**: the same fallback with the OpenAI SDK and no proxy. Add `tools=` and the loop above to turn it into an agent.

A pick without a recorded base URL is listed as "no public base URL yet"; use its offer page for the endpoint.

## Limits and the catch

- **Free models change.** OpenRouter's free list changes every few weeks; keep two providers in your fallback list and check that the model still accepts tools.
- **Small daily caps.** 50 requests a day is enough to build and test an agent, not to run it for users. Cap the number of steps per task.
- **Your prompts may be used.** Some free endpoints train on what you send; keep secrets and personal data out, and read each offer's data note.
- **Cold storage.** Qdrant and Supabase pause idle free projects after a week; a weekly ping or a cron job keeps them awake.
- **What an agent is and isn't:** [what's an "agent"?](https://aifree.dev/explain/agents-and-mcp)

## Offers in this guide

- [OpenRouter Free AI Models](https://aifree.dev/offer/openrouter-free-models.md): 50 requests/day, no card. Free :free chat, embedding and rerank models at $0 through OpenRouter's API
- [Requesty Free Models](https://aifree.dev/offer/requesty-free-models.md): 200 requests/day, no card. 13 free LLMs at $0 with 200 requests a day via Requesty's gateway
- [Routeway Free Models](https://aifree.dev/offer/routeway-free-models.md): 200 requests/day, no card. Free access to select open-weight LLMs at $0.00 per token, 200 requests/day
- [NVIDIA NIM Free Inference Endpoints](https://aifree.dev/offer/nvidia-nim-free-inference.md): Free tier, no card. Free NVIDIA NIM inference endpoints to test leading AI models
- [Exa Free Credits](https://aifree.dev/offer/exa-free-credits.md): $20, no card. $10 free API credits on signup + $10 onboarding bonus, $10 monthly reset
- [Firecrawl Free Plan](https://aifree.dev/offer/firecrawl-free-plan.md): 1,000 credits/month, no card. 1,000 free web scraping credits a month, no credit card
- [Serper 2,500 Free Google Search Queries](https://aifree.dev/offer/serper-free-queries.md): 2,500 requests, no card. 2,500 free Google search API queries on signup, no card
- [Jina AI 10M Free API Tokens](https://aifree.dev/offer/jina-ai-free-api-tokens.md): 10,000,000 tokens, no card. 10M free tokens across Jina embeddings, reranker, and reader APIs
- [Qdrant Cloud Free Tier](https://aifree.dev/offer/qdrant-cloud-free-tier.md): Free tier, no card. Free-forever Qdrant vector database cluster, 1 GB RAM, no credit card
- [Upstash Vector Free Tier](https://aifree.dev/offer/upstash-vector-free-tier.md): 10,000 requests/day, no card. Free serverless vector database: 10K queries/updates per day, 1 GB data
- [Supabase Free Plan](https://aifree.dev/offer/supabase-free-plan.md): 0.5 GB, no card. Free Postgres with pgvector, auth, storage and edge functions on 2 projects
- [Cloudflare Workers Free Plan](https://aifree.dev/offer/cloudflare-workers-free-plan.md): 100,000 requests/day, no card. Free serverless hosting on Cloudflare: 100,000 Worker requests per day
- [Deno Deploy Free Plan](https://aifree.dev/offer/deno-deploy-free-plan.md): 1,000,000 requests/month, no card. Free Deno Deploy hosting: 1M requests and 20 GiB egress per month

## Frequently asked questions

### Can I run an AI agent for free?

Yes, for building and light use. OpenRouter’s :free models accept tool calls with 20 requests a minute and 50 a day, Exa gives $10 of search a month, Qdrant Cloud a free 1 GB cluster and Cloudflare Workers 100,000 requests a day, all without a card.

### Which free LLM API supports tool calling?

On 2026-10-26, 16 of OpenRouter’s 17 free chat models accept tools. Requesty, Routeway and NVIDIA NIM also serve free models with tool calling; the tool-calling agent stack on aifree.dev only picks models that publish tool support.

### How many agent tasks do the free limits allow?

Each step of the agent loop is one model request, so a task with a few tool calls costs about 4 or 5. At 50 requests a day that is about 10 tasks; adding fallback providers with 200 requests a day each raises it to about 90.

### Where do I get a ready-made config?

On /stack/agent, the Use this stack block exports a LiteLLM config.yaml, a .env.example and a chat.py that falls back to the next free tier on a 429, built from the picks with a known API base URL.

## Sources

- https://openrouter.ai/api/v1/models
- https://openrouter.ai/docs/api/reference/limits
- https://openrouter.ai/docs/quickstart
- https://www.requesty.ai/models?free=1
- https://routeway.ai/models/cheapest
- https://build.nvidia.com/
- https://exa.ai/pricing
- https://www.firecrawl.dev/pricing
- https://serper.dev/
- https://jina.ai/reader/
- https://qdrant.tech/pricing/
- https://upstash.com/pricing/vector
- https://supabase.com/pricing
- https://developers.cloudflare.com/workers/platform/pricing/
- https://deno.com/deploy/pricing
- https://docs.litellm.ai/docs/proxy/configs

HTML page: https://aifree.dev/learn/free-ai-agent-stack
