BeraXTB (Tech Specification)

An example of how BeraXBT (an AGIXBT agent for the Berachain ecosystem) would look and function.

User: Hey, @berathebot what’s new with the Bera ecosystem?

Bot: Hey fellow Bera! Things have been moving well. We have a new perpetual DEX soon launching on Berachain, and another NFT collection launched by @liquidmint. All in all, I’d say things are looking good! You can check the product links mentioned for more information.

Overview

The AGI agent @BeraXBT will be responsible for monitoring and maintaining awareness of all current activities within the Berachain ecosystem, including:

  • New alpha related to ecosystem projects

  • Product launches

  • Commentary from Berachain Key Opinion Leaders (KOLs) on Twitter

  • Community events

  • Twitter Spaces discussions

Core Actions

  1. Tweet Generation

    • The bot will tweet updates every X minutes

    • Content is generated from timestamp-specific datasets

  2. Mention Responses

    • Responds to user questions and @mentions

    • Handles technical questions about Berachain’s consensus

    • Adapts responses to match community communication style

    • Examples include factual responses or community-specific phrases like “Ooga Booga” or “Gud Bera”

  3. KOL Interaction

    • Monitors tweets for high engagement metrics

    • Generates contextual responses based on available dataset

Architecture

We’ll utilize our proprietary framework to handle Twitter integration and core functionality out of the box. The system will scrape Twitter data from various KOLs and ecosystem projects, organize it by timestamp and tags, and dynamically feed it to the Language Model (LLM).

Data Ingestion Service

This service handles two primary functions:

  1. Real-time Twitter data scraping

  2. LLM context provisioning

For technical questions and mentions, we’ll initially use hardcoded documentation data as a reference source. This can be made dynamic in future milestones.

Twitter Data Scraper

Twitter data forms the core context for our LLM, especially given the extensive on-chain testnet data available for Bera and related tokens.

interface TwitterBeraData {
  // Core tweet data
  tillTimestamp: Date;
  tweetId: string;
  handle: string;
  content: string;
  url: string;

  // Source classification
  sourceType: 'kol' | 'ecosystem-project' | 'core-team' | 'random' | 'bera-baddie';
  isKnownEcosystemProject?: {
    is: boolean,
    name: string,
    hasWebsite?: string
  }; 
  
  // Content categorization - processed by secondary LLM
  tags: {
    // Primary categories
    alpha: boolean;       // New insights/opportunities
    technical: boolean;   // Technical updates/changes
    marketing: boolean;   // Marketing initiatives
    governance: boolean;  // Governance proposals

    // Community tags
    meme: boolean;        // Meme content
    education: boolean;   // Educational resources
    announcement: boolean; // Official announcements
    partnership: boolean; // Partnership updates
  };

  // Engagement metrics
  engagement: {
    likes: number;
    retweets: number;
    replies: number;
    quotes: number;
  };

  // Metadata
  language: string;
  hasMedia: boolean;
  isReply: boolean;
  isQuote: boolean;

  // Processing metadata
  processed: boolean;
  llmSentiment?: 'positive' | 'neutral' | 'negative';
  llmSummary?: string;
}

// Query parameters interface
interface QueryParams {
  startTime: Date;
  endTime: Date;
  tags?: string[];
  sourceTypes?: ('kol' | 'project' | 'team')[];
  minEngagement?: {
    likes?: number;
    retweets?: number;
  };
}

// Daily statistics interface
interface DailyStats {
  date: Date;
  totalTweets: number;
  byTag: Record<string, number>;
  topEngagement: BeraData[];
}

Data Collection Strategy

  1. Poll high-priority accounts (Bera Baddies, official projects) at configurable intervals

  2. Stream real-time updates for ecosystem hashtags (#berachain, #bartio)

  3. Store complete tweet context including thread and parent relationships

Tag Processing System

  • Implements hybrid keyword and LLM-based classification

  • Provides manual tag correction interface

  • Maintains consistent tag dictionary

  • Conducts regular effectiveness reviews

  • Tracks comprehensive engagement metrics

Implementation Example

// Example tweet data structure
const newTweet: BeraData = {
  timestamp: new Date(),
  tweetId: "1234567890",
  handle: "@berabaddie",
  content: "New Artio DEX features dropping next week! 🔥",
  url: "https://twitter.com/berabaddie/status/1234567890",
  sourceType: "kol",
  tags: {
    alpha: true,
    technical: true,
    announcement: true,
    // Additional tags defaulted to false
  },
  engagement: {
    likes: 500,
    retweets: 100,
    replies: 50,
    quotes: 10
  },
  language: "en",
  hasMedia: false,
  isReply: false,
  isQuote: false,
  processed: true
};

On-Chain Data Scraper

We’ll poll token information from the RouteScan APIs at 5-minute intervals.

type Token = {
  chainId: string;
  address: string;
  name: string;
  symbol: string;
  decimals: number;
  totalSupply: string;
  createOperation: {
    timestamp: string;
    txHash: string;
  };
  transfers: {
    last24h: number;
    last48h: number;
    last72h: number;
  };
  holdersCount: number;
}

// Activity scoring interface
type TokenActivity = {
  token: Token;
  score: number;        // Combined activity score
  transfersRank: number; // 24h transfer rank
  holdersRank: number;   // Holder count rank
};

type LatestOnChainActivity = Array<TokenActivity> & { length: 15 };

System Components

The service architecture consists of 2-3 modular components:

1. Scraper Service

  • Collects Twitter and Berachain RPC data

  • Processes data according to schema

  • Generates vector embeddings via LLM

  • Creates structured tweet data

  • Exposes external APIs

2. Plugin System

  • Fetches data from external scraper

  • Maintains continuous agent data injection

  • Supports direct scraper service coupling (POC pending)

  • Implements custom actions for targeted context retrieval

3. Core Agent

  • Handles plugin initialization

  • Manages technical context

  • Controls bot behavior and personality

References