Skip to main content
Pro Feature - Tracer is available on Pro plans.

Overview

Tracer is an autonomous sub-agent that searches code on GitHub without requiring you to index repositories first. Powered by Claude Opus 4.6 with 1M context window support, it explores codebases, reads files, and synthesizes findings into comprehensive reports. Use Tracer when you need to quickly search unfamiliar code, find implementation examples, or understand how libraries work internally.

How It Works

You provide a question and repositories to search. Tracer handles the rest:
1

Explore

Browse repository structure to understand the layout
2

Search

Find relevant code using GitHub’s Code Search API
3

Read

Analyze specific files and line ranges in detail
4

Iterate

Follow code paths as search results reveal new areas to explore
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."
  }'
Parameters:
ParameterTypeRequiredDescription
querystringYesYour research question
repositoriesstring[]NoRepositories to search (owner/repo format)
contextstringNoAdditional context to guide the agent’s focus
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
SpeedSlower (live API calls)Faster (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