Metadata-Version: 2.4
Name: madpod-agent
Version: 0.3.7
Summary: Madpod Agent — AI agent runtime with Madpod control-plane channel
Project-URL: Homepage, https://github.com/madpodai/madpod-agent
Project-URL: Repository, https://github.com/madpodai/madpod-agent
Project-URL: Issues, https://github.com/madpodai/madpod-agent/issues
Author: Madpod contributors
License: MIT
License-File: LICENSE
Keywords: agent,ai,madpod
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Requires-Dist: beautifulsoup4<5.0.0,>=4.14.0
Requires-Dist: chardet<6.0.0,>=3.0.2
Requires-Dist: crawl4ai<0.9.0,>=0.8.0
Requires-Dist: croniter<7.0.0,>=6.0.0
Requires-Dist: httpx<1.0.0,>=0.28.0
Requires-Dist: json-repair<1.0.0,>=0.57.0
Requires-Dist: litellm<2.0.0,>=1.81.5
Requires-Dist: loguru<1.0.0,>=0.7.3
Requires-Dist: markdown<4.0.0,>=3.6
Requires-Dist: mcp<2.0.0,>=1.26.0
Requires-Dist: oauth-cli-kit<1.0.0,>=0.1.3
Requires-Dist: openai>=2.8.0
Requires-Dist: playwright<2.0.0,>=1.58.0
Requires-Dist: prompt-toolkit<4.0.0,>=3.0.50
Requires-Dist: pydantic-settings<3.0.0,>=2.12.0
Requires-Dist: pydantic<3.0.0,>=2.12.0
Requires-Dist: readability-lxml<1.0.0,>=0.8.4
Requires-Dist: rich<15.0.0,>=14.0.0
Requires-Dist: typer<1.0.0,>=0.20.0
Requires-Dist: websockets<17.0,>=16.0
Provides-Extra: all
Requires-Dist: pdfplumber<1.0.0,>=0.11.0; extra == 'all'
Requires-Dist: pymupdf<2.0.0,>=1.24.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: pytest-asyncio<2.0.0,>=1.3.0; extra == 'dev'
Requires-Dist: pytest<10.0.0,>=9.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: pdf
Requires-Dist: pdfplumber<1.0.0,>=0.11.0; extra == 'pdf'
Provides-Extra: vision
Requires-Dist: pymupdf<2.0.0,>=1.24.0; extra == 'vision'
Description-Content-Type: text/markdown

# madpod-nanobot

A fork of [HKUDS/nanobot](https://github.com/HKUDS/nanobot) customized for [Madpod](https://madpodai.com) — a task-centric AI agent hosting platform.

## What changed

- **Removed** all upstream messaging channels (Telegram, Discord, Slack, WhatsApp, Email, Feishu, DingTalk, QQ, Matrix)
- **Added** `MadpodChannel` — persistent WebSocket client connecting agents to the Madpod control plane
- **Added** hooks (`activity_logger`, `intervention_detector`) bundled in the package
- **Renamed** package to `madpod-nanobot`

## Install

```bash
uv add madpod-nanobot
```

## Usage

```bash
madpod-nanobot gateway --config /path/to/config.json --workspace /path/to/workspace
```

## Local testing with Madpod dev stack

1. Generate the workspace-root local dev launcher and sync the managed URLs:

```bash
cd api
uv run python -m src.scripts.sync_local_dev
cd ..
```

2. Start the local dependencies, apply DB migrations, and seed a dedicated local task/agent pair:

```bash
docker compose -f docker-compose.dev.yml up -d postgres temporal api temporal-worker
cd /Users/achraf/Desktop/madpod/api
uv run alembic upgrade head
uv run python -m src.scripts.bootstrap_local_nanobot
```

3. Start the local nanobot container with an OpenRouter key:

```bash
OPENROUTER_API_KEY=your-key-here docker compose -f docker-compose.dev.yml --profile nanobot up nanobot-dev
```

The bootstrap script resets and recreates a fixed local task and agent so the `nanobot-dev` service can authenticate against the FastAPI websocket and immediately receive a test assignment.

### Environment variables

| Variable | Description | Default |
|----------|-------------|---------|
| `MADPOD_AGENT_ID` | Agent identifier | (required) |
| `MADPOD_GATEWAY_TOKEN` | Bearer token for WS auth | (required) |
| `MADPOD_CONTROL_PLANE_WS_URL` | Control plane WebSocket URL | `wss://api.madpodai.com` |
| `MODEL` | Primary runtime model | `openrouter/minimax/minimax-m2.5` in Madpod runtime |
| `PLANNER_MODEL` | Optional planner override | unset |
| `EXECUTOR_MODEL` | Optional executor override | unset |
| `SUMMARIZER_MODEL` | Optional summarizer override | unset |
| `BROWSER_BACKEND` | Browser backend (`playwright` or `playwright_mcp`) | `playwright` |
| `BROWSER_HEADLESS` | Force headless browser mode | auto |

## License

MIT — see [LICENSE](LICENSE).
