Python SDK
Python SDK. 이 페이지는 Commander 아키텍처 구성 요소를 설명합니다. monorepo 구조에 맞춘 한국어 운영 문서이며, 코드 블록은 영어 그대로입니다.
제품 지표: 25 프로바이더 · 5 토폴로지 · 18 tools · 6700+ 테스트.
CLI monorepo: npx tsx packages/core/src/cliEntry.ts · 빌드 후: commander
참고 표
| Method | Description |
|---|---|
client.run(prompt, ...) | Execute an agent task |
client.plan(task, ...) | Zero-cost deliberation (no LLM call) |
client.stream(session_id) | SSE event stream for a running session |
client.memory_write(content, ...) | Write to memory |
client.memory_query(...) | Query memory |
client.memory_stats() | Memory statistics |
client.health() | Liveness probe |
client.health_detailed() | Detailed component health |
client.system_status() | System status |
client.metrics() | OpenMetrics text |
주요 내용
Installation
운영 시 Installation 는 품질 게이트·DLQ·서킷 브레이커와 함께 씁니다. 소스는 monorepo, 전체 명세는 영문 레퍼런스를 보세요.
Quick Start
운영 시 Quick Start 는 품질 게이트·DLQ·서킷 브레이커와 함께 씁니다. 소스는 monorepo, 전체 명세는 영문 레퍼런스를 보세요.
API Reference
운영 시 API Reference 는 품질 게이트·DLQ·서킷 브레이커와 함께 씁니다. 소스는 monorepo, 전체 명세는 영문 레퍼런스를 보세요.
Streaming
운영 시 Streaming 는 품질 게이트·DLQ·서킷 브레이커와 함께 씁니다. 소스는 monorepo, 전체 명세는 영문 레퍼런스를 보세요.
Sync Wrapper
운영 시 Sync Wrapper 는 품질 게이트·DLQ·서킷 브레이커와 함께 씁니다. 소스는 monorepo, 전체 명세는 영문 레퍼런스를 보세요.
설정
운영 시 Configuration 는 품질 게이트·DLQ·서킷 브레이커와 함께 씁니다. 소스는 monorepo, 전체 명세는 영문 레퍼런스를 보세요.
구조
운영 시 Architecture 는 품질 게이트·DLQ·서킷 브레이커와 함께 씁니다. 소스는 monorepo, 전체 명세는 영문 레퍼런스를 보세요.
Development
운영 시 Development 는 품질 게이트·DLQ·서킷 브레이커와 함께 씁니다. 소스는 monorepo, 전체 명세는 영문 레퍼런스를 보세요.
예제 (코드는 영어 유지)
git clone https://github.com/PStarH/Commander.git
cd Commander/packages/python-sdk
pip install -e ".[dev]"pip install commander-aiimport asyncio
from commander import CommanderClient
async def main():
async with CommanderClient(
api_key="cmd-...",
base_url="http://localhost:4000",
) as client:
# Zero-cost planning
plan = await client.plan("audit repository for security vulnerabilities")
print(f"Topology: {plan.topology}")
print(f"Budget: ${plan.estimate.cost_budget_usd:.2f}")
# Execute
result = await client.run("list all Python files")
print(f"Status: {result.status}")
asyncio.run(main())운영
npx tsx packages/core/src/cliEntry.ts doctor
npx tsx packages/core/src/cliEntry.ts status
curl -s http://localhost:4000/health/detailed || true