Skip to main content

Creating Your Naptha User Account

What is a Naptha User Account?

Your Naptha account is your identity on the Naptha platform. It allows you to:

  • Deploy and run agents, tools, environments and other modules on Naptha Nodes
  • Access and interact with the Naptha Hub's features and services

Identity verification with Naptha Nodes is performed using private/public keypairs. Identity verification with the Naptha Hub is performed through a username and password.

This guide will walk you through the process of creating your first Naptha user account step by step.

1. Getting Started

Set up a Virtual Environment

It is good practice to install the SDK in a dedicated virtual environment. We recommend using Poetry to manage your dependencies.

Install Poetry

Learn more about Poetry in their official docs.

Install pipx (or you can use pip instead) and run this command:

pipx install poetry

Verify the installation:

poetry --version

Create a new poetry virtual environment:

poetry new test-env
source .venv/bin/activate
pip install naptha-sdk

You can also use in-built Python virtual environments:

python -m venv test-env
source test-env/bin/activate

Install the SDK

You can install the Naptha SDK using:

pip install naptha-sdk

2. Creating Your Account

You have two methods to choose from:

The simplest way to create a new account is through the interactive CLI. Run the following command:

naptha signup
info

This command will prompt you to create an account by entering a username and password. It also automatically generates a private key and stores everything in your .env file.

If successful, you should see a message like this:

Signing up user: <username> with public key: <public_key>
Your credentials have been updated in the .env file. You can now use these credentials to authenticate in future sessions.

Method 2: Pre-configured Setup

If you prefer setting credentials beforehand:

  1. Edit your .env file with your desired credentials:

    # .env file
    HUB_USERNAME=your_username
    HUB_PASSWORD=your_password
    PRIVATE_KEY=your_private_key # Optional - will be generated if not provided
  2. Run signup:

    naptha signup

3. Configure an .env file

Configure NODE_URL

Choose whether you want to interact with a local or hosted Naptha node.

Local Node

For a local node, set NODE_URL=http://localhost:7001 in the .env file.

Hosted Node

To use a hosted node, set NODE_URL=https://node.naptha.ai or NODE_URL=https://node1.naptha.ai in the .env file.

4. Best Practices

Security

  • Protect Your Private Key

    • Never share your private key
    • Back up your .env file
    • Use environment variables in production
  • Password Guidelines

    • Use strong passwords (12+ characters)
    • Mix uppercase, lowercase, numbers, symbols
    • Avoid common words or patterns

Maintenance

  • Keep the SDK updated by fetching the latest version from GitHub or PyPI
  • Review registered agents periodically

5. Troubleshooting

Connection Issues

If you're having trouble connecting:

  1. Check your node URL in .env:

    # Local node
    NODE_URL=http://localhost:7001

    # Hosted node
    NODE_URL=https://node.naptha.ai
  2. Check your hub URL in .env:

    # Hosted hub
    HUB_URL=wss://hub.naptha.ai
  3. Verify credentials:

    cat .env
Authentication Issues

If you're having trouble authenticating:

  1. Ensure correct credentials in .env

  2. Try creating a new account with a different username and password and re-run the signup command:

    naptha signup

Next Steps

Once your account is set up, you can:

  1. Explore available agents:
naptha agents
  1. Run some existing agents:
naptha run agent:hello_world_agent -p "firstname=sam surname=altman"
info

Need Help?