Skip to content
← Developer Hub

Developer Hub

Setup Gopher Agent

Cut frontier-model costs by delegating heavy reading to a low-cost raia agent over MCP — with downloadable instructions for Claude and the Gopher agent.

Interactive tool

Token Savings Estimator

See what a Gopher agent saves on your own workload. Enter your model, conversation length and how much each turn reads, and get your estimated cost and context savings. Open the estimator at raiaai.com/gopher

Tech Time with Thomas: why paying frontier-model prices to read raw data is the expensive part of research, and how a Gopher agent changes that.

Example architecture and estimates. The workload, model prices, token counts, savings, and prompt formats below are illustrative assumptions, not measured results or a raia API contract. Verify current model availability and prices before budgeting. Use the connection configuration supplied for your agent; this page does not define an MCP endpoint or authentication header.

Gopher Agents: Delegating the Heavy Reading to Reduce Frontier-Model Costs

A Gopher agent is a raia agent built on a low-cost model. A premium AI assistant (such as Claude) calls it over MCP to fetch, read and condense information. The premium model does the thinking, and the Gopher does the reading. The Gopher goes out and does the token-heavy work, then brings back only what matters.


The problem it solves

In research-style work, a large share of an AI assistant's cost can be reading rather than reasoning, depending on the workload, client and caching.

When an assistant searches the web, opens documents or queries a connected system, the full raw content lands in its context window. A handful of web pages can add 50,000–100,000 tokens. Then two things happen:

  1. You pay premium rates to read it. Frontier models usually cost more per token than fast, low-cost models; the gap depends on the models and current prices.
  2. You may pay again on later turns. Many clients resend the conversation's context with each message, so raw content read early can keep adding cost while it stays in context. Caching, client behaviour and context limits change how much.

Long research conversations also fill the context window. After that, the model starts losing earlier detail or the conversation has to be restarted.

How a Gopher agent works

User ──► Premium model (Claude)
              │  "TASK: find X. RETURN: fields A, B, C"
              ▼
         Gopher agent on raia (cheap model)
              │  searches the web, reads pages, queries MCP connectors,
              │  processes 50k–100k tokens of raw content
              ▼
         Compact result (~1–2k tokens): answer, key facts, sources, gaps
              │
              ▼
         Premium model reasons over the summary and answers the user
  1. The premium model decides a step needs heavy reading and sends the Gopher a self-contained request: what to find, where to look and exactly what to return.
  2. The Gopher does the work at its own model's rates, within the budget, permissions, rate limits and quality limits you set.
  3. The Gopher returns a short, structured result with sources and short verbatim quotes.
  4. The premium model sees what the Gopher returns, plus whatever else the client sends it. The design goal is a smaller premium context, so more of its tokens go to reasoning, judgment and writing.

Illustrative savings

This is one hypothetical single-task calculation, not a measured saving, a current model quote or a raia charge. It assumes two rate tiers in USD per 1M tokens: a premium model at $10 input / $50 output, and a worker (Gopher) model at $1.50 input / $9 output.

TokensCost
Premium model only: reads the material itself100,000 input + 2,000 output$1.10
Gopher reads the material100,000 input + 2,000 output (worker rates)$0.168
Premium model reasons over the result5,000 input (2,000-token worker result + 3,000 task context) + 2,000 output$0.15
Premium model + Gopher, total$0.318 (about $0.32)

In this example the delegated version costs about 71.1% less ($0.318 instead of $1.10). Assumptions: no prompt caching, search, tool, storage, hosting, tax, retry or other extra charges are included. In real usage, output must include every billed token, including any reasoning tokens. Real routing, context size and answer quality can reduce or erase the benefit, so measure your own workload. Model names, availability and prices change; check each provider's current pricing page rather than relying on this example.

When to use the Gopher, and when not to

Send to the Gopher:

  • Web research, fact-finding, competitor and market lookups
  • Reading long documents, PDFs, web pages or large tool outputs when only part of them is needed
  • Pulling data from connected systems (CRM, tickets, knowledge bases, databases)
  • Bulk extraction: lists, tables, specs, contact details, comparisons across many items
  • Any step that reads far more than it returns. A useful rule of thumb is more than about 5k tokens read for a much smaller answer.

Keep on the premium model:

  • Reasoning, analysis, planning, writing, editing and coding
  • Judgment calls and anything that depends on the conversation's nuance
  • Short answers the model already knows or that are already in the conversation
  • Exact wording that must be right, such as contract language. Have the Gopher return verbatim excerpts, not summaries.

The contract between the two agents

This example relies on both sides following a shared request and response format. Adapt and test the format in your client.

Request (premium model → Gopher)

TASK:      one clear objective
CONTEXT:   only the background needed to judge relevance
SOURCES:   web | <connector name> | specific URLs or files
RETURN:    the exact fields, table columns or format needed
DETAIL:    brief | standard | full
MAX_WORDS: optional hard cap

