Overview
Hyperbolic AgentKit supports three primary modes of operation:- Interactive Chat Mode - Terminal-based conversation interface
- Voice Agent Mode - Web-based voice interaction
- Twitter Automation - Autonomous social media engagement
Interactive Chat Mode
The terminal interface provides direct text-based interaction with your agent.Starting Chat Mode
Configure Knowledge Bases
The agent will prompt you to initialize knowledge bases:If you select yes, you’ll have options to:
- Clear existing knowledge base
- Update with new KOL tweets
Knowledge bases enhance your agent’s contextual awareness. See the Working with Knowledge Bases guide for details.
Using Chat Mode
Fromchatbot.py:677-726, the chat mode supports:
Available Commands
- exit - Terminate the chat session
- status - Verify agent responsiveness
- Any natural language prompt to utilize agent tools
Example Session
Voice Agent Mode
The voice agent provides a web-based interface with real-time voice interaction.Architecture
Fromserver/src/server/app.py:83-88, the voice agent uses:
- Model:
gpt-4o-realtime-previeworgpt-4o-mini-realtime-preview - Protocol: WebSocket for real-time communication
- Voice Options: alloy, ash, ballad, coral, echo, sage, shimmer, verse
Starting Voice Agent
Voice Agent Features
The voice agent implementation inserver/src/server/app.py:36-92 includes:
- Connection Limiting: Maximum 10 concurrent connections per instance
- Character Integration: Uses same character configuration as chat mode
- Tool Access: Full access to registered agent tools
- Real-time Streaming: Low-latency voice interaction
Character-Specific Voice Endpoints
You can run multiple voice agents with different characters:server/src/server/app.py:36-41
Gradio Web Interface
An alternative web interface using Gradio:http://localhost:7860
This provides a simple text-based web chat interface without voice capabilities.
Twitter Automation Mode
Autonomous mode enables your agent to independently interact on Twitter/X.Capabilities
Fromchatbot.py:728-1002, the Twitter automation performs:
- Original Content Creation - Posts tweets based on knowledge base insights
- Mention Monitoring - Checks and responds to @mentions
- KOL Engagement - Interacts with key opinion leaders
Starting Twitter Automation
Configure Character with KOL List
Edit your character file to include KOLs to interact with:
characters/my-character.json
Automation Behavior
Fromchatbot.py:761-912, each cycle performs:
Task 1: Create Original Tweet
chatbot.py:800-856
- Ideal length: Less than 70 characters
- Maximum: 280 characters
- No emojis (unless character specifies)
- Evergreen language for podcast references
Task 2: Check and Reply to Mentions
chatbot.py:858-886
Task 3: Engage with KOLs
chatbot.py:888-912
Automation Timing
Fromtwitter_agent/twitter_state.py, the system uses:
- Runs immediately on first start
- Waits
MENTION_CHECK_INTERVALseconds between cycles - Saves state between runs to avoid duplicate replies
State Management
The Twitter automation tracks:- Last mention ID - Prevents duplicate mention processing
- Replied tweets - Stored in
twitter_state.json - Reposted tweets - Tracks retweets to avoid duplicates
- Last check time - Enforces rate limiting
Safety Features
Fromchatbot.py:989-1002, the automation includes:
- Graceful shutdown - Saves state on Ctrl+C
- Error recovery - Continues after exceptions
- State persistence - Preserves reply history
Mode Comparison
Chat Mode
Best for:
- Development and testing
- Direct agent interaction
- Tool experimentation
- Full tool access
- Detailed output
- Easy debugging
- Requires terminal access
- No voice interaction
Voice Agent
Best for:
- User demonstrations
- Natural conversations
- Accessibility
- Natural voice interaction
- Web-based interface
- Low latency
- Requires OpenAI API
- Limited to realtime models
- Connection limits
Twitter Automation
Best for:
- Social media presence
- Community engagement
- Content distribution
- Fully autonomous
- Knowledge base integration
- State persistence
- Twitter API required
- Rate limits apply
- Needs monitoring
Advanced Usage
Custom Mode Selection
You can modifychatbot.py:641-653 to add new modes:
Running Multiple Agents
You can run multiple agents simultaneously with different characters:Monitoring and Logging
Enable LangChain Tracing
For detailed execution traces:.env
Console Output
The framework provides color-coded output frombase_utils/utils.py:
- Blue - User input
- Green - AI responses
- Yellow - System messages
- Red - Errors
Troubleshooting
Agent Not Responding
Agent Not Responding
Check recursion limits in
chatbot.py:614-622:Twitter API Rate Limits
Twitter API Rate Limits
The framework handles rate limits automatically with
wait_on_rate_limit=True in twitter_agent/custom_twitter_actions.py:24-31.If you still hit limits:- Increase
MENTION_CHECK_INTERVAL - Reduce number of KOLs
- Lower
TWEETS_PER_KOLin knowledge base updates
Voice Agent Connection Issues
Voice Agent Connection Issues
From
server/src/server/app.py:48-59, check:- Maximum 10 concurrent connections per instance
- Valid OpenAI API key with realtime access
- WebSocket connection not blocked by firewall
Tool Execution Errors
Tool Execution Errors
Enable debug output:Check tool registration in
chatbot.py:624-625:Next Steps
Creating Custom Tools
Extend agent capabilities with new tools
Knowledge Bases
Enhance context with knowledge bases
Core Actions
Explore built-in agent actions
Hyperbolic Tools
Use GPU compute capabilities