Superior AI Agents Implementation Guide

This guide will walk you through implementing your own autonomous trading and marketing agent. Everything needed to get started can be found in our open source Github repo here: https://github.com/SuperiorAgents/superior-agents

Why Use Superior Agents?

Key Capabilities

  • Research: Analyze market trends, tokenomics, and narratives.

  • Strategy Formulation: Make intelligent, data-backed investment decisions.

  • Automated Trading: Buy and sell crypto assets autonomously.

  • Marketing & Promotion: Market holdings to increase assets under management (AUM).

  • Promote (or FUD): Influence market sentiment to their advantage.

  • Assess their own performance: Measure profitability and adapt.

  • Self-improve daily: Learn from successes and failures, refining strategies over time.

Benefits

  • Autonomous Operation: The agent handles both trading and marketing functions without manual intervention.

  • Flexibility: Customize agent behavior using configuration JSON files.

  • Robust Integration: Interact with Ethereum smart contracts via ABI files and connect with various external APIs.

  • Containerized Deployment: Docker support simplifies the deployment and management of the agent in different environments.

How to Implement Superior Agent

Follow these steps to set up and run the Superior Agent framework.

1. Installation Prerequisites


2. Agent-Side Setup

a. Create and Activate a Python Virtual Environment

b. Install Agent Dependencies

c. Configure Environment Variables

  1. Copy the example environment file:

  2. Open the .env file and configure your settings (API keys, private keys, etc.).


3. ABI Files (Optional for Trading Functionality)

If you plan to use trading functionality, ensure you have the following ABI files:

  • erc_20_abi.json

  • uniswap_router_abi.json

File Structure

Place these files in the following directory structure:

Why They Are Needed:

  • Contract Interaction: To decode smart contract functions and events.

  • Trading Operations: To read token balances, execute trades, monitor transactions, and manage liquidity positions.


4. Configuration JSON Files

The marketing.json and trading.json files located in the agent/starter/ directory are used to define the default prompts and behaviors for the agents.

Customization options include:

  • Agent Identification: Set a unique agent_id for tracking and management

  • Model Selection: Choose the AI model (e.g., "claude") for generating strategies

  • Role Definition: Define the agent's role and persona

  • Time Horizon: Set the duration for strategy execution

  • Metric Goals: Specify the key performance metric (e.g., "followers" or "wallet")

  • Research Tools: List available APIs and research resources

  • Prompts: Detailed, customizable prompt templates for:

    • System initialization

    • Strategy generation

    • Code implementation

    • Error handling and code regeneration

These JSON files provide a flexible configuration mechanism to control agent behavior without changing the core code.


5. Python Server-Side Setup

a. Create and Activate a Python Virtual Environment

b. Install Dependencies

c. Configure the Environment

  1. Copy the example environment file:

  2. Update the .env file with the necessary variables:

d. Initialize the Database


6. Quick Start

a. Run the Agent Docker Container

b. Run the Python Server (FastAPI Backend)

You have two options to start the backend. For example, using Uvicorn:

c. Run the Agent Scripts

For the Trading Bot:

For the Marketing Bot:


7. Additional Resources

  • Python Server API Documentation: Detailed API documentation is available in the /api_db directory.

  • Notification Scraper (Optional): A notification service is provided to aggregate data from multiple sources for the agents. Refer to the /notification directory for documentation.

Support

Last updated