The Gopher's context depends on what the caller sends, so write every request to be self-contained; do not assume it sees or is isolated from anything beyond that.

Response (Gopher → premium model)

STATUS:     complete | partial | failed
ANSWER:     direct answer, or a table for data requests
KEY FACTS:  one fact per line, tagged [S1], [S2] …
SOURCES:    [S1] Title — URL — "verbatim quote of 25 words or fewer"
GAPS:       what couldn't be found or confirmed, conflicts, assumptions
USAGE:      sources_checked; est_tokens_read; est_tokens_returned

The short quotes let the premium model check important claims without reading the sources itself. Hard length limits (150, 400 or 1,200 words, depending on DETAIL) keep the savings from leaking away.

Setting it up on raia

  1. Create the agent. Pick a fast, low-cost model available to you; check current availability and prices.

Worked example

The examples use fictional data. Follow the same checks with approved, non-sensitive information for your own task.

Open the agent, then Train → Advanced Settings. Under LLM Configuration, open LLM Model. You can search or filter by provider; the list shows only models your organization has made available, so it can differ from this example.

The agent's LLM Model picker with search and provider filters.
  1. Highlight 1: LLM Model
  2. Highlight 2: Search LLM model
  3. Highlight 3: Provider filters
  1. Add the Gopher instructions. Give the agent its role, research rules and the response format above. Tell it that its caller is an AI and that every word it returns costs money.
Training navigation and instruction-version selector.
  1. Highlight 1: The Train tab.
  2. Highlight 2: Agent Instructions, Documents and Advanced Settings.
  3. Highlight 3: Instructions Version: which saved version you are looking at.
Instruction text and save controls.
  1. Highlight 1: Current Instructions: edit the text here.
  2. Highlight 2: Save
  3. Highlight 3: Save version keeps this text as a new version.
  1. Enable skills. Turn on the Web skill and connect any MCP integrations or data sources the Gopher should reach.

Open Agents, choose your agent, then open Skills. These views locate the navigation; follow the skill-specific settings below.

In Launch Pad, open Agents and choose the agent you want to configure.
  1. Highlight 1: Agents
On that agent, open Skills.
  1. Highlight 1: Skills
  1. Expose it over MCP. In the MCP Skill (RAIA MCP tab), write a Server Description and Tool Description that explain when to call the Gopher and the request format. Copy the OAuth Registration URL.
MCP before setup: RAIA MCP is incoming access; Integrations configures outgoing servers.
  1. Highlight 1: RAIA MCP
  2. Highlight 2: Integrations
  3. Highlight 3: Set up MCP Skill

Illustrated steps for this tab: MCP Tools skill.

  1. Connect it to an approved client. Follow the client's current remote-MCP setup and use the agent's OAuth Registration URL if OAuth is supported. Inspect its returned tool list and input schema. The isolated Acme custom-client test returned query-agent; use the discovered name rather than deriving it from the agent's name. Explicitly request that tool and compare its answer with your source. This does not establish a tested Claude or OAuth connection.
  2. Instruct the premium model. Add project instructions that tell Claude when to delegate, how to write requests and how to handle partial or failed results.
  3. Turn off the premium model's own web search in that project, so the Gopher becomes the default way to research.

Best practices

  • Ask for exactly what you'll use. Precise RETURN fields are the main way to keep replies small.
  • Run calls in parallel. Split independent questions into separate Gopher calls instead of sending one large request.
  • Start brief. Ask for more detail only when needed. A narrower follow-up costs less than an oversized first reply.
  • Handle partial results through the Gopher. If the Gopher returns partial, the premium model should send a narrower request rather than doing the reading itself.
  • Spot-check what matters. Check figures that feed decisions against the returned quotes.
  • Measure. Run the same tasks with and without the Gopher and compare premium-model token usage and answer quality.

Limitations

  • Summaries can lose detail. A cheaper model can miss nuance or leave something out. Retries and re-checks reduce the savings, so the pattern fits fetch-and-extract work best, not judgment-heavy reading.
  • Token counts are estimates. Models cannot measure their own token usage. Use raia's usage logs for real numbers.
  • Latency. Each delegation adds a network hop and a second model call.
  • Fixed overhead. For small lookups, the cost of the tool definition, the request and the response can cancel out the savings. The pattern pays off on large reads.
  • Routing is guided by instructions, not enforced. The premium model decides when to call the Gopher based on its instructions. Clear tool descriptions and disabling built-in search make that decision more reliable.

In short: A lower-cost model can handle bounded extraction while a stronger model handles judgment. Check sources and measure cost and answer quality for your workload. A Gopher agent on raia is designed to keep frontier-model context smaller and can lower cost on large reads; measure whether it does for your workload.

Build a Salesforce Gopher agent and connect it to Claude — Set up a Salesforce Gopher agent in Raia, connect Salesforce through Command, and use it in Claude to find opportunities and draft follow-ups.

Estimate your own savings with the Token Savings Estimatorraiaai.com/gopherTry it