RepoHyperbolicHyperbolicpublished Dec 15, 2024seen 5d

HyperbolicLabs/Hyperbolic-AgentKit

Python

Open original ↗

Captured source

source ↗

HyperbolicLabs/Hyperbolic-AgentKit

Language: Python

License: MIT

Stars: 111

Forks: 60

Open issues: 19

Created: 2024-12-15T22:08:48Z

Pushed: 2025-04-03T06:41:17Z

Default branch: master

Fork: no

Archived: no

README:

Hyperbolic's Agent Framework

This repository is inspired by and modified from Coinbase's CDP Agentkit. We extend our gratitude to the Coinbase Developer Platform team for their original work. For the voice agent, we extend the work of langchain-ai/react-voice-agent.

We recommend reading this entire README before running the application or developing new tools, as many of your questions will be answered here.

Features

This template demonstrates a chatbot with the following capabilities:

Compute Operations (via Hyperbolic):

  • Connect Ethereum wallet address to Hyperbolic account
  • Rent GPU compute resources
  • Terminate GPU instances
  • Check GPU availability
  • Monitor GPU status
  • Query billing history
  • SSH access to GPU machines
  • Run command line tools on remote GPU machines

Blockchain Operations (via CDP):

  • Deploy tokens (ERC-20 & NFTs)
  • Manage wallets
  • Execute transactions
  • Interact with smart contracts

Twitter Operations:

  • Get X account info
  • Get User ID from username
  • Get an account's recent tweets
  • Post tweet
  • Delete tweet
  • Reply to tweet and check reply status
  • Retweet a tweet and check retweet status

Additional Tools:

  • Podcast Agent: Tools for video processing and transcription
  • podcast_agent/aiagenteditor.py: Trim video files using Gemini and ffmpeg
  • podcast_agent/geminivideo.py: Transcribe video files using Gemini

Knowledge Base Integrations:

  • Twitter Knowledge Base: Scrapes tweets from KOLs for informed X posting
  • Podcast Knowledge Base: Uses podcast transcripts for accurate Q&A

Writing Agent

The Writing Agent is a powerful LLM-powered tool that creates high-quality, well-researched articles using Claude. Key capabilities include:

  • Content Generation: Generate well-researched articles on any topic with configurable length and style
  • Style Emulation:
  • Analyze and emulate writing styles from reference documents (PDF format)
  • Learn from multiple reference documents simultaneously
  • Maintain consistent tone and writing patterns while creating new content
  • Web Research:
  • Conduct thorough research using Tavily API
  • Automatically cite sources in APA format
  • Include relevant quotes and statistics from sources
  • Generate a properly formatted references section
  • Document Processing:
  • Support for PDF files with automatic text extraction
  • Smart handling of document formatting and spacing
  • Process multiple reference documents in a single session

Configuration:

  • Place reference documents in writing_agent/reference_docs/
  • Required API keys:
  • ANTHROPIC_API_KEY: For Claude content generation
  • TAVILY_API_KEY: For web research
  • Default parameters:
  • Target length: 1500 words
  • Model: Claude 3.5 Sonnet
  • Citation style: APA format (currently the only supported format)

Prerequisites

1. System Requirements

  • Operating System: macOS or Linux (Windows has not been tested)
  • Python 3.12 (required)
  • Node.js 18+ (for web interface)
  • Git

2. API Keys and Configuration

  • Core API Keys (Required)
  • Anthropic
  • Get API key from Anthropic Portal
  • OpenAI (Required only for voice agent)
  • Get API key from OpenAI Portal
  • CDP
  • Sign up at CDP Portal
  • Hyperbolic (Required for compute tools)
  • Sign up at Hyperbolic Portal
  • Navigate to Settings to generate API key, this is also where you configure ssh access with your RSA public key
  • Optional Integrations
  • X (Twitter) API Access
  • Create a developer account at Twitter Developer Portal
  • Required credentials: API Key/Secret, Access Token/Secret, Bearer Token, Client ID/Secret
  • Web Search:
  • Tavily API key (Required for Writing Agent as well as core tool capabilities)
  • Sign up at Tavily
  • Google Cloud (for Podcast Agent/Gemini)
  • Create a service account and download key as eaccservicekey.json into the project root
  • LangChain: Endpoint, API key, and project name

3. Crypto Setup for GPU Compute

To pay for Hyperbolic's GPU compute using crypto:

1. Have an Ethereum wallet with funds on Base network 2. Connect your wallet:

Prompt the agent: "connect my wallet 0xYOUR_WALLET_ADDRESS to Hyperbolic"

3. Send funds:

  • Supported tokens: USDC, USDT, or DAI on Base network
  • Send to: 0xd3cB24E0Ba20865C530831C85Bd6EbC25f6f3B60

4. Start computing:

  • Funds will be available immediately
  • Use the agent to rent and manage GPU resources

Installation Steps

1. Clone the Repository

git clone https://github.com/yourusername/Hyperbolic-AgentKit.git
cd Hyperbolic-AgentKit

2. Python Environment Setup

Using Poetry (Recommended):

# Install Poetry if you haven't
curl -sSL https://install.python-poetry.org | python3 -

# Set up the environment
poetry env use python3.12
poetry install

Browser Automation

  • Install Playwright browsers after installing dependencies:
poetry run playwright install

3. Environment Configuration

# Copy and edit the environment file
cp .env.example .env
nano .env # or use any text editor

API Keys The .env.example file contains all possible configurations. Required fields depend on which features you want to use and are specified in the file.

4. Character Configuration

The template.json file allows you to customize your AI agent's personality and communication style. Duplicate the file and edit the fields to define:

  • Agent's name, twitter account info, and description
  • Personality traits
  • Communication style, tone, and examples
  • Background lore and expertise
  • KOL list for automated interaction

5. Additional Setup

  • Browser Automation (if using browser tools):
poetry run playwright install # or: playwright install
  • SSH Key (for GPU compute):
  • Ensure you have an RSA key at ~/.ssh/id_rsa or configure SSH_PRIVATE_KEY_PATH
  • Only RSA keys are supported for now
  • In order to generate an RSA key, run `ssh-keygen -t rsa…

Excerpt shown — open the source for the full document.

Notability

notability 5.0/10

New agent kit with 111 stars, modest traction