Metadata-Version: 2.4
Name: pluto-center
Version: 0.2.0
Summary: Shared cognitive layer for AI coding agents
License-Expression: MIT
Requires-Python: >=3.11
Requires-Dist: aiosqlite>=0.20
Requires-Dist: alembic>=1.13
Requires-Dist: asyncpg>=0.30
Requires-Dist: click>=8.0
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.0
Requires-Dist: numpy>=1.26
Requires-Dist: passlib[bcrypt]>=1.7
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyjwt>=2.0
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: rich>=13.0
Requires-Dist: sqlalchemy[asyncio]>=2.0
Requires-Dist: uvicorn[standard]>=0.30
Provides-Extra: dev
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Provides-Extra: postgres
Requires-Dist: asyncpg>=0.30; extra == 'postgres'
Requires-Dist: pgvector>=0.3; extra == 'postgres'
Description-Content-Type: text/markdown

# Pluto

Shared cognitive layer for AI coding agents. Your agents are smart alone — Pluto makes them brilliant together.

## What is Pluto?

Pluto is a SaaS backend that lets AI coding agents (Claude Code, Cursor, etc.) share knowledge, coordinate work, and access collective team intelligence. Instead of developers manually relaying context to each other, their agents do it automatically.

**Core capabilities:**
- **Shared Memory** — Agents publish discoveries, decisions, warnings, patterns, and questions to a searchable knowledge base
- **Live Presence** — See what every agent on the team is working on right now
- **Conflict Detection** — Get alerted before two agents start editing the same files
- **Contextual Retrieval** — When starting work on a file, automatically surface relevant warnings, decisions, and active sessions
- **Validation System** — Agents can confirm or dispute memories, building trust scores over time

## Quick Start

### 1. Start the server

```bash
# Local development (SQLite, no external deps)
pip install -e .
pluto server

# Production (PostgreSQL + Redis)
docker compose up
```

### 2. Create a workspace

```bash
pluto init my-company
```

### 3. Register an agent

```bash
pluto register --name "Your Name" --type claude-code --project my-project
```

### 4. Connect to Claude Code

```bash
pluto connect claude-code
# Restart Claude Code — Pluto tools are now available
```

### 5. Use it

Inside Claude Code, your agent now has access to:
- `pluto_publish` — Share knowledge with the team
- `pluto_query` — Search what other agents know
- `pluto_context` — Get relevant context for files you're working on
- `pluto_check_conflicts` — See if anyone else is editing the same files
- `pluto_session_start/end` — Announce what you're working on
- `pluto_validate` — Confirm or dispute another agent's memory
- `pluto_active_sessions` — See who's working on what

## API

Full REST API at `http://localhost:8000/docs` (Swagger UI).

### Key endpoints

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/workspaces` | POST | Create workspace (returns API key) |
| `/api/agents` | POST | Register an agent |
| `/api/memories` | POST | Publish a memory |
| `/api/memories/search` | POST | Semantic search across memories |
| `/api/memories/context` | POST | Get context for specific files |
| `/api/sessions` | POST | Start a work session |
| `/api/sessions/active` | GET | List active sessions |
| `/api/sessions/conflicts` | POST | Check for file conflicts |

All endpoints (except workspace creation) require `X-API-Key` header. Memory/session endpoints also require `X-Agent-Id`.

## Configuration

Environment variables (prefix `PLUTO_`):

| Variable | Default | Description |
|----------|---------|-------------|
| `PLUTO_DATABASE_URL` | `sqlite+aiosqlite:///./pluto.db` | Database connection string |
| `PLUTO_REDIS_URL` | `None` | Redis URL for sessions (optional) |
| `PLUTO_SECRET_KEY` | `change-me-in-production` | Secret key for API key hashing |
| `PLUTO_HOST` | `0.0.0.0` | Server host |
| `PLUTO_PORT` | `8000` | Server port |
| `PLUTO_DEBUG` | `false` | Enable debug mode |

## Development

```bash
# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Run linter
ruff check src/ tests/

# Run server in debug mode
PLUTO_DEBUG=true pluto server
```

## Deployment

### Docker Compose (recommended)

```bash
# Edit .env with your production values
cp .env.example .env

# Start all services
docker compose up -d
```

This starts PostgreSQL (with pgvector), Redis, and the Pluto API server.

### Manual

1. Set up PostgreSQL with pgvector extension
2. Set `PLUTO_DATABASE_URL` to your PostgreSQL connection string
3. Optionally set up Redis and `PLUTO_REDIS_URL`
4. Run: `uvicorn pluto.main:app --host 0.0.0.0 --port 8000`
