Here are some tips on how to use Nia effectively and some tricks to get better results. Ask your agent to use Nia as many times as you want and also leverage the read_source_content tool because each search tool outputs links where it found information from. Then the read_source_content tool can pick up those links and check the whole webpage or GitHub file to get the entire content if needed.

2. Use package search when you need information about any package

Enable your AI agents to search the source code of your package dependencies.

Grep Search

Execute grep across the source code of a public package

Hybrid Search

Search package source using regex or semantic understanding

File Reading

Read exact lines from a source file
Example queries:
  • In numpy, what environment variables or compile-time flags switch kernels, and how do you plug in a custom inner loop?
  • How do I stream responses with AI SDK? Use package search.
  • Search PostHog and tell me how do they handle analytics and usage monitoring.

3. When you start a new chat with an agent

Ask it to list docs/repos first so it can output everything you have indexed, otherwise it won’t have enough context about what it has.