Skip to content

robin-ph/ai2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI² - The Silent Manager 🤖 / 智能开发管家

AI² is an autonomous, multi-agent development assistant that lives in Telegram. It writes code, manages state, and persistent context across projects. AI² 是一个运行在 Telegram 中的全自动多智能体开发助手。它可以为您编写代码、管理进度,并支持多项目上下文切换。


✨ Features / 功能亮点

🧠 Natural Language Interface / 自然语言交互

  • No commands needed: Just say "Write a snake game" or "Switch to calculator".
  • Intent Recognition: AI automatically detects if you want to create, switch, or list projects.
  • 无需指令:直接说 "写个贪吃蛇" 或 "切换到计算器"。
  • 意图识别:AI 自动判断您是想创建项目、切换项目还是查询历史。

💾 Persistent Context & Memory / 持久化记忆与上下文

  • Auto-Save: Project state is saved to .ai2_context.json automatically.
  • Switch Anytime: Switch between projects seamlessly (/switch or "Switch to...").
  • Summaries: Get AI-generated recaps of where you left off.
  • 自动存档:进度自动保存,重启不丢失。
  • 随时切换:不同项目间无缝切换,记忆秒恢复。
  • 智能总结:AI 为你生成当前进度的前情提要。

📱 Multi-Device Roaming / 多设备漫游

  • Roaming Support: Run the bot on your Mac at home, control it from your phone anywhere.
  • Conflict Resolution: If you start a new instance, the old one gracefully exits.
  • 漫游支持:电脑在家跑,手机随时控。
  • 冲突避让:多端启动时自动管理,只有最新实例会运行。

🤖 Multi-Agent Architecture / 多智能体架构

  • Supervisor: Plans the roadmap. (项目经理:规划图)
  • Worker: Writes the code. (程序员:写代码)
  • Tester: Writes aggressive tests to ensure quality. (测试员:写测试找茬)

🛠 Setup / 安装指南

Prerequisites / 准备工作

You must provide your own API keys. 您需要提供自己的 API Key。

  • Telegram Bot Token: From @BotFather
  • LLM API Key: Anthropic (Claude) or Google (Gemini)

Installation / 安装

  1. Clone the repo / 克隆仓库

    git clone https://github.com/your-username/ai2-bot.git
    cd ai2-bot
  2. Setup Environment / 配置环境

    # Create virtual environment
    python3 -m venv venv
    source venv/bin/activate
    
    # Install dependencies
    pip install -r requirements.txt
  3. Configure / 配置文件 Copy .env.example to .env and fill in your keys: 复制 .env.example.env 并填入密钥:

    cp .env.example .env
    nano .env
    TELEGRAM_BOT_TOKEN=your_token_here
    ANTHROPIC_API_KEY=your_key_here
    # Optional
    GEMINI_API_KEY=...
  4. Run / 运行

    python run.py

📖 User Manual / 使用手册

Basic Flow / 基本流程

  1. Start / 启动: Send /start or say "Hi".
  2. Create / 创建: Say "Write a web scraper" (写的爬虫).
  3. Approve / 确认: Bot generates a plan -> Click "Approve" (批准).
  4. Develop / 开发: Bot writes code -> Runs tests -> Asking for next milestone.
  5. Finish / 完成: Get the code in ./projects folder.

Commands / 指令表

Although you can use natural language, commands are always available for precision. 尽管支持自然语言,您仍可使用指令进行精确控制。

Command 指令 Description 描述 Example 示例
/new Start new project /new Snake Game
/list List history /list
/switch Switch project /switch folder_name
/open Open folder (Local) /open
/status Check progress /status
/stop Emergency wait /stop
/summary Generate recap /summary

☁️ Deployment (Optional) / 云端部署

See DEPLOY.md for Docker deployment instructions. 查看 DEPLOY.md 获取 Docker 部署教程。


License: MIT Author: You

About

AI² - The Silent Manager: Telegram-based autonomous software development agent

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages