Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 52
Glossary 12

Tools

OpenClaw + Gonka AI - affordable AI agents

OpenClaw is a framework for creating autonomous AI agents capable of performing complex tasks: research, coding, and business process automation. Agents operate in a "think → act → observe" loop, independently decomposing tasks and calling tools.

The main problem with autonomous agents is cost. One agent can make 50-500 LLM calls per task. At OpenAI prices ($5—$30/1M tokens), that is $10—$100 per task. If the agent runs continuously, the monthly bill reaches thousands of dollars. This is the difference between a profitable and a loss-making product.

JoinGonka Gateway reduces costs by ~720—1,400 times: $0.0069/1M tokens input and $0.021/1M output. An agent that cost $100 per task now costs about 10 cents (based on September 2026 prices). This makes autonomous agents economically viable even for startups and indie developers.

Step 1: Get API Key

Registering on JoinGonka Gateway:

  1. Go to gate.joingonka.ai/register.
  2. Get a bonus of 3M free tokens.
  3. Create an API key in Dashboard → API Keys (format: jg-xxx).

The bonus is enough to test the stack on your first agent runs — the economics are drastically different compared to OpenAI.

Step 2: Configure OpenClaw

OpenClaw works with the JoinGonka Gateway in OpenAI-compatible mode. The easiest way to set it up is with the one-command installer — it configures the provider with the correct baseUrl and models on its own, backing up your current config first:

npx @joingonka/setup --tool openclaw

This is the universal JoinGonka installer: without a flag — npx @joingonka/setup — it will prompt you to pick a tool from a list. There are already 25 of them: Claude Code, Codex CLI, OpenClaw, Cursor, Cline and others — see the full list in the package README.

The installer will ask for your API key (jg-…) and add only the JoinGonka provider to ~/.openclaw/openclaw.json, leaving your other settings untouched. The key is written to the file as a literal, and the file gets 600 permissions. DeepSeek V4 Flash becomes the primary model, with GLM-5.3 Flash and MiniMax M2.7 as fallbacks: if a model is busy, the agent switches to the next one instead of stopping. If you already have your own fallback list, the installer won't touch it; you can set a different primary model with the --model minimax|deepseek|glm flag.

Set up manually (Plan B)

OpenClaw stores providers in ~/.openclaw/openclaw.json — a nested models.providers structure. Add the gonka provider in OpenAI mode (api: openai-completions, baseUrl with /v1):

{
  "models": {
    "providers": {
      "gonka": {
        "baseUrl": "https://gate.joingonka.ai/v1",
        "api": "openai-completions",
        "apiKey": "jg-your-key",
        "models": [
          { "id": "deepseek-ai/DeepSeek-V4-Flash-0731", "name": "DeepSeek V4 Flash", "contextWindow": 380000, "maxTokens": 32768 },
          { "id": "zai-org/GLM-5.3-Flash", "name": "GLM-5.3 Flash", "contextWindow": 390000, "maxTokens": 8192 },
          { "id": "MiniMaxAI/MiniMax-M2.7", "name": "MiniMax M2.7", "contextWindow": 200000, "maxTokens": 8192 }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "gonka/deepseek-ai/DeepSeek-V4-Flash-0731",
        "fallbacks": ["gonka/zai-org/GLM-5.3-Flash", "gonka/MiniMaxAI/MiniMax-M2.7"]
      }
    }
  }
}

The key is written to the file as a literal, so keep the file accessible only to yourself: chmod 600 ~/.openclaw/openclaw.json. OpenClaw also understands a reference to an environment variable ("apiKey": "${GONKA_API_KEY}"), but it only works as long as the variable is exported in the environment the agent was launched from; a literal doesn't depend on the environment. The fallbacks block lists fallback models: if the primary one is busy, the agent switches to the next instead of stopping. Each model has its real context window and response cap specified.

Tool calling: all models on the network support native tool calling — critically important for agent frameworks. The agent can call search, file reading, code execution and other tools through the standard OpenAI function calling API.

Verification: launch a simple agent with the task "write hello world in Python and explain the code". If the agent completed the task, your setup is successful.

Economics of Autonomous Agents

Autonomous agents are among the most token-intensive applications. A single agent cycle (prompt → tools → reflection) consumes 5-50K tokens. A complex task may require 50-500 cycles. Let's compare the economics:

ScenarioTokens per taskOpenAI GPT-5.5JoinGonka MiniMax M2.7Savings
Simple task (10 cycles)~500K$1.25 — $5.00$0.0072170x — 700x
Medium task (100 cycles)~5M$12.50 — $50.00$0.072170x — 700x
Complex task (500 cycles)~25M$62.50 — $250.00$0.36170x — 700x
Month of continuous operation~5B$12,500 — $50,000$72170x — 700x

At OpenAI prices, autonomous agents are economically unviable for most tasks. At Gonka prices, an agent can run 24/7 for $48 a month. This changes the model: agents shift from an «expensive toy» to a working tool.

For business: if your product uses AI-agents (customer support, data analysis, automation), switching to Gonka can reduce costs by 99.81% — which means higher margins or lower prices for customers.

Limitations: The context window of MiniMax M2.7 is 200K tokens, and DeepSeek V4 Flash is 380K. For agents with a very long history (500+ cycles), context summarization may be required. The maximum response length is 8192 tokens for MiniMax M2.7 and GLM-5.3 Flash, and 32768 for DeepSeek V4 Flash, which is sufficient for a typical agentic cycle (instruction + tool call).

OpenClaw + Gonka = autonomous AI agents for $24/month instead of $12,500+ with OpenAI. Savings of hundreds of times make agents profitable even for indie developers. Native tool calling across all network models ensures full compatibility.

Want to learn more?

Explore other sections or start earning GNK right now.

Get free tokens →