Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 32
Glossary 12

Tools

Roo Code + Gonka AI — Autonomous AI Agent in VS Code

Roo Code is an autonomous AI agent for VS Code: it reads and edits files, runs commands in the terminal, works with the browser, and completes multi-step development tasks. It's a fork of Cline that goes further: customizable work modes (Architect, Code, Ask, Debug, and custom), custom project-specific instructions, and a flexible model settings panel. Essentially, it's an entire team of AI specialists inside your editor.

The main problem with such agents is token consumption. For a single task, Roo Code processes file contexts, command outputs, and tool results—this can be tens of millions of tokens. At Anthropic's prices ($3-15 per 1M), one full session turns into $30-1500. For daily work, this is unrealistic.

JoinGonka Gateway reduces costs thousands of times: the same session will cost $0.01-1.00. The Gateway resells inference from the decentralized Gonka network and supports both the OpenAI format (provider "OpenAI Compatible") and the Anthropic format (endpoint /v1/messages)—Roo Code connects via either of the two. This transforms Roo Code from an expensive demonstration into a daily working tool.

Step 1: Install Roo Code and get a key

Install Roo Code: In VS Code, open Extensions (Ctrl/Cmd+Shift+X), search for “Roo Code,” and click Install. After installation, the Roo Code kangaroo icon will appear in the sidebar.

JoinGonka API key: If you don't have a key yet, register at gate.joingonka.ai/register, get 10M free tokens, and create a key with the jg- prefix in the Dashboard.

Step 2: Configure Roo Code (OpenAI Compatible)

The easiest way is to set it up with a one-command installer. For CLI/file tools, it will automatically configure the JoinGonka provider (baseUrl, models), and for UI tools, it will display the ready-to-paste values:

npx @joingonka/setup --tool roo

The installer is universal (if no flag is provided, it will ask you to select a tool from a list), it will ask for your jg-… key, and perform a live check via the gateway after configuration. It does not touch other settings. Below is the manual method if you prefer to set it up yourself.

Manual setup (Plan B)

Open the Roo Code panel and go to settings (gear icon). In the provider section, set:

  1. API Provider — select OpenAI Compatible.
  2. Base URLhttps://gate.joingonka.ai/v1
  3. API Keyjg-your-key
  4. Model (Model ID) — MiniMaxAI/MiniMax-M2.7

Below, in the Model Configuration block, you can manually refine the model parameters:

  • Context Window200000 (200K tokens).
  • Max Output Tokens8192 (Gateway ceiling, for all network models).
  • Input Price / Output Price — you can enter the real rates (≈$0.003 per 1M input, output ×3) so Roo Code correctly calculates task costs directly in the interface.

Important about tool calling: Roo Code uses only native tool calling — there is no XML fallback like in older agents. Therefore, the model must support function calling. Network models via our Gateway support native tool calling — Roo Code works with them out of the box.

Testing: In the Roo Code chat, type "Create a file hello.py with a function that prints Hello World". The agent will suggest creating the file and show a diff for approval.

Comparing Agent Session Costs

Roo Code is an agentic tool: it doesn't respond with a single message, but performs a task — reads files, writes code, runs tests, and fixes bugs. Every action is a model call. Let's compare the costs of typical sessions:

TaskTokensAnthropic ClaudeOpenAI GPTJoinGonka Gonka
Simple bug fix~5M$15 — $75$12 — $50$0.024
New feature (2-3 files)~20M$60 — $300$50 — $200$0.096
Module refactoring~50M$150 — $750$125 — $500$0.24
Full development session (4h)~100M$300 — $1,500$250 — $1,000$0.48

With JoinGonka Gateway, Roo Code becomes a tool for daily use — you can run it on every ticket, every bug, and every feature without looking back at the bill. The 10M free tokens at startup are enough for dozens of tasks.

Model parameters (all have 200K context): all network models support up to 8192 output tokens. If max_tokens for a non-stream request is not specified, the Gateway returns up to 1500 tokens by default. Roo Code automatically splits long generations into steps.

How Roo Code differs from Cline: modes and Anthropic format

Roo Code is a fork of Cline, but with notable differences that change the workflow:

  • Modes: switch the agent's role depending on the task — Architect for planning, Code for coding, Ask for project-related questions, Debug for finding issues. You can create custom modes with separate instructions and a set of allowed tools.
  • Native tool calling only: unlike agents with text/XML parsing, Roo Code sends tools using the native OpenAI tools schema and receives calls as separate events — lower latency and more reliable results. The downside: the model must support function calling (network models via our Gateway do support this).
  • Custom instructions and profiles: project-level rules (e.g., via a rules file in the repository) and multiple saved provider configurations that are easy to switch between.

Connecting via Anthropic-format. If you want to use our /v1/messages endpoint instead of the OpenAI format: in settings select API Provider → Anthropic, check «Use custom base URL» and specify https://gate.joingonka.ai, in the Anthropic API Key field insert the same jg-your-key, then set the model name (e.g., MiniMaxAI/MiniMax-M2.7). The key and balance are shared for both formats; native tool_use in Anthropic mode also passes through the Gateway.

Roo Code + Gonka = autonomous AI agent in VS Code with modes and native tool calling for pennies. A development session costs $0.10 instead of $300-1,500 with Anthropic, and 10M free tokens are enough for dozens of tasks.

Want to learn more?

Explore other sections or start earning GNK right now.

Get 10M free tokens →