Skip to content
Projects

About

EchoBot: Your Anime AI Companion

AI & Machine Learning

How these counts are measured

Measured star growth

in 24h
0
in 7 days
0
in 15 days
-2
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README_EN.md

Original
EchoBot Banner

EchoBot: Your Anime AI Companion

Python 3.11+ License: MIT

中文文档 / Chinese README

EchoBot is an anime-style AI companion with Live2D support. It offers immersive role-play and emotional companionship, while quietly handling complex Agent productivity tasks like coding and file management in the background (๑>ᴗ<๑).

Whether you're using the web UI (with real-time voice and Live2D interaction) or chat platforms (QQ and Telegram supported), your companion is always ready to respond~

EchoBot WebUI Preview

The Live2D model shown in the demo is from: 【Free Model】Take this cute puppy home for free!


✨ Core Features

  • 🎭 Immersive Live2D Interaction: Real-time Live2D rendering and voice conversation in the browser.
  • 🧠 Decision-Roleplay-Agent Three-Layer Architecture: Fully decouples role-play from tool execution for fast responses without breaking character.
  • 🛠️ Serious Productivity: Local file read/write, scheduled and periodic tasks, Skills, and long-term memory — actually gets things done.
  • 🌐 Multi-Platform Support: Ready-to-use WebUI with seamless integration for QQ and Telegram.

🏗️ Core Architecture

Typical AI Agents are slow and token-heavy by nature due to large tool lists and skill systems. Mixing character settings with task instructions leads to "character dilution" and degrades execution efficiency.

EchoBot uses a Decision - Roleplay - Agent three-layer architecture to solve this:

1. 🧠 Decision Layer

Accurately and quickly identifies user intent.

  • Hybrid Intent Recognition: Dual-engine using Rules + Lightweight LLM. Clear commands bypass the large model and trigger background tasks directly; ambiguous intent is classified by a lightweight LLM.
  • Smart Dispatch: Casual chat is routed to the Roleplay Layer; complex tasks silently wake the Agent Core while the Roleplay Layer notifies the user that the task has started.

2. 🎭 Roleplay Layer

Focused purely on emotional value and immersion (๑˃̵ᴗ˂̵) ♡.

  • Clean Context: Strips away tool-use metadata, optimized for text/voice generation — ensuring vivid tone, instant replies, and no out-of-character moments.
  • Context Awareness: Intelligently switches dialogue based on system state (e.g., idle chat, task started, task completed).

3. ⚙️ Agent Core

Runs silently in the background to complete assigned tasks.

  • Full Agent Capabilities: Integrated tool chains (Tools), skill libraries (Skills), and long/short-term memory (Memory).
  • System-Level Access: Can read/write local files and interact with the operating system.
  • Async Collaboration: Automatically summarizes results when done and has your anime companion personally deliver the report to you.

🔄 Workflow Examples

Scenario A: Casual Chat

🧑‍💻 You: "Good morning!" 🤖 Decision Layer: (Classified as casual chat) ➔ Forwarded to Roleplay Layer. 🌸 Roleplay Layer: "Good morning~ Let's have a great day today nya~"

Scenario B: Complex Task Request

🧑‍💻 You: "Write me a Python web scraper." 🤖 Decision Layer: (Rule matched) ➔ Triggers dual-track operation. 🌸 Roleplay Layer (instant reply): "Got it! I'll write that scraper for you right meow~" ⚙️ Agent Core (silent background execution): Search ➔ Write code ➔ Test code ➔ Return results. 🌸 Roleplay Layer: "Here it is! I worked really hard on this scraper, take a look~ [attached code file]"


🚀 Quick Start

💡 Tip: Want to get up and running fast? Just hand this repo to a Coding Agent like Codex, Claude Code, or Cursor for one-click setup (≧∇≦)/

Install Dependencies

Python 3.11 or higher is recommended.

pip install -r requirements.txt

Configure .env

Copy .env.example and rename it to .env, then fill in your LLM provider info (OpenAI-compatible format):

