Skip to main content

Configuration Guide

Overview

This guide provides detailed instructions for setting up each connection type in ZerePy. Before starting, ensure you have completed the basic installation steps from the main README.

Quick Start

  1. View available connections:

    list-connections
  2. Configure required connections:

    # LLM Provider
    configure-connection openai # or anthropic/eternalai/xai/etc.

    # Social Platform
    configure-connection twitter # or farcaster/discord/etc.

    # Blockchain
    configure-connection solana # or ethereum/sonic
  3. Load and start your agent:

    load-agent example
    start

Detailed Connection Setup

Social Platforms

Twitter/X

  1. Go to https://developer.twitter.com/en/portal/dashboard
  2. Create a new project and app if you haven't already
  3. In your app settings, enable OAuth 1.0a with read and write permissions
  4. Get your API credentials:
    • API Key (consumer key)
    • API Key Secret (consumer secret)
  5. Run:
    configure-connection twitter
  6. Follow the OAuth flow:
    • Enter your API Key and Secret
    • Visit the authorization URL provided
    • Enter the PIN code received
  7. Credentials will be saved in your .env file:
    • TWITTER_USER_ID
    • TWITTER_USERNAME
    • TWITTER_CONSUMER_KEY
    • TWITTER_CONSUMER_SECRET
    • TWITTER_ACCESS_TOKEN
    • TWITTER_ACCESS_TOKEN_SECRET

Discord

  1. Visit https://discord.com/developers/applications
  2. Create a new application
  3. Add the application to your server:
    • Go to OAuth2 → URL Generator
    • Select "bot" scope
    • Choose permissions (read messages, send messages, etc.)
    • Copy and visit the generated URL
    • Select your server and authorize
  4. Configure bot settings:
    • Go to "Bot" section
    • Click "Add Bot" or "Reset Token"
    • Enable required Gateway Intents
  5. Get the bot token from the Bot section
  6. Run:
    configure-connection discord
  7. Enter your Discord bot token
  8. The token will be saved as DISCORD_BOT_TOKEN in .env

For detailed Discord API documentation and setup guide, visit Discord REST API Guide

Farcaster

  1. Open the Warpcast mobile app
  2. Navigate to Settings:
    • Click profile picture (top left)
    • Click gear icon (top right)
  3. Click 'Advanced' then 'Reveal recovery phrase'
  4. Run:
    configure-connection farcaster
  5. Enter your Warpcast recovery phrase
  6. The phrase will be saved as FARCASTER_MNEMONIC in .env

Blockchain Networks

Solana

  1. Prepare your wallet with sufficient SOL
  2. Get your private key (in base58 format)
  3. Run:
    configure-connection solana
  4. Enter your private key when prompted
  5. The key will be saved as SOLANA_PRIVATE_KEY in .env

Sonic

  1. Prepare your wallet with sufficient $S
  2. Get your private key (in base58 format)
  3. Run:
    configure-connection sonic
  4. Enter your private key when prompted
  5. The key will be saved as SONIC_PRIVATE_KEY in .env

Ethereum

  1. Prepare your wallet with sufficient ETH
  2. Get your private key
  3. Run:
    configure-connection ethereum
  4. Enter your:
    • Private key
    • RPC URL (optional, defaults to public endpoints)
  5. Credentials will be saved in .env:
    • ETH_PRIVATE_KEY
    • ETH_RPC_URL

LLM Providers

OpenAI

  1. Visit OpenAI API Keys
  2. Create a new API key
  3. Run:
    configure-connection openai
  4. Enter your OpenAI API key
  5. The key will be saved as OPENAI_API_KEY in .env

Anthropic

  1. Go to https://console.anthropic.com/settings/keys
  2. Create a new API key
  3. Run:
    configure-connection anthropic
  4. Enter your Anthropic API key
  5. The key will be saved as ANTHROPIC_API_KEY in .env

EternalAI

  1. Go to https://eternalai.org/api
  2. Generate an API Key
  3. Note the API URL (https://api.eternalai.org/v1/)
  4. Run:
    configure-connection eternalai
  5. Enter your:
    • EternalAI API key
    • EternalAI API URL
  6. Credentials will be saved in .env:
    • ETERNALAI_API_KEY
    • ETERNALAI_API_URL

Ollama

  1. Install Ollama from https://ollama.ai/download
  2. Start the Ollama server locally
  3. Run:
    configure-connection ollama
  4. Configure base URL and model:
  5. Credentials will be saved in .env:
    • OLLAMA_BASE_URL
    • OLLAMA_MODEL

Hyperbolic

  1. Visit https://app.hyperbolic.xyz
  2. Log in and verify your email
  3. Generate an API key
  4. Run:
    configure-connection hyperbolic
  5. Enter your Hyperbolic API key
  6. The key will be saved as HYPERBOLIC_API_KEY in .env

Allora

  1. Visit https://developer.upshot.xyz/signin
  2. Create an account or log in via Google
  3. Generate an API key
  4. Run:
    configure-connection allora
  5. Enter your Allora API key
  6. The key will be saved as ALLORA_API_KEY in .env

Galadriel

  1. Visit https://dashboard.galadriel.com/
  2. Create an account and verify your email
  3. Create a new API key
  4. Copy the API key
  5. Run:
    configure-connection galadriel
  6. Enter your Galadriel API key
  7. The key will be saved as GALADRIEL_API_KEY in .env

Agent Configuration

  1. Create or modify your agent configuration file in the agents directory
  2. Set the default agent in agents/general.json:
    {
    "default_agent": "your_agent_name"
    }
  3. Load your agent:
    load-agent your_agent_name

Verification

  1. Check connection status:

    list-connections

    Look for ✅ indicators showing successful configuration

  2. List available actions:

    list-actions <connection-name>

    This will show all available actions for the specified connection

Troubleshooting

  • If a connection shows as not configured (❌):

    1. Verify your credentials in .env
    2. Try reconfiguring the connection
    3. Check the logs for specific error messages
  • For API-related issues:

    1. Verify API key validity
    2. Check rate limits
    3. Ensure your account has necessary permissions
  • For agent issues:

    1. Validate your agent configuration file
    2. Ensure all required fields are present
    3. Check that referenced connections are properly configured

Security Notes

  • All API keys and credentials are stored in your local .env file
  • Never commit the .env file to version control
  • Regularly rotate your API keys following security best practices
  • Use appropriate network security measures when deploying in production

Next Steps

After configuring your connections:

  1. Test individual actions using agent-action
  2. Start the agent loop with start
  3. Monitor the agent's behavior
  4. Adjust configuration as needed

For more information on creating and customizing agents, refer to the agent creation guide.