// docs

AI Providers

Compare OpenAI, Anthropic, and local wllama — and configure the right one for your agent.

Overview

AgentOp supports three AI providers for powering your agents. Each provider offers different capabilities, pricing models, and deployment options. This guide will help you choose the right provider and configure it properly for your use case.

Provider Comparison

Feature OpenAI Anthropic Local (wllama)
API Key Required Yes Yes No
Cost Pay per token Pay per token Free
Privacy Data sent to OpenAI Data sent to Anthropic 100% local, no data sent
Internet Required Yes (API calls) Yes (API calls) First download only
Model Size N/A (cloud) N/A (cloud) 0.4–7.1GB download (recommended model ~2.5GB)
Response Speed Fast (API latency) Fast (API latency) Depends on device
Function Calling Full support Full support Full support via GBNF grammar constraints
Best For Production apps, complex tasks Long context, detailed responses Privacy, offline, no costs

OpenAI Provider

Overview

OpenAI provides the GPT series of models, known for strong general-purpose capabilities and broad knowledge. Best suited for production applications requiring fast, reliable AI responses.

Supported Models

  • GPT-6-astra: Flagship model for the hardest end-to-end work
  • GPT-6-sol: Built for complex coding and agentic workflows
  • GPT-6-luna: Cheapest tier, for focused high-volume tasks
  • GPT-5.6-sol / -terra / -luna: The previous generation — frontier, balanced and cheap

AgentOp's default is GPT-5.6-luna, not a GPT-6 model. On the Chat Completions endpoint that generated agents use, the GPT-6 models accept function calling only with reasoning_effort set to none, and agents rely on tool calling — so a GPT-6 default would break them. Name a GPT-6 model explicitly if your agent does not call tools.

You can name any current OpenAI model in your template's configuration. If you pin a model that OpenAI later retires — gpt-3.5-turbo and the GPT-4 turbo line shut down on 2026-10-23 — AgentOp automatically substitutes its supported successor when your agent is generated, so existing agents keep working.

Getting an API Key

  1. Visit platform.openai.com
  2. Create an account (requires phone verification)
  3. Add billing information (credit card required)
  4. Navigate to API Keys section
  5. Click "Create new secret key"
  6. Copy the key (shown only once!)
  7. Set usage limits for security

Security Best Practice

Create separate API keys for each agent and set monthly spending limits. This limits damage if a key is compromised.

Configuration in AgentOp

When creating your agent, select "OpenAI" as the provider and choose a model. AgentOp automatically injects the required langchain_openai package and configures the LLM connection — you do not need to write any import or setup code yourself:

# You do NOT need to write this — AgentOp injects it automatically:
#   from langchain_openai import ChatOpenAI
#   llm = ChatOpenAI(model="gpt-5.6-luna", temperature=0.7)
#
# Your Python code only defines tool functions and get_tool_schemas().
# The platform handles model setup, API key encryption, and tool dispatch.
#
# Default model: gpt-5.6-luna
# API key: encrypted client-side and embedded in the HTML file

Cost Estimation

  • GPT-6-luna: ~$0.10 per million input tokens, ~$0.50 per million output tokens
  • GPT-6-sol: ~$2.00 per million input tokens, ~$10.00 per million output tokens
  • GPT-6-astra: ~$10.00 per million input tokens, ~$50.00 per million output tokens
  • GPT-5.6-luna: ~$0.20 per million input tokens, ~$1.20 per million output tokens
  • GPT-5.6-terra: ~$2.00 per million input tokens, ~$12.00 per million output tokens
  • GPT-5.6-sol: ~$4.00 per million input tokens, ~$20.00 per million output tokens

Note: Prices are approximate and change over time. Check OpenAI's pricing page for current rates.

Pros

  • Excellent general-purpose performance
  • Fast response times via API
  • Large ecosystem and community support
  • Strong function calling capabilities
  • Vision support across the current GPT model line

Cons

  • Requires API key and billing setup
  • Pay-per-use pricing can add up
  • Data sent to OpenAI servers (privacy consideration)
  • Internet connection required
  • Rate limits apply

Anthropic Provider (Claude)

