Skip to main content
Builder Feature - Tracer is included with Builder, Team, and Business plans. Free plan users can also use Tracer with purchased credits (15 credits per job).

Overview

Tracer is an autonomous agent that searches code on GitHub without requiring you to index repositories first. It delegates tasks to specialized sub-agents — each handling search, reading, or analysis in parallel — to deliver faster, more thorough results than a single-agent approach. Tracer supports two modes: Fast (powered by Claude Haiku for quick lookups) and Deep (powered by Claude Opus with 1M context window for thorough investigations). Use Tracer when you need to quickly search unfamiliar code, find implementation examples, or understand how libraries work internally.

Modes

ModeAPI ValueModelBest For
Fasttracer-fastClaude HaikuQuick lookups, simple questions, rapid iteration
Deeptracer-deepClaude Opus (1M context)Thorough investigations, complex codebases, multi-file analysis

How It Works

You provide a question, repositories to search, and optionally a mode. Tracer delegates work to specialized sub-agents that operate in parallel:
1

Plan

The coordinator analyzes your query and breaks it into sub-tasks
2

Explore

Sub-agents browse repository structures to understand layouts
3

Search & Read

Sub-agents search and read files concurrently using GitHub’s Code Search API
4

Iterate

Follow code paths as results reveal new areas, with sub-agents working in parallel
5

Synthesize

Generate a comprehensive report with file paths and line citations

Available Tools

Tracer autonomously uses four GitHub tools:
ToolPurpose
github_searchCode search with qualifiers (language:, path:)
github_listBrowse file tree structure
github_readRead file contents with optional line ranges
github_globFind files matching glob patterns

API Usage

Create a Tracer Job

curl -X POST https://apigcp.trynia.ai/v2/github/tracer \
  -H "Authorization: Bearer $NIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "How does the streaming response work in generateText?",
    "repositories": ["vercel/ai"],
    "context": "Focus on the core streaming implementation, not the React hooks.",
    "mode": "tracer-deep"
  }'
Parameters:
ParameterTypeRequiredDescription
querystringYesYour research question
repositoriesstring[]NoRepositories to search (owner/repo format)
contextstringNoAdditional context to guide the agent’s focus
modestringNo"tracer-fast" (Haiku) or "tracer-deep" (Opus with 1M context). Defaults to "tracer-deep"
Response:
{
  "job_id": "abc123",
  "session_id": "def456",
  "status": "queued"
}

Stream Results

Subscribe to real-time updates as Tracer works:
curl -N https://apigcp.trynia.ai/v2/github/tracer/{job_id}/stream \
  -H "Authorization: Bearer $NIA_API_KEY"
Event Types:
EventDescription
startedJob started with query and repositories
tool_startTool execution beginning
tool_completeTool finished with success/failure
completeFinal report ready
errorError occurred

Get Job Status

curl https://apigcp.trynia.ai/v2/github/tracer/{job_id} \
  -H "Authorization: Bearer $NIA_API_KEY"

List Jobs

curl https://apigcp.trynia.ai/v2/github/tracer \
  -H "Authorization: Bearer $NIA_API_KEY"

MCP Integration

Tracer is available as an MCP tool. Once configured, use it in Claude Code, Cursor, or any MCP-compatible agent:
"Use Tracer to search the vercel/ai repository and explain how streaming works."

Example Use Cases

Query: “Explain why we’re getting this error from Zod and show me the validation logic causing it.”Tracer searches the Zod repo for error messages, finds the validation functions, reads the implementation, and explains exactly what triggers the error.
Query: “Find examples of how to implement cursor-based pagination in GraphQL resolvers.”Tracer searches multiple repositories, finds pagination implementations, compares approaches, and synthesizes findings.
Query: “How does React’s useEffect cleanup function work?”Tracer navigates the React codebase, finds the hooks implementation, reads the relevant code, and explains the cleanup mechanism.
AspectTracerNia Search
SpeedFast mode is quick; Deep mode is thoroughFastest (pre-indexed)
SetupNoneRequires indexing
CoverageAll public GitHubOnly indexed sources
Best forExploration, one-off queriesRepeated searches, production use
Use Tracer when:
  • Exploring unfamiliar code
  • Searching repos you haven’t indexed
  • Researching across multiple repositories
Use Nia Search when:
  • Working with familiar codebases
  • Need fast, repeated searches
  • Want precise control over search scope