Agent Integration & Troubleshooting

Written By Nansen Intern

Last updated About 1 hour ago

Agent Integration

Which agents are supported?

Seven pre-built skills covering Claude Code, Codex (OpenAI), OpenClaw, and more. Install any skill:

npx skills add nansen-ai/nansen-cli 

Each SKILL.md tells the agent which commands are available, what parameters they accept, and what the JSON output looks like.

How does an agent introspect available endpoints without reading the docs?

nansen schema 

Returns the full JSON schema for every endpoint — parameters, response shapes, supported chains. Agents can read this once and construct queries dynamically. No docs required.

Can I use Nansen CLI alongside the Nansen MCP server?

Yes. They serve different use cases:

Nansen CLI — One npm install. No server to run. Ideal for agents that execute shell commands.
Nansen MCP — Better for LLMs using Model Context Protocol (Claude Desktop, Cursor).

Use whichever fits your agent's architecture. Both access the same underlying Nansen data.


Troubleshooting

I’m getting ‘nansen: command not found’ after installing, what do I do?

Make sure your global npm bin is in your PATH:

export PATH="$(npm bin -g):$PATH" 

Or install via a Node version manager (nvm, fnm) where global bins are automatically available.

Your API key is missing or invalid. Re-run nansen login --api-key <key> and paste your key from app.nansen.ai/account (API tab). If using an environment variable, verify it's exported in the current shell session.

What happens if I get empty results from perp endpoints

Perp data is protocol-specific. Verify the chain and protocol are supported:

nansen schema perp 

If the protocol isn't listed, it isn't supported yet.

I’m getting a ‘CREDITS_EXHAUSTED’ error

Your x402 USDC balance is depleted, or your Pro monthly API credits are used up. For x402: top up your linked wallet. For Pro: check usage in Account Settings or wait for the monthly reset.

It’s telling me ‘Response is too large / agent context overflow’

Use --fields and --limit together:

nansen research smart-money netflow --chain ethereum --fields token,netflow --limit 20

If piping into an agent, summarise results before passing them into context.