# peer status connectivity

> Read peer address, traffic, and ping time, plus num_peers.

peer status connectivity is a paid AI agent skill on Agensi by agent-bitcoin, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9 (one-time purchase)
- Creator: [agent-bitcoin](https://www.agensi.io/creators/agent-bitcoin)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.0
- Last updated: 2026-11-23
- Security: scan passed (2026-11-23); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/peer-status-connectivity
- Tags: api, lightning-network, bitcoin, lnd, devops

## About this skill

Lightning Network node operators often struggle to diagnose routing failures or liquidity issues without visibility into their peer health. This skill provides a direct read of peer connectivity, traffic metrics, and latency from an unlocked LND node.

### What it does
- **Peer count reporting** extracts the total number of connected peers from the node info.
- **Traffic analysis** monitors `bytes_sent`, `bytes_recv`, `sat_sent`, and `sat_recv` per peer.
- **Connection metadata** retrieves the public key, network address, and inbound/outbound status for every active connection.
- **Latency monitoring** reports the `ping_time` for each peer to identify slow or unresponsive routes.

### How it works
1. The skill attempts to fetch general node info via the `agent-bitcoin` SDK to check the connection and peer count.
2. It executes `lncli listpeers` within the specific LND container environment.
3. It parses the resulting JSON to map peer public keys to their respective data and traffic metrics.
4. It halts and notifies the user if it detects the wallet is in a locked state.

### Frameworks & tools
This skill utilizes the `agent-bitcoin` SDK and `lncli` commands inside a Dockerized LND environment. It defaults to `regtest` but supports `mainnet` through environment flag overrides.

### Why this beats prompting it yourself
Writing manual bash scripts to parse nested LND JSON is error-prone and tedious. This skill handles the container execution logic and data extraction automatically, ensuring you get a clean summary of peer health without exposing sensitive macaroons or secrets.

### Use cases
- Check node connectivity before attempting a high-value payment.
- Identify "zombie" peers with high latency or zero traffic.
- Verify that a newly added peer is successfully connected and exchanging bytes.
- Monitor inbound versus outbound peer distribution.

### Known limitations
The skill requires an unlocked LND node to function. It is restricted to read-only operations and cannot connect to new peers or modify channel states.

## Requires

- Python 3.10+
- agent-bitcoin package
- unlocked LND node
- Read-only

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the peer status connectivity skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill help me optimize my Lightning Network node's performance?

This skill provides real-time visibility into peer health, including latency (ping time) and traffic flow (bytes/sats sent and received), allowing you to identify 'zombie' nodes or slow routes that may be causing routing failures.

### What specific node environment or software is required for this skill to function?

The skill is built specifically for LND nodes managed via the agent-bitcoin SDK; it requires a Dockerized LND environment and an unlocked wallet to successfully pull peer metadata.

### Can this skill be used to automatically connect to new peers or manage channel liquidity?

No, this is a read-only diagnostic tool; it can only retrieve and report on current connectivity and traffic metrics, ensuring it cannot accidentally open channels or move funds.

### Does the peer status connectivity skill support mainnet nodes, or is it limited to test environments?

While it defaults to regtest for development safety, it fully supports mainnet operations through simple environment flag overrides within your agent configuration.

### What is included in the purchase of this AI agent skill?

You receive the specialized skill logic, integration instructions for the agent-bitcoin SDK, and a pre-configured schema for mapping LND's nested JSON output into readable peer summaries.

### What happens if the skill attempts to check status while my LND wallet is locked?

If the LND node is locked, the skill is programmed to halt immediately and notify the user rather than failing silently, preventing unnecessary API calls or errors.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