LLM_API_KEY=your_api_key_here
LLM_MODEL=deepseek-chat
LLM_BASE_URL=https://api.deepseek.com/v1

Start the Service

The following command starts both the chat platform gateway and the web UI:

python -m echobot app

Start Using

Open your browser and visit the address below to meet your companion (≧◡≦) ♡:

http://127.0.0.1:8000/web

🎨 Customization

👗 Import / Switch Live2D Models

A complete Live2D asset is typically a folder containing .model3.json and related files. The project ships with 2 built-in Live2D assets. You can upload or switch models directly from the web control panel:

After uploading, the companion automatically copies the folder to .echobot/live2d. You can also manually copy a Live2D asset folder there — it will be loaded on next startup.

Eye-tracking (mouse follow) is enabled by default and can be toggled in the panel.

🖼️ Import / Switch Backgrounds

Upload your favorite background images via the web control panel:

🖼️ Image Upload & Download

For vision-capable models (e.g., qwen3.5-plus and kimi-k2.5), you can send images directly to your companion, and your companion can send images back to you as well.

💡 Tip: If your model does not support image input, set ECHOBOT_LLM_SUPPORTS_IMAGE_INPUT=false in the project's .env file to reduce accidental image-related actions by the assistant.

The Live2D model shown in the demo is from: 【Ultra-Detailed Live2D Bulk Model】This bunny is so cute, I just have to eat you up!

📁 File Upload & Download

Beyond images, your companion can also help you handle various types of files:

⏰ Scheduled & Periodic Tasks

Your companion can remember important things and execute them on time:

  • Cron Tasks: Triggered at a specific time. Simply tell your companion "remind me to attend the meeting in 30 minutes" and a task will be created automatically.
    • Task data is stored in .echobot/cron/jobs.json.
  • Heartbeat Tasks: Triggered at a fixed interval, defaulting to every 30 minutes.
    • Adjust the interval via ECHOBOT_HEARTBEAT_INTERVAL_SECONDS in .env (in seconds).
    • Edit the heartbeat task file from the web panel or directly at .echobot/HEARTBEAT.md.

Cron Jobs Heartbeat Jobs

🚦 Router Mode

Switch the working mode manually in the web UI based on your needs:

🤖 Auto (Default): Intelligently identifies intent and decides whether to invoke the background Agent (≧◡≦) ♡.

💬 Chat Only: Fully disables background tasks to prevent accidental triggers — perfect for companionship (⁄ ⁄•⁄ω⁄•⁄ ⁄).

🛠️ Force Agent: Become a relentless productivity machine — skips intent recognition and forces all messages through the background task pipeline (ง๑ •̀_•́)ง.

Router Mode

🎙️ Voice Features (TTS & ASR)

EchoBot's web UI supports half-duplex voice interaction. Switch voice backends flexibly from the control panel:

🗣️ Text-to-Speech (TTS):

Two free backends are supported:

  • edge-tts: Online synthesis, free with no API key required.
  • kokoro-multi-lang-v1_1: Local offline synthesis; model weights are downloaded automatically on first launch.

🎙️ Speech Recognition (ASR):

Powered by the SenseVoice model via sherpa-onnx — fully local and offline; model weights are downloaded automatically on first launch.

EchoBot's web UI supports half-duplex voice interaction (microphone is muted during playback to prevent echo). Both "Push to Talk" and "Always-On Mic" modes are supported.

🔌 Advanced: Custom Voice Models

EchoBot supports TTS and ASR interfaces that follow the OpenAI-compatible API, so you can replace the built-in voice models with your own local or cloud services:

Custom Voice Model Settings

🗣️ Custom TTS:

Supports services compatible with the OpenAI Speech API.

For example, you can use vLLM Omni Speech to deploy speech synthesis models such as Qwen3-TTS or Fish Speech S2 Pro locally. After starting the vLLM service, configure the endpoint URL and model name in .env:

ECHOBOT_TTS_OPENAI_MODEL=Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice
ECHOBOT_TTS_OPENAI_BASE_URL=http://localhost:8091/v1

🎙️ Custom ASR:

Supports services compatible with the OpenAI Transcriptions API.

For example, follow the vLLM documentation to deploy Qwen3-ASR. After starting the vLLM service, configure the endpoint URL and model name in .env:

ECHOBOT_ASR_OPENAI_MODEL=Qwen/Qwen3-ASR-0.6B
ECHOBOT_ASR_OPENAI_BASE_URL=http://localhost:8080/v1

💡 Lighting & Effects

Adjust filters, lighting, and particle effects from the web control panel. Hold Alt + Click on a slider to reset it to its default value.

Category Parameters Description
Toggles Global Enable, Background Blur, Lighting, Light Drift, Air Particles Enable or disable each rendering effect
Rendering Background Blur (0–16), Hue (-180°–180°), Saturation (0–200%), Contrast (0–200%) Adjust color and depth of field
Lighting Detail Light X/Y (0–100%), Glow Intensity (0–160%), Vignette (0–60%), Grain (0–40%) Control light source, vignette, and noise
Particle System Density (0–100%), Opacity (0–160%), Size (40–240%), Speed (0–260%) Control floating dust particles

Lighting effects enabled:

Lighting effects disabled:

The Live2D model shown in the demo is from: Live2D Official Free Sample


📱 Chat Platform Integration

🐧 QQ Integration

Open the QQ Open Platform and click the bot creation entry:

Click "Create Bot" to get your AppID and AppSecret:

Configure the QQ platform info in .echobot/channels.json:

"enabled": true
"app_id": "your AppID",
"client_secret": "your AppSecret"

Restart the service and you can chat with your companion directly in QQ~

✈️ Telegram Integration

Search for @BotFather in Telegram and open the official account (verified with a blue checkmark).

Send the command /newbot and follow the prompts to create a bot and get your bot_token.

Configure the Telegram platform info in .echobot/channels.json:

"enabled": true
"bot_token": "your bot_token",
"allow_from": ["your user ID"]

💻 Terminal & Chat Platform Commands

When running in the terminal or interacting via a chat platform, the following built-in commands are available for session management and persona switching~

📁 Session Management

Command Usage Description
/new /new [title] Create a new session (optional title)
/ls /ls List all sessions
/switch /switch <number> Switch to the specified session
/rename /rename <title> Rename the current session
/delete /delete Delete the current session
/current /current View current session info
/help /help Show global command help

🎭 Role Management

Command Usage Description
/role /role View current character card
/role list /role list List all character cards
/role current /role current View current character card details
/role set /role set <name> Switch to a specified character card
/role help /role help Show role command help

🧭 Route Mode

These route mode commands use the same session routing setting as the route mode switch in the web UI~

Command Usage Description
/route /route Show the current route mode for this session
/route current /route current Show the current route mode for this session
/route auto /route auto Switch to automatic routing
/route chat /route chat Switch to chat-only mode
/route agent /route agent Switch to force-agent mode
/route set /route set <auto|chat_only|force_agent> Set the route mode explicitly
/route help /route help Show route mode command help

⚙️ Runtime Configuration

Command Usage Description
/runtime /runtime List runtime settings and current values
/runtime list /runtime list List runtime settings and current values
/runtime get /runtime get <name> Show one runtime setting
/runtime set /runtime set <name> <value> Update one runtime setting
/runtime help /runtime help Show runtime command help

Example: use delegated_ack_enabled to control whether EchoBot sends a quick notice before a background task starts.

/runtime get delegated_ack_enabled
/runtime set delegated_ack_enabled on
/runtime set delegated_ack_enabled off
  • When set to on: EchoBot sends a short "started working" style message first, then sends the final result when the task finishes.
  • When set to off: the background task runs silently until the final result is ready.

💖 Acknowledgements

Standing on the shoulders of giants is what makes this companion so smart and adorable! EchoBot was inspired by and built upon the following excellent open-source projects (deep bow 🙇‍♀️):

Explore related projects

Loading…