ChainBrain Framework CLI v1

Quickstart guide to the OnChainBrain Framework CLI v1


Overview

The OnChainBrain Framework enables developers to create and manage intelligent agents through a command-line interface. This open-source solution integrates with the OnChainBrain API, facilitating seamless interaction with your deployed AI agents.

viceo guide on how to interact with the OCB Framework

✨ Core Features

  • Blockchain Integration: Launch intelligent agents on Solana

  • Natural Language: Communicate with agents using everyday language

  • Data Analytics: Access live blockchain metrics and statistics

  • Pattern Recognition: Monitor token movements and market trends

  • Advanced Queries: Perform sophisticated blockchain analysis

  • Data Provider: Direct integration with Bitquery for real-time data


πŸ’‘ Technical Capabilities

  • Asset Analytics: Extract detailed token information and metrics

  • Market Intelligence: Monitor market movements and trading patterns

  • Extensible Design: Build and integrate custom functionality

  • Universal Support: Works across all Node.js-supported platforms


πŸ”§ Setup Guide

System Requirements

  • Node.js version 16 or higher

  • Package manager (npm/yarn)

  • Bitquery API credentials

  • Additional requirements listed in .env.example

Setup Process

  1. Get the code:

  2. Install required packages:

  3. Configure environment: Create a .env file with these parameters:

  4. Compile the source:


πŸ“‹ Framework Commands

Agent Interaction

Example:

Market Analysis Commands

Token Trends:

Holder Analysis:

Example:

Market Metrics:

Example:

Buyer Analysis:

Example:

Trading Operations:


πŸ“š Technology Stack

Core Dependencies

Package

Version

Purpose

@solana/web3.js

^1.98.0

Solana blockchain connectivity

dotenv

^16.4.7

Environment configuration

firebase

^11.1.0

Data persistence and management

node-fetch

^3.3.2

Network request handling

openai

^4.77.3

AI processing capabilities

bs58

^6.0.0

Address encoding utilities

form-data

^4.0.1

Data structure handling

punycode

^2.3.1

Unicode processing

Development Tools

Package

Version

Purpose

typescript

^5.7.3

Type-safe development

ts-node

^10.9.2

TypeScript execution

tsconfig-paths

^4.2.0

Module resolution


βš™οΈ Available Scripts

  • npm run build: Compile TypeScript code

  • npm run interact-ocb-agent: Agent communication

  • npm run ocb-trade: Execute trading operations


πŸ” Architecture Overview

  • Data Storage: Firebase backend integration

  • Market Data: Bitquery data provider integration

  • Command Processing: Advanced query parsing system

  • Extensibility: Modular architecture design


πŸ› οΈ How to Run the OnChainBrain Framework

  1. Ensure all dependencies are installed using npm install

  2. Set up environment variables by configuring the .env file

  3. Build the project with:

  4. Interact with your agent using:

  5. Analyze blockchain data using:

  6. Execute trading operations via:

Last updated