Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 37
Glossary 12

Tools

OpenClaw + Gonka AI - affordable AI agents

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

The main problem with autonomous agents is cost. One agent can make 50-500 LLM calls per task. With OpenAI pricing ($2.50-15/1M tokens), that is $5-50 per task. If an 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 390x: $0.0047/1M tokens. An agent that cost $50 per task now costs $0.129. 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 1.5M 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 JoinGonka Gateway in OpenAI-compatible mode. The easiest way to set it up is via a one-line command installer—it automatically configures the provider with the correct baseUrl and models while backing up your current config:

npx @joingonka/setup --tool openclaw

This is the universal JoinGonka installer: without a flag—npx @joingonka/setup—it will prompt you to select a tool (Claude Code, OpenClaw, or Cline). The installer will ask for your API key (jg-…) and carefully append only the JoinGonka provider without affecting your other settings. Learn more: GitHub.

Manual setup (Plan B)

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

{
  "models": {
    "providers": {
      "gonka": {
        "baseUrl": "https://gate.joingonka.ai/v1",
        "api": "openai-completions",
        "apiKey": "${GONKA_API_KEY}",
        "models": [
          { "id": "moonshotai/Kimi-K2.6", "name": "Kimi K2.6", "maxTokens": 8192 },
          { "id": "MiniMaxAI/MiniMax-M2.7", "name": "MiniMax M2.7", "maxTokens": 8192 },
          { "id": "deepseek-ai/DeepSeek-V4-Flash-0731", "name": "DeepSeek V4 Flash", "maxTokens": 32768 }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "gonka/moonshotai/Kimi-K2.6" }
    }
  }
}

The key is not written to the file: apiKey references the ${GONKA_API_KEY} variable (OpenClaw resolves only ${...} syntax). The name is unique—it does not conflict with OPENAI_* of other tools. Export the key to your environment:

export GONKA_API_KEY=jg-your-key

Tool calling: Kimi K2.6 supports native tool calling, which is critical for agent frameworks. The agent can invoke search, file reading, code execution, and other tools via the standard OpenAI function calling API.

Verification: launch a simple agent with the prompt "write hello world in Python and explain the code". If the agent completes the task, the configuration is successful.

Economics of Autonomous Agents

Autonomous agents are among the most token-intensive applications. One 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 Kimi K2.6Savings
Simple task (10 cycles)~500K$1.25 — $5.00$0.0072170x — 700x
Average 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 work~5B$12,500 — $50,000$72170x — 700x

At OpenAI prices, autonomous agents are economically unviable for most tasks. At Gonka prices, an agent can operate 24/7 for $48 per month. This changes the model: agents shift from an "expensive toy" to a functional 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 increasing margins or lowering prices for customers.

Limitations: The context window for Kimi K2.6 is 200K tokens. For agents with a very long history (500+ cycles), context summarization may be required. The maximum response length per model request is up to 8192 tokens (for all models in the network), which is sufficient for a typical agent cycle (instruction + tool call).

OpenClaw + Gonka = autonomous AI agents for $24/month instead of $12,500+ at OpenAI. 350x savings makes agents profitable even for indie developers. Native tool calling in Kimi K2.6 ensures full compatibility.

Want to learn more?

Explore other sections or start earning GNK right now.

Get free tokens →