All blogs

Tokenless ·

How we turned web AI chats into an agent runtime with a harness

Coding agents call models through APIs with native tool calling. Web chat products such as ChatGPT, Claude and Gemini run the same models with no tool API at all. Our idea was to move tool calling into the harness. Tokenless writes the tool contract into the prompt, validates the reply and serves the result from an OpenAI-compatible endpoint, so an agent can run its loop on the web AI accounts you already pay for.

Working principle

Any model that takes text in and gives text out can run an agent loop. It needs a harness that turns each reply into a checked tool call and feeds the result back. Tokenless is that harness for web AI.

The pain: two bills for the same models

Agent work is a loop. Every file read, test run and retry goes back to the model, and on an API key each turn is billed again. The same models sit behind web subscriptions that most developers already pay for.

Chat websites were built for people. They have no tool-call API, no JSON mode and no stable request format, and each provider renders replies its own way. An agent has no way to call them.

How Tokenless turns a chat page into an agent backend

Tokenless runs a local daemon with an HTTP server. Your agent calls it through OpenAI-compatible Chat Completions, Responses and image endpoints, or an Anthropic-compatible messages endpoint. Tokenless routes each request to a provider in one of two modes.

Browser mode drives the provider's own website in your signed-in browser through managed Playwright. Direct API mode calls the provider directly instead of driving the page. ChatGPT and Perplexity have native direct backends, and a pinned gpt4free service covers the other direct providers.

Tokenless gives chat pages tool calls. It writes the agent's tool catalog and an output contract into the prompt and asks for one JSON envelope back. It validates the whole reply, down to the exact tool name and strict arguments, then returns finish_reason tool_calls. Structured output works the same way.

You choose who runs the loop. An existing harness such as Codex, Pi or DeepSeek Harness keeps its own tools and sessions and points its model base URL at Tokenless. Or the Tokenless Web Agent Harness runs the loop for you, with filesystem and MCP tools, approvals and timeouts.

Install and run a first task (Node.js 22.13 or later)

npm install --global tokenless@latest
tokenless setup
tokenless run --provider chatgpt --prompt "Review this proposal."
  • Tokenless Harness with Tokenless API.

    Tokenless runs the agent loop and the tools, and your web accounts answer each turn.

  • Your harness with Tokenless API.

    Keep your agent loop, tools and sessions, and point its model base URL at Tokenless.

  • Your harness with the Tokenless skill.

    Hand selected tasks to Tokenless from your agent and bring the result back into your workflow.

Where it stands

Tokenless is on npm and connects 41 providers: 19 in Browser mode and 35 in Direct API mode. It runs on Apple Silicon macOS, with a Windows x64 prerelease.

On 2026-10-04 we connected an unmodified DeepSeek Harness to the Tokenless auto router. Ten providers each read a file, edited it, ran bash and reached the verified final marker, including ChatGPT, Gemini, Grok, Qwen, DeepSeek, Perplexity, Z.ai and Lovable. On a pinned FeatureBench task, the same setup resolved the task with 294 of 294 fail-to-pass tests and 3,508 of 3,508 pass-to-pass tests passing.

We publish evidence for each provider before we list a capability. In a fixed sample on 2026-08-15, ChatGPT through the browser returned a valid strict tool call in 5 of 5 requests.

What's next

We are moving direct providers into Tokenless one at a time, each checked against the gpt4free backend before it switches over.

We are also measuring the tokens Tokenless takes off your API bill on a real project, through every adoption path: full API replacement, a Tokenless sub-agent, and the skill with the CLI.

Run npm install --global tokenless@latest and tokenless setup, then send your agent's next task to an account you already pay for.