Runner for AI Agent PM - executes tasks via MCP and CLI
Project description
AI Agent PM Coordinator
全エージェントのタスク実行を統合管理するオーケストレーションデーモン。
クイックスタート
cd runner
pip install -e .
# デフォルト設定で起動(config/coordinator_default.yaml を使用)
python -m aiagent_runner --coordinator
Coordinatorモード(推奨)
単一のCoordinatorが全ての(agent_id, project_id)ペアを管理します。
基本起動
# デフォルト設定で起動
python -m aiagent_runner --coordinator
# 詳細ログ出力
python -m aiagent_runner --coordinator -v
カスタム設定ファイル
python -m aiagent_runner --coordinator -c /path/to/config.yaml
設定ファイル例
# config/coordinator_default.yaml がデフォルトで読み込まれます
# カスタム設定で上書き可能
polling_interval: 10
max_concurrent: 3
# MCP server configuration (Agent Instance用)
mcp_server_command: /path/to/mcp-server-pm
mcp_database_path: /path/to/database.db
# AI providers
ai_providers:
claude:
cli_command: claude
cli_args:
- "--dangerously-skip-permissions"
- "--max-turns"
- "50"
# Agents (passkeyのみ - ai_type等はMCPから取得)
agents:
agt_developer:
passkey: secret123
agt_reviewer:
passkey: ${REVIEWER_PASSKEY} # 環境変数展開対応
log_directory: /tmp/coordinator_logs
バックグラウンド実行
nohup python -m aiagent_runner --coordinator -v > coordinator.log 2>&1 &
設定の優先順位
- コマンドライン引数 (
--polling-interval等) - 指定した設定ファイル (
-c /path/to/config.yaml) - デフォルト設定 (
runner/config/coordinator_default.yaml) - 組み込みデフォルト値
動作フロー
- MCPサーバーに接続(Unixソケット)
list_active_projects_with_agents()で全プロジェクト・エージェントを取得- 各(agent_id, project_id)ペアに対して
should_start()を呼び出し - 作業が必要な場合、Agent Instance(Claude CLI等)をスポーン
- Agent Instanceが
authenticate→get_my_task→ 実行 →report_completed - 待機して2に戻る
前提条件
- MCPサーバーが起動していること
- エージェントがアプリで登録済みで、passkeyが設定されていること
- 該当エージェントがプロジェクトに割り当てられていること
- タスクが
in_progressステータスであること
Legacy Runnerモード(非推奨)
1エージェント = 1デーモン の旧アーキテクチャ。
# 非推奨: Coordinatorモードを使用してください
aiagent-runner --agent-id <AGENT_ID> --passkey <PASSKEY> --project-id <PROJECT_ID>
開発
pip install -e ".[dev]"
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiagent_runner-0.1.0.tar.gz
(27.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiagent_runner-0.1.0.tar.gz.
File metadata
- Download URL: aiagent_runner-0.1.0.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84b406df2138117c37bdb7d8a53927cb2979179d6ceef0f2ab8ef3532007d9cb
|
|
| MD5 |
afe334cbb7ce71b51c8455d0bcce47ed
|
|
| BLAKE2b-256 |
e2755489c19443ac88acb71e3a9aded97f57eb282fa790f1009c90f3e68b513d
|
File details
Details for the file aiagent_runner-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aiagent_runner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
117abef02aacba6e1f5ae49d67c924dc9df4f223abe6dd0c1004c51266ab3bc8
|
|
| MD5 |
8ccf3f92ae486829913a6597fb5df617
|
|
| BLAKE2b-256 |
13112a2d629d684851f01881464d1832cc4dd2575d26c9dde958062bfc8424cd
|