Skip to content

feat: Add autonomous vibe mode and enhance TUI with live reasoning di…#29

Open
kahmahMaxi wants to merge 1 commit intoAnimusUNO:masterfrom
kahmahMaxi:feature/enhanced-tui
Open

feat: Add autonomous vibe mode and enhance TUI with live reasoning di…#29
kahmahMaxi wants to merge 1 commit intoAnimusUNO:masterfrom
kahmahMaxi:feature/enhanced-tui

Conversation

@kahmahMaxi
Copy link
Contributor

Feature: Autonomous Vibe Mode & Enhanced TUI Reasoning Display

🎯 Overview

This PR adds autonomous vibe mode functionality and enhances the TUI with live reasoning display capabilities, allowing users to see the agent's thinking process in real-time when enabled.

✨ New Features

1. Autonomous Vibe Mode (/vibe command)

  • Background Process: Runs autonomously in the background, sending configurable prompts to the agent at scheduled intervals
  • Control Commands:
    • /vibe - Start autonomous vibe mode
    • /vibe stop - Stop the autonomous process
    • /vibe status - Check if vibe mode is running
  • File-based IPC: Uses .vibe_control.json for reliable inter-process communication
  • Logging: Dedicated log file (vibe_mode.log) for monitoring autonomous operations

2. Enhanced Reasoning Display

  • Live Reasoning Blocks: Shows agent's reasoning process in real-time when enabled via /reasoning toggle
  • Styled Display: Reasoning blocks appear with distinct accent color and italic styling
  • Incremental Updates: Reasoning content streams and updates incrementally, similar to Letta interface
  • Toggle Support: Respects user preference via /reasoning command

📝 Configuration

Add these optional environment variables to your .env file:

VIBE_MODE_PROMPT="your custom prompt here"
VIBE_INTERVAL_SECONDS=180
VIBE_LOG_FILE=vibe_mode.log
VIBE_CONTROL_FILE=.vibe_control.json

Default Values

  • VIBE_MODE_PROMPT: Uses a default trading-focused prompt
  • VIBE_INTERVAL_SECONDS: 180 seconds (3 minutes)
  • VIBE_LOG_FILE: vibe_mode.log
  • VIBE_CONTROL_FILE: .vibe_control.json

🚀 Usage

Starting Vibe Mode

/vibe

This will:

  1. Display "Entering vibe mode" system message
  2. Start the background autonomous script
  3. Send the configured prompt to the agent immediately
  4. Continue sending the prompt at the configured interval

Stopping Vibe Mode

/vibe stop

Checking Status

/vibe status

Enabling Reasoning Display

/reasoning

Type /reasoning again to disable.

📁 New Files

  • vibe_mode.py - Autonomous background script for vibe mode
  • animaos/ - Enhanced TUI module structure
  • tests/test_knowledge_base.py - Knowledge base tests
  • tests/test_transcript.py - Transcript handling tests

🔧 Modified Files

  • config.py - Added vibe mode configuration variables
  • tui_app.py - Added /vibe command handler and enhanced reasoning display
  • simple_chat.py - Added /vibe command support for simple interface
  • letta_api.py - Improved reasoning chunk detection and handling
  • README.md - Updated documentation with vibe mode commands and configuration
  • env.example - Added vibe mode environment variable examples

🧪 Testing

All existing tests pass. New functionality has been tested with:

  • Autonomous vibe mode start/stop/status
  • Reasoning display toggle
  • File-based IPC control mechanism
  • Graceful shutdown handling

🔒 Safety Features

  • Minimum interval enforcement (10 seconds)
  • Graceful shutdown via signals (SIGINT, SIGTERM)
  • Process state tracking in control file
  • Error handling and logging throughout

📚 Documentation

  • README.md updated with:
    • New /vibe commands
    • Environment variable documentation
    • Vibe mode configuration section

🎨 UI/UX Improvements

  • System messages for vibe mode operations
  • Live reasoning display with proper styling
  • Spinner removal when first reasoning/answer chunk arrives
  • Improved chunk structure detection for better compatibility

⚠️ Notes

  • The autonomous vibe mode script runs as a separate background process
  • Control file (.vibe_control.json) should not be committed (add to .gitignore if not already)
  • Log file (vibe_mode.log) should not be committed
  • Reasoning display respects the /reasoning toggle - it's opt-in by default

✅ Checklist

  • Code follows project style guidelines
  • Documentation updated
  • Environment variables documented
  • Tests pass
  • No breaking changes to existing functionality
  • Graceful error handling implemented
  • Logging implemented for debugging

Ready for review and merge 🚀

…splay

- Add /vibe command to trigger autonomous background process
- Create vibe_mode.py script for scheduled autonomous agent interactions
- Add environment variables: VIBE_MODE_PROMPT, VIBE_INTERVAL_SECONDS, VIBE_CONTROL_FILE
- Implement file-based IPC for vibe mode control (start/stop/status)
- Enhance TUI reasoning display to show reasoning blocks live when enabled
- Improve letta_api.py to handle reasoning chunks with better chunk structure detection
- Add reasoning toggle support (respects /reasoning command)
- Update README.md with vibe mode documentation and configuration
- Add vibe_mode.py with logging and graceful shutdown handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant