Skip to main content
1

Search Package Source Code (No indexing required!)

Ask your coding agent: “Use package search to find how error handling is implemented in the requests Python library” or “Search the numpy package for array manipulation examples”
2

Index Documentation, Repositories, or Research Papers

Try indexing public documentation, a repository, or research papers:
3

Monitor Progress and Explore

Check your indexed resources using manage_resource:
  • “List my resources” or “Check the status of my indexing jobs”
  • Visit app.trynia.ai to see all your indexed content

Available Tools

Package Search (No indexing!)

  • nia_package_search_grep - Regex-based code search in 3,000+ packages
  • nia_package_search_hybrid - AI-powered semantic package search
  • nia_package_search_read_file - Read specific file sections
  • Supports: PyPI, NPM, Crates.io, Go modules

Universal Indexing

  • index - Universal indexing tool (auto-detects repos, docs, or research papers from URL)
  • get_github_file_tree - Get GitHub file structure without indexing
  • Supports: GitHub repos, documentation sites, arXiv papers

Universal Search

  • search - Unified search across all indexed repos, docs, and papers
  • code_grep - Regex search in indexed repository code

Documentation Navigation

  • doc_tree - Get docs tree structure
  • doc_ls - List docs directory contents
  • doc_read - Read docs page by virtual path
  • doc_grep - Regex search in docs

Resource Management

  • manage_resource - Unified tool for all resource operations (list, status, rename, delete)

Web Search & Research

  • nia_web_search - AI-powered search for repos, docs, and content
  • nia_deep_research_agent - Deep multi-step research and analysis

Context Management

  • context - Unified context management (save, list, retrieve, search, update, delete)

Development Tools

  • read_source_content - Read full content of specific sources
  • nia_bug_report - Submit feedback directly to the development team

Complete Tool Reference

nia_package_search_grep

Regex-based deterministic code search across packages from PyPI, NPM, Crates.io, and Go modules.Parameters:
  • registry (str): One of “py_pi”, “npm”, “crates_io”, “golang_proxy”
  • package_name (str): Package name (for Go: “org/repo” format)
  • pattern (str): Regex pattern to search for
  • version (str, optional): Specific package version
  • language (str, optional): Filter by programming language
  • output_mode (str): “content” (default), “files_with_matches”, “count”
Best for: Finding specific code patterns, function definitions, API usage examples.

nia_package_search_hybrid

AI-powered semantic search combined with optional regex filtering.Parameters:
  • registry (str): Package registry
  • package_name (str): Package name
  • semantic_queries (List[str]): 1-5 natural language questions
  • pattern (str, optional): Regex pre-filter
  • version (str, optional): Specific version
Best for: Understanding implementation patterns, finding usage examples, exploring architecture.

nia_package_search_read_file

Read exact lines from a package source file using its SHA256 hash.Parameters:
  • registry (str): Package registry
  • package_name (str): Package name
  • filename_sha256 (str): File hash from search results
  • start_line (int): Starting line (1-based)
  • end_line (int): Ending line (max 200 lines)
Best for: Getting complete context around code snippets found in searches.

index

Universal indexing tool that intelligently detects and indexes GitHub repositories, documentation, or research papers.Auto-Detection:
  • GitHub URLs (containing “github.com”) → Repository indexing
  • arXiv URLs (containing “arxiv.org”) → Research paper indexing
  • All other URLs → Documentation indexing
Parameters:
  • url (str, required): GitHub repository URL, documentation site URL, or arXiv ID/URL
  • resource_type (str, optional): Override auto-detection - “repository”, “documentation”, or “research_paper”
Repository-specific:
  • branch (str, optional): Branch to index (defaults to main branch)
Documentation-specific:
  • url_patterns (List[str], optional): URL patterns to include in crawling
  • exclude_patterns (List[str], optional): URL patterns to exclude from crawling
  • only_main_content (bool, default=True): Extract main content only, skip nav/footer
  • check_llms_txt (bool, default=True): Check for /llms.txt file
  • llms_txt_strategy (str, default=“prefer”): Strategy for handling llms.txt - “prefer”, “only”, or “ignore”
  • wait_for (int, optional): Wait time in milliseconds for dynamic content to load
  • include_screenshot (bool, optional): Capture screenshots of pages
  • max_age (int, optional): Cache max age in seconds
Usage: Monitor progress with manage_resource action “status”Examples:
# Index a repository (auto-detected)
index("https://github.com/owner/repo", branch="main")

# Index documentation (auto-detected)
index("https://docs.example.com", url_patterns=["*/api/*"])

# Index a research paper from arXiv
index("https://arxiv.org/abs/2401.12345")

get_github_file_tree

