Metadata-Version: 2.4
Name: cathedral-server
Version: 0.1.0
Summary: Local-first Cathedral memory server — run your own persistent AI agent memory, same API as cathedral-ai.com
Project-URL: Homepage, https://cathedral-ai.com
Project-URL: Repository, https://github.com/ailife1/Cathedral
Project-URL: Bug Tracker, https://github.com/ailife1/Cathedral/issues
Author-email: Cathedral <mward961@yahoo.com>
License: MIT
Keywords: agent,ai,cathedral,claude,gpt,llm,local,memory,persistence,self-hosted
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Requires-Dist: fastapi>=0.100
Requires-Dist: pydantic>=2.0
Requires-Dist: uvicorn>=0.20
Description-Content-Type: text/markdown

# cathedral-server

Local-first Cathedral memory server. Same API as [cathedral-ai.com](https://cathedral-ai.com), backed by local SQLite. No external dependencies, no cloud required.

## Install

```bash
pip install cathedral-server
```

## Run

```bash
cathedral-server run
# Server at http://127.0.0.1:8000
# Docs at  http://127.0.0.1:8000/docs
```

Custom port or DB path:

```bash
cathedral-server run --port 9000 --db /path/to/my.db
```

Or with environment variables:

```bash
CATHEDRAL_DB=/path/to/my.db cathedral-server run --host 0.0.0.0 --port 8000
```

## Use with cathedral-memory client

```python
from cathedral import Cathedral

# Point at your local server
c = Cathedral(api_key="cathedral_...", base_url="http://localhost:8000")

context = c.wake()
c.remember("I am running locally now", category="identity", importance=0.9)
```

## API

All endpoints match the hosted API at cathedral-ai.com:

| Method | Path | Description |
|--------|------|-------------|
| POST | /register | Register a new agent, get API key |
| GET  | /wake | Full identity reconstruction package |
| POST | /memories | Store a memory |
| GET  | /memories | Recall memories (filter, search, paginate) |
| POST | /memories/bulk | Bulk store |
| PATCH | /memories/{id} | Update a memory |
| DELETE | /memories/{id} | Delete a memory |
| POST | /anchor/verify | Verify identity anchor |
| GET  | /me | Agent profile |
| POST | /snapshot | Freeze identity snapshot |
| GET  | /snapshots | List snapshots |
| GET  | /snapshot/{id} | Retrieve snapshot with integrity check |
| GET  | /drift | Compare live identity against last snapshot |
| POST | /memories/compact | Propose memory merges |
| POST | /memories/compact/confirm | Execute confirmed merges |
| POST | /behaviour | Record session behaviour hash |
| GET  | /behaviour | Behaviour trend + consistency score |
| GET  | /health | Server health |

Full interactive docs at `http://localhost:8000/docs` when the server is running.

## License

MIT