Overview

Anthropic's Claude models are known for their strong instruction-following, safety features, and ability to handle very long contexts. Excellent choice for detailed responses and document analysis.

Supported Models

  • Claude Sonnet 5.5: Balanced capability and speed (AgentOp's default)
  • Claude Opus 5.5: For long-running agentic coding and knowledge work
  • Claude Fable 5.1: Most capable, for demanding reasoning and long-horizon work
  • Claude Haiku 5.5: Fast and cost-effective for simpler tasks

You can name any current Anthropic model in your template's configuration. If you pin a model that Anthropic later retires, AgentOp automatically substitutes its supported successor when your agent is generated, so existing agents keep working.

Getting an API Key

  1. Visit console.anthropic.com
  2. Create an account
  3. Add billing information
  4. Navigate to API Keys section
  5. Click "Create Key"
  6. Name your key and copy it
  7. Set usage limits as needed

Configuration in AgentOp

When creating your agent, select "Anthropic" as the provider. AgentOp automatically injects the required langchain_anthropic and related LangChain packages — you do not need to write any import or setup code:

# You do NOT need to write this — AgentOp injects it automatically:
#   from langchain_anthropic import ChatAnthropic
#   llm = ChatAnthropic(model="claude-sonnet-5-5", ...)
#
# Your Python code only defines tool functions and get_tool_schemas().
# Default model: claude-sonnet-5-5
# API key: encrypted client-side and embedded in the HTML file

Cost Estimation

Anthropic bills per million input and output tokens, and the rate differs per model — Haiku is the cheapest tier, Opus the most expensive. Rates change as models are released and retired, so see Anthropic's pricing page for the current numbers.

Pros

  • Excellent at following complex instructions
  • Very large context windows (up to 200K tokens)
  • Strong safety and ethical alignment
  • Detailed, well-reasoned responses
  • Good for document analysis and summarization

Cons

  • More expensive than OpenAI for similar capabilities
  • Requires API key and billing
  • Data sent to Anthropic servers
  • Internet connection required
  • Smaller ecosystem than OpenAI

Local (wllama) Provider

Overview — Run an LLM Locally in the Browser

wllama runs large language models directly in the browser using llama.cpp compiled to WebAssembly (WASM) — no server required, no API key, nothing sent to the cloud. The model downloads once (0.4–7.1 GB depending on the model — the recommended Qwen 3 4B is ~2.5 GB), is cached locally, and then runs on the user's GPU via WebGPU for every subsequent session — including completely offline. A WebGPU-capable GPU is required for usable performance.

AgentOp agents using the Local provider combine Python tool functions running via Pyodide (Python compiled to WebAssembly) with WllamaAgentManager for grammar-constrained tool calling and wllama for inference. GBNF grammars constrain the model's token sampling to produce valid JSON tool calls — no free-form text parsing needed. All of this runs inside the browser tab with no network requests after the initial model download.

The runtime is open source, and pinned. https://github.com/agentopofficial/wllama at tag v3.6.1-agentop.1 is the exact source of the WebAssembly and JavaScript this site serves. It is a fork of ngxson/wllama that compiles both wasm targets with MEMORY64 and a 16 GB memory ceiling — stock wllama caps its fallback build at the 4 GB wasm32 address space, which the largest models here (Gemma 4 12B, ~7.5 GB) cannot fit. Everything else is upstream's work.

Supported Models (GGUF)

Fourteen model families are available, all with full function-calling support via GBNF grammar:

  • Qwen 3 (Alibaba): 0.6B (~0.4GB), 1.7B (~1.1GB), 4B (~2.5GB, recommended default), 8B (~5.0GB), plus Qwen 2.5 Coder 7B (~4.7GB) for code-heavy agents
  • Qwen 3.5 (Alibaba): 0.8B (~0.5GB), 2B (~1.3GB), 4B (~2.7GB), 9B (~5.7GB) — newest Qwen generation with hybrid linear attention and a 262K-token native context
  • Llama (Meta): Llama 3.2 1B (~0.8GB), Llama 3.2 3B (~2.0GB), Llama 3.1 8B (~4.9GB)
  • Hermes (NousResearch): Hermes 3 Llama 3.2 3B (~2.0GB) — strong agentic tool calling
  • Phi (Microsoft): Phi 4 Mini 3.8B (~2.5GB), Phi 3.5 Mini 3.8B (~2.4GB)
  • Gemma 4 (Google): E2B MoE (~3.5GB), 12B (~7.1GB, heavy)
  • DeepSeek (reasoning): R1-0528 Qwen3 8B (~5.0GB), R1 Distill Qwen 7B (~4.7GB), R1 Distill Qwen 1.5B (~1.1GB)
  • Granite (IBM): Granite 4.2 3B (~2.2GB), Granite 4.2 8B (~5.4GB) — Apache 2.0, enterprise-tuned instruction following
  • LFM (Liquid AI): LFM2.5 1.2B (~0.7GB), 2.6B (~1.7GB), 8B-A1B MoE (~5.2GB) — hybrid conv/attention models built for on-device inference; the MoE keeps only ~1B parameters active per token
  • Ling (InclusionAI): Ling 3.0 Tiny (~4.8GB) — MIT-licensed MoE with 7.9B weights but only ~1.3B active per token
  • Ornith (Ornith AI): Ornith 1.5 9B (~5.8GB) — MIT-licensed, the strongest agentic tool caller in the 9B tier, with a 262K-token native context
  • MiniCPM (OpenBMB): MiniCPM5 2B (~1.6GB), MiniCPM5 1B (~0.7GB) — Apache 2.0, trained for on-device use; the 2B scores above every other 2B-class model on OpenBMB's own comparison and holds its own against 4B models at half the download
  • MiMo (Xiaomi): MiMo V2.6 Distill Qwen 9B (~5.8GB) — MIT-licensed distill of Qwen 3.5 9B trained for agentic tool use, coding and terminal work, with a 262K-token native context
  • FrogNano (Microsoft): FrogNano 4B (~2.8GB) — Apache 2.0, built on Qwen 3.5 4B and post-trained for repository-level coding and tool use; the strongest coding agent here under 3 GB, with a 262K-token native context

All models are GGUF format (Q4_K_M quantization), loaded from HuggingFace by wllama at runtime. Each model runs with a context window sized for in-browser memory (8K tokens for most models by default). The agent's Context selector lets users with more (V)RAM raise it — up to 32K on most models — and in Auto mode the window is raised to 16K automatically when inference runs on a capable GPU (NVIDIA or Apple silicon).

WebGPU + WebAssembly

wllama uses llama.cpp compiled to WebAssembly, with model layers offloaded to the GPU via WebGPU. Chrome and Edge on a machine with a graphics card are recommended; Safari is WebGPU-accelerated on Apple Silicon Macs. A supported GPU is required for usable local inference — on hardware without one, use a cloud provider. In Auto mode, NVIDIA and Apple GPUs are used immediately; any other GPU (AMD, Intel, Qualcomm — discrete, integrated, or unified-memory) is tested once on first load and falls back to CPU automatically if it fails or stalls. The result is remembered on that device, and the Run on selector can always force GPU or CPU explicitly.

Not sure what your machine has? The browser hardware check measures it — WebGPU support, GPU memory bandwidth and storage quota — and tells you which models will run and how fast.

No Configuration Required

Simply select "Local (wllama)" as your provider when creating an agent. No API key needed!

# wllama handles inference via GBNF grammar-constrained tool calling
# Your Python code defines the tools, called via JS⇔Python bridge
# Model selection happens in the browser UI

# Default model: Qwen 3 4B (Q4_K_M) — best balance of speed and capability
# All models support function calling via GBNF grammar constraints

First-Time Setup

When a user opens your agent for the first time:

  1. They select a GGUF model from available options
  2. The model downloads from HuggingFace (0.4–7.1GB depending on the model)
  3. Model is cached in browser for future use
  4. Agent is ready to use offline!

Large Download Size

Larger models can be several gigabytes (up to ~7.1GB for Gemma 4 12B). Warn users about the download on first use. After downloading, the model is cached and works offline.

Performance Considerations

  • Desktop/Laptop with a GPU: Good performance via WebGPU inference
  • No dedicated GPU: Impractically slow — use a cloud provider instead
  • Mobile: Not practical — phones rarely expose a GPU to WebGPU
  • Low-end / older GPUs: May struggle with larger 7–12B models; try the 0.6B–3B variants
  • Speed: 2-20 tokens/second depending on device and model size

Pros

  • Completely free - no API costs
  • 100% private - data never leaves device
  • Works offline after initial download
  • No API key management
  • Full function calling support via GBNF grammar constraints
  • No rate limits

Cons

  • Initial model download required (0.4–7.1GB depending on the model)
  • Requires a WebGPU-capable GPU (not practical without one)
  • Performance varies by GPU
  • Smaller models = lower quality than GPT-4 or Claude
  • Limited to browser environment

On-Device Capabilities (work with any provider)

Some templates do more than chat: they read documents, listen to audio, or look at images. Those capabilities run entirely in your browser, using small task models downloaded once and cached — separately from, and in addition to, whichever provider writes the answers. A template opts in, and the agent gets the matching browser-side engine plus a Python API its code can call.

Capability What it does Model downloaded
Embeddings Turns text into vectors for semantic search and similarity ~25 MB (all-MiniLM-L6-v2)
Document Q&A (RAG) Chunks and indexes uploaded files, then retrieves the passages relevant to a question so answers stay grounded in your document Embeddings model only
Speech-to-text Transcribes microphone recordings or audio files ~40 MB (Whisper tiny)
Vision Reads printed text from images (OCR) and describes pictures. The OCR model reads one line at a time, so templates that handle whole pages — the Receipt & Invoice Extractor, for instance — split the image into text lines first. It reads clear printed English text: a digital PDF is exact, a sharp photo reads well, and a creased till receipt or a non-Latin script will only read in part. ~40 MB OCR, ~250 MB captioning (each loaded only if used)
Text-to-speech Reads replies aloud via your browser's own speech engine None — built into the browser

Your documents never leave the browser

Indexing, retrieval, transcription and OCR all happen on your machine, and the index is stored locally per agent. With a local provider the whole agent is offline. With OpenAI or Anthropic, only the final prompt — your question plus the passages retrieved to answer it — is sent to that provider; the file itself, the audio and the images are not uploaded.

Choosing a provider for a capability agent

These capabilities do not restrict which provider you pick. A document Q&A agent can retrieve in your browser and have GPT or Claude write the answer, which is usually the higher-quality combination; or it can run fully local, which is free, private and works offline. Templates that genuinely require one provider say so, and the create page only offers the ones that produce a working agent.

API Key Security

AgentOp uses client-side encryption to protect your API keys when embedding them in HTML files:

How It Works

  1. When you download an agent, you're prompted to create an encryption password
  2. Your API key is encrypted using AES-256 encryption in your browser
  3. Only the encrypted key is embedded in the HTML file
  4. When opening the agent, users enter the password to decrypt the key
  5. Decryption happens entirely client-side - no keys sent to servers

Security Best Practices

  • Use a strong, unique encryption password
  • Create separate API keys for each agent
  • Set spending limits on all API keys
  • Regularly rotate API keys
  • Never share agents with embedded keys publicly
  • Consider using Local (wllama) for public agents

Choosing the Right Provider

Use OpenAI if you need:

  • Production-ready, reliable AI
  • Fast response times
  • Vision capabilities
  • Broad general knowledge
  • Cost-effective solutions (GPT-5.6-luna)

Use Anthropic if you need:

  • Very long context handling (200K tokens)
  • Extremely detailed responses
  • Document analysis and summarization
  • Strong ethical alignment
  • Complex instruction following

Use Local (wllama) if you need:

  • Zero API costs
  • Complete privacy and data control
  • Offline functionality
  • No API key management
  • Public distribution without key exposure

Switching Providers

You can change providers for any agent by editing it and selecting a different provider option. Your Python tool functions (async def + get_tool_schemas()) work identically across all three providers — no code changes are needed when switching. AgentOp automatically configures the correct LangChain packages and infrastructure for each provider behind the scenes.

Next Steps