Skip to main content
The langchain-nia package provides 20 LangChain-compatible tools that give any LangChain agent full access to Nia — a search and index API that continuously provides context from docs, research papers, datasets, codebases, and more so agents never rely on stale data.
Official LangChain partner integration built with langchain-core and the standard BaseTool / BaseToolkit interfaces. Passes all LangChain standard tests.

Features

Semantic Search

Search across indexed repos, docs, datasets, Slack, and more with natural language queries.

Source Management

Index, list, sync, read, grep, and explore any indexed source directly from your agent.

GitHub Tools

Search code, read files, glob for patterns, and browse file trees in any GitHub repository.

Context Sharing

Save and search conversation context across agents for persistent knowledge sharing.

Installation


Setup

1. Get Your API Key

Sign up at trynia.ai to get your API key, or run the wizard:

2. Set the Environment Variable

Or pass it directly in code:

Quick Start

Using the Toolkit

The NiaToolkit provides all 20 tools with a shared API client. Toggle tool groups with boolean flags:

Using Individual Tools

With a LangChain Agent


Available Tools

Search (5 tools)

Source Management (7 tools)

GitHub (4 tools)

Context & Memory (2 tools)

Dependencies (2 tools)


Async Support

All 20 tools support both synchronous and asynchronous execution:

GitHub

View source code and contribute

PyPI

Install from PyPI

LangChain Docs

LangChain tool integrations

Get API Key

Sign up for Nia API access

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