Skip to main content

Agent Team Work - A git-style multi-agent coordination system

Project description

agtw - Agent Team Work

一個類似 Git/Docker CLI 的多智能體協調系統。

PyPI version GitHub

功能特色

  • Session 管理 - 建立、切換、刪除工作階段
  • 多元代理 - Planner(規劃)、Executor(執行)、Evaluator(評估)
  • 安全審查 - Shell 命令由 Guard 代理審查後才執行
  • TCP 伺服器 - 持久化服務 daemon
  • CLI 界面 - Git 風格的命令列工具

安裝

pip install agtw

或開發模式:

git clone https://github.com/ccc-py/agtw.git
cd agtw
pip install -e ".[dev]"

快速開始

1. 啟動伺服器

agtw server

2. 建立 Session

agtw session new myproject

3. 列出 Sessions

agtw session list

4. 切換 Session

agtw session switch <session-id>

5. 建立 Executor

agtw agent exec "寫一個 hello.py"

6. 建立 Evaluator

agtw agent eval "檢查程式品質"

指令列表

指令 說明
agtw server 啟動 agtw 伺服器
agtw session new [name] 建立新 session
agtw session list 列出所有 sessions
agtw session switch <id> 切換至指定 session
agtw session delete <id> 刪除 session
agtw agent list 列出目前 session 的代理
agtw agent exec <task> 建立並執行 executor
agtw agent eval <desc> 建立 evaluator
agtw planner <prompt> 執行 planner
agtw status 顯示伺服器狀態

系統架構

┌─────────────────────────────────────────────────┐
│                   agtw CLI                      │
│              (git-style commands)                │
└─────────────────┬───────────────────────────────┘
                  │ TCP (JSON)
┌─────────────────▼───────────────────────────────┐
│               agtw Server                       │
│  ┌─────────────────────────────────────────┐   │
│  │           SessionManager               │   │
│  │  ┌─────────┐ ┌─────────┐ ┌─────────┐  │   │
│  │  │ Session │ │ Session │ │ Session │  │   │
│  │  │  ┌────┐ │ │  ┌────┐ │ │  ┌────┐ │  │   │
│  │  │  │Planner│ │  │Planner│ │  │Planner│ │  │   │
│  │  │  └────┘ │ │  └────┘ │ │  └────┘ │  │   │
│  │  │  ┌────┐ │ │  ┌────┐ │ │  ┌────┐ │  │   │
│  │  │  │Exec │ │ │  │Exec │ │ │  │Exec │ │  │   │
│  │  │  └────┘ │ │  └────┘ │ │  └────┘ │  │   │
│  │  │  ┌────┐ │ │  ┌────┐ │ │  ┌────┐ │  │   │
│  │  │  │Eval │ │ │  │Eval │ │ │  │Eval │ │  │   │
│  │  │  └────┘ │ │  └────┘ │ │  └────┘ │  │   │
│  │  └────┬────┘ └────┬────┘ └────┬────┘  │   │
│  │       └───────────┼───────────┘       │   │
│  │              ┌────▼────┐               │   │
│  │              │  Guard  │               │   │
│  │              └────┬────┘               │   │
│  └──────────────────┼─────────────────────┘   │
└─────────────────────┼───────────────────────────┘
                      │ Shell Commands
              ┌───────▼───────┐
              │    System     │
              └───────────────┘

代理說明

  • Planner - 分析需求、規劃任務、協調團隊
  • Executor - 執行 Planner 交辦的具體任務
  • Evaluator - 驗證 Executor 的執行結果
  • Guard - 安全審查員,檢查 Shell 命令是否危險

開發指令

# 執行測試
python -m pytest tests/ -v

# 打包上傳 PyPI
python -m build
twine upload dist/*

依賴

  • Python >= 3.10
  • aiohttp >= 3.8.0

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agtw-0.1.0.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agtw-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file agtw-0.1.0.tar.gz.

File metadata

  • Download URL: agtw-0.1.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for agtw-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e8dfdfd65547f5ad3ec30b9f2029f1e3046ba64db7914299704a4e82ce358ef1
MD5 ea51da6f7981d8966911eac73be7523a
BLAKE2b-256 72271f2b63af158aad8d80f312aa80c51811154898620cdb0453561a811b50ec

See more details on using hashes here.

File details

Details for the file agtw-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agtw-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for agtw-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a57822c24838ac3d340e545dfe4db81734dc9359e534c442964d484f7e733f3
MD5 b57437cedbb2b407770f7122058a96f9
BLAKE2b-256 55fe75eb2e521dff9243a59bfc407dc9b17910a6944420eca0d9691c135a3d0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page