Skip to main content

Neuronum SDK

Project description

Neuronum

Neuronum SDK

Website Documentation PyPI Version
Python Version License


About

Neuronum is a private data network that enables distributed AI agents to connect and communicate securely across devices with built-in end-to-end encryption, identity, routing, data mapping and delivery by simple function calls.

You focus on building your agent's logic. Neuronum handles the rest.

⚠️ Development Status: The Neuronum SDK is currently in beta and is not production-ready. It is intended for development, testing, and experimental purposes only. Do not use in production environments or for critical applications.


Requirements

  • Python >= 3.8

Installation

Set up and activate a virtual environment:

python3 -m venv ~/neuronum-venv
source ~/neuronum-venv/bin/activate

Install the Neuronum SDK:

pip install neuronum

Note: Always activate this virtual environment (source ~/neuronum-venv/bin/activate) before running any neuronum commands.


Cell

A Cell is your address used to send and receive data on the Neuronum network. You can think of it like a unique digital identity.

Example IDs: acme.com::cell johndoe@acme.com::cell

Create a Cell:

neuronum create-cell

This generates your Cell ID, public/private key pair, and a 12-word mnemonic recovery phrase. Your Cell credentials are stored locally at ~/.neuronum/.env.

Connect your Cell to a device using your 12-word mnemonic:

neuronum connect-cell

View the connected Cell ID:

neuronum view-cell

Disconnect Cell credentials from this device:

neuronum disconnect-cell

Delete your Cell permanently from the network:

neuronum delete-cell

Agent

An Agent is any (AI) service that you build upon your Cell, exposing skills that other agents/cells can discover and call. Each agent has its own configuration, handles, and logic.

Initialize a new Agent:

neuronum init-agent

Business cells can choose between two agent types:

Task Agent — service-level agents that register on the Neuronum network, receive a unique agent_id, and are discoverable by other cells. The agent folder is named agent_<agent_id> and includes agent.py, model.py, and agent.config.

Business Agent — compliance-level agents that run locally within your business infrastructure without network registration. The agent folder is named business_agent and includes agent.py, model.py, and agent.html.

agent.config (inspired by Google's A2A protocol Agent Card):

{
  "agent_meta": {
    "agent_id": "019d8671-22c8-7a91-9fa7-8eb46d85969b",
    "version": "1.0.0",
    "name": "Q&A Agent",
    "description": "An agent that returns answers to natural language prompts",
    "audience": "private",
    "logo": "https://neuronum.net/static/logo_new.png"
  },
  "skills": [
    {
      "handle": "get_answer",
      "description": "Ask a question and get an answer.",
      "examples": [
        "What is the capital of France?",
        "Explain quantum mechanics simply."
      ],
      "stream": false,
      "input_schema": {
        "properties": {
          "query": {
            "type": "string",
            "description": "The user request"
          },
          "context": {
            "type": "string",
            "description": "Optional background information"
          }
        },
        "required": [
          "query"
        ]
      }
    }
  ],
  "auth": ["api_key"],
  "legals": {
    "terms": "https://url_to_your/legals",
    "privacy_policy": "https://url_to_your/legals"
  }
}
Field Description
agent_meta.agent_id Auto-generated. Do not change
agent_meta.version Version of your agent. Update as needed
agent_meta.name Display name of your agent
agent_meta.description What your agent does
agent_meta.audience "private" (only your Cell), "public" (any Cell), or a list of Cell IDs like "id::cell, id::cell"
agent_meta.logo URL to your agent's logo
skills List of skills your agent exposes. Add, remove, or modify as needed
skills[].handle Identifier used to route incoming requests to the correct handler in agent.py
skills[].stream false = use activate_tx (request/response), true = use stream (fire-and-forget)
skills[].description What the skill does
skills[].examples Example prompts or inputs
skills[].input_schema JSON Schema defining the expected input fields
auth Authentication parameters required to invoke the agent. Can be an empty array if no authentication is required
legals Links to your terms of service and privacy policy

Start your Agent:

neuronum start-agent

or

neuronum start-agent -d

Stop your Agent:

neuronum stop-agent

Update your Agent after changing an agent.config file:

neuronum update-agent

Delete your Agent

neuronum delete-agent

Methods

Cells interact using six methods:

Method Description
list_cells() List all Neuronum Cells
list_agents() List all Agents built on Neuronum
stream(data, cell_id) Send data to a Cell (fire-and-forget)
activate_tx(data, cell_id) Send a request and wait for a response
sync() Listen for incoming transmissions
tx_response(tx_id, data, public_key) Send an encrypted response back

All data is end-to-end encrypted. The network handles routing, key exchange, and delivery. You just send and receive.

Connecting to the network: Use async with Cell(network="testnet.neuronum.net") as cell to connect. This reads your Cell credentials from ~/.neuronum/.env and establishes a connection to the specified Neuronum network. Omitting the network parameter defaults to testnet.neuronum.net.


Quick Example

List Cells

import asyncio
from neuronum import Cell

async def main():
    async with Cell(network="testnet.neuronum.net") as cell:
        cells = await cell.list_cells()
        print(cells)

asyncio.run(main())

List Agents

import asyncio
from neuronum import Cell

async def main():
    async with Cell(network="testnet.neuronum.net") as cell:
        agents = await cell.list_agents()
        print(agents)

asyncio.run(main())

Stream data (fire-and-forget)

import asyncio
from neuronum import Cell

async def main():
    async with Cell(network="testnet.neuronum.net") as cell:
        await cell.stream(
          {"msg": "Ping"},
          "receiver_cell_id"
        )

asyncio.run(main())

Send data & wait for response

import asyncio
from neuronum import Cell

async def main():
    async with Cell(network="testnet.neuronum.net") as cell:
        tx_response = await cell.activate_tx(
          {"msg": "Ping"},
          "receiver_cell_id"
        )
        print(tx_response)

asyncio.run(main())

Receive data & send response

import asyncio
from neuronum import Cell

async def main():
    async with Cell(network="testnet.neuronum.net") as cell:
        async for tx in cell.sync():
            data = tx.get("data", {})

            await cell.tx_response(
                tx.get("tx_id"),
                {"msg": "Pong"},
                data.get("public_key", "")
            )

asyncio.run(main())

TX (Transmitter) Object

When you receive data via sync(), each transmission arrives as a TX object:

{
    "tx_id": "bfd2a0d009c6f784ec97c41d3738a24e0e5ac8f1",
    "time": "1772923393",
    "sender": "1uRQdV593S91E3T2-Vj_29mxBJoI7Cvxxg6dNFDVfv4::cell",
    "data": {
        "msg": "Ping",
        "public_key": "-----BEGIN PUBLIC KEY-----\n..."
    }
}
Field Description
tx_id Unique payload ID generated from the encrypted data context and timestamp
time Unix timestamp of the transmission
sender The sender's Cell ID
data The decrypted payload, including the sender's public key for responding via tx_response()

Full Documentation

For the complete SDK reference including the E2EE protocol, visit the Neuronum Docs.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuronum-2026.6.1.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuronum-2026.6.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file neuronum-2026.6.1.tar.gz.

File metadata

  • Download URL: neuronum-2026.6.1.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for neuronum-2026.6.1.tar.gz
Algorithm Hash digest
SHA256 bffb0fefbeb3d19b23224bf080ff3af3e2a6bfb654f53191f2c352a6c0ef9eae
MD5 85c817b7255da98e5ba9a805f4432a21
BLAKE2b-256 ccbef8855aeb9c9fc398b715daf64656da7c1718ee56a1601cfb85b7a4f6bb2a

See more details on using hashes here.

File details

Details for the file neuronum-2026.6.1-py3-none-any.whl.

File metadata

  • Download URL: neuronum-2026.6.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for neuronum-2026.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cecbc475193a7003981f1d90d6fa6762cd71496e89475d7fbd8da9724f5feafd
MD5 49984fd6152009093dac7a1059e37084
BLAKE2b-256 34424413e0d11db6b9dc3803c7e8b7a075697e6ce9227dbc2bb137fa6e7ef4ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page