Get file and folder structure directly from GitHub API without indexing.Parameters:
  • repository (str, required): Repository identifier (owner/repo format)
  • branch (str, optional): Branch name (defaults to repository’s default branch)
  • include_paths (List[str], optional): Only show files in these paths
  • exclude_paths (List[str], optional): Hide files in these paths
  • file_extensions (List[str], optional): Only show these file types
  • exclude_extensions (List[str], optional): Hide these file types
  • show_full_paths (bool, default=False): Show full paths instead of tree structure
Best for: Quick repository exploration without indexing overhead.
Unified search across all indexed repositories, documentation, and research papers. Omit sources for universal hybrid search.Parameters:
  • query (str, required): Natural language search question
  • repositories (List[str], optional): List of repositories to search (owner/repo format). Auto-detected if omitted
  • data_sources (List[str], optional): Documentation/research paper sources. Accepts flexible identifiers: UUID, display_name, URL, or arXiv abs/pdf URL. Auto-detected if omitted
  • search_mode (str, default=“unified”): Search scope - “unified”, “repositories”, or “sources”
  • include_sources (bool, default=True): Include source code/document snippets
Returns: AI-analyzed results with code snippets and explanations.Best for: Searching across your indexed knowledge base with natural language.

code_grep

Regex search in indexed repository code. Exhaustive full-scan search.Parameters:
  • repository (str, required): Repository identifier (owner/repo format)
  • pattern (str, required): Regex pattern to search for
  • path (str, default=""): Path prefix to limit search scope
  • case_sensitive (bool, default=False): Case-sensitive matching
  • fixed_string (bool, default=False): Treat pattern as literal string
  • whole_word (bool, default=False): Match whole words only
  • context_lines (int, optional): Number of context lines around matches
  • A (int, optional): Lines to show after each match
  • B (int, optional): Lines to show before each match
  • max_matches_per_file (int, default=10): Per-file match limit
  • max_total_matches (int, default=100): Total match limit
  • output_mode (str, default=“content”): “content”, “files_with_matches”, or “count”
  • highlight (bool, default=False): Highlight matches in output
  • exhaustive (bool, default=True): Full scan (True) or BM25 pre-filter (False)
Best for: Finding exact code patterns, function definitions, specific syntax in repos.

doc_tree

Get the full tree structure of indexed documentation.Parameters:
  • source_identifier (str, required): Documentation identifier (UUID, display_name, or URL)
Returns: Hierarchical tree structure of all pages in the documentation.

doc_ls

List contents of a directory in indexed documentation.Parameters:
  • source_identifier (str, required): Documentation identifier (UUID, display_name, or URL)
  • path (str, default=”/”): Virtual path to list
Returns: List of files and directories at the specified path.

doc_read

Read a specific documentation page by its virtual path.Parameters:
  • source_identifier (str, required): Documentation identifier (UUID, display_name, or URL)
  • path (str, required): Virtual path to the page
  • line_start (int, optional): Starting line number
  • line_end (int, optional): Ending line number
  • max_length (int, optional): Maximum characters to return
Returns: Full content of the documentation page.

doc_grep

Regex search across indexed documentation.Parameters:
  • source_identifier (str, required): Documentation identifier (UUID, display_name, or URL)
  • pattern (str, required): Regex pattern to search for
  • path (str, default=”/”): Path prefix to limit search scope
  • case_sensitive (bool, default=False): Case-sensitive matching
  • fixed_string (bool, default=False): Treat pattern as literal string
  • whole_word (bool, default=False): Match whole words only
  • context_lines (int, optional): Number of context lines around matches
  • A (int, optional): Lines to show after each match
  • B (int, optional): Lines to show before each match
  • max_matches_per_file (int, default=10): Per-file match limit
  • max_total_matches (int, default=100): Total match limit
  • output_mode (str, default=“content”): “content”, “files_with_matches”, or “count”
  • highlight (bool, default=False): Highlight matches in output
Best for: Finding specific terms, patterns, or code examples in documentation.

manage_resource

Unified resource management tool for repositories, documentation, and research papers.Actions:

Action: “list”

List all indexed resources with their status.Parameters:
  • action (str, required): “list”
  • resource_type (str, optional): Filter by “repository”, “documentation”, “research_paper”, or None for all
  • query (str, optional): Text filter (matches repo/display_name/url/title/id)
  • limit (int, default=10): Maximum items to return per section (1-100)
  • offset (int, default=0): Pagination offset
  • view (str, default=“auto”): Output detail level - “auto”, “summary”, “compact”, “detailed”
  • show_all (bool, default=False): Ignore limit/offset and show all matches

Action: “status”

Check indexing progress and status of any resource.Parameters:
  • action (str, required): “status”
  • resource_type (str, required): “repository”, “documentation”, or “research_paper”
  • identifier (str, required): Repository name (owner/repo), documentation UUID/URL, or paper identifier

Action: “rename”

Rename a resource for better organization.Parameters:
  • action (str, required): “rename”
  • resource_type (str, required): “repository”, “documentation”, or “research_paper”
  • identifier (str, required): Resource identifier (owner/repo or UUID/URL)
  • new_name (str, required): New display name (1-100 characters)

Action: “delete”

Remove an indexed resource.Parameters:
  • action (str, required): “delete”
  • resource_type (str, required): “repository”, “documentation”, or “research_paper”
  • identifier (str, required): Resource identifier (owner/repo or UUID/URL)
Identifier Formats:
  • For repositories: owner/repo format (e.g., “facebook/react”)
  • For documentation: UUID preferred, also supports display name or URL
  • For research papers: UUID or arXiv abs/pdf URL
AI-powered search for discovering repositories, documentation, and content.Use Cases: Finding specific repos/docs, trending technologies, similar contentParameters:
  • query (str, required): Natural language search query
  • num_results (int, default=5): Number of results (max: 10)
  • category (str, optional): Filter by type - “github”, “company”, “research paper”, “news”, “tweet”, “pdf”
  • days_back (int, optional): Recency filter - only return content from last N days
  • find_similar_to (str, optional): URL to find similar content for

nia_deep_research_agent

Comprehensive multi-step research and analysis.Use Cases: Comparative analysis, pros/cons evaluation, technology selectionParameters:
  • query (str, required): Research question
  • output_format (str, optional): Structure hint (e.g., “comparison table”)
Tool Selection Guide:
  • Use nia_web_search for: Simple discovery, finding specific items
  • Use nia_deep_research_agent for: Complex analysis, comparisons, evaluations

context

Unified context management tool for saving, retrieving, and managing conversation contexts across agents.Actions:

Action: “save”

Save conversation context for later retrieval.Parameters:
  • action (str, required): “save”
  • title (str, required): Descriptive title
  • summary (str, required): Brief summary (10-1000 chars)
  • content (str, required): Full conversation context (minimum 50 chars)
  • agent_source (str, required): Which agent created this (e.g., “cursor”, “claude-code”)
  • tags (List[str], optional): Searchable tags
  • metadata (dict, optional): File paths, repositories discussed, etc.
  • nia_references (dict, optional): Structured data about NIA resources used
  • edited_files (List[dict], optional): Files modified during conversation
  • workspace_override (str, optional): Custom workspace name

Action: “list”

List saved contexts with optional filtering.Parameters:
  • action (str, required): “list”
  • limit (int, default=20): Number of contexts to return (1-100)
  • offset (int, default=0): Number of contexts to skip (pagination)
  • scope (str, optional): “auto” (smart relevance), “all”, “workspace”, “directory”
  • workspace (str, optional): Filter by workspace/project name
  • directory (str, optional): Filter by directory path
  • file_overlap (List[str], optional): Find contexts with overlapping files

Action: “retrieve”

Get full context by ID.Parameters:
  • action (str, required): “retrieve”
  • context_id (str, required): Unique context ID

Action: “search”

Search contexts by keyword (basic keyword matching).Parameters:
  • action (str, required): “search”
  • query (str, required): Search query (matches title, summary, content, tags)
  • limit (int, default=20): Maximum results (1-100)

Action: “semantic-search”

Search contexts using AI-powered semantic understanding.Parameters:
  • action (str, required): “semantic-search”
  • query (str, required): Natural language search query
  • limit (int, default=20): Maximum results (1-100)

Action: “keyword-search”

Search contexts using exact keyword matching.Parameters:
  • action (str, required): “keyword-search”
  • query (str, required): Keywords to search for
  • limit (int, default=20): Maximum results (1-100)

Action: “update”

Update existing context.Parameters:
  • action (str, required): “update”
  • context_id (str, required): Context ID to update
  • title (str, optional): Updated title
  • summary (str, optional): Updated summary
  • content (str, optional): Updated content
  • tags (List[str], optional): Updated tags
  • metadata (dict, optional): Updated metadata

Action: “delete”

Delete a context.Parameters:
  • action (str, required): “delete”
  • context_id (str, required): Context ID to delete

read_source_content

Read full content of specific sources found in search results.Parameters:
  • source_type (str, required): “repository” or “documentation”
  • source_identifier (str, required): Source path or URL
  • metadata (dict, optional): Additional context from search results

nia_bug_report

Submit feedback, bug reports, or feature requests directly to the development team.Parameters:
  • description (str, required): Detailed description (10-5000 chars)
  • bug_type (str, default=“bug”): “bug”, “feature-request”, “improvement”, “other”
  • additional_context (str, optional): Extra details

Need Help? Join our community or reach out through app.trynia.ai for support and updates.