Platform RFC
The authoritative spec for the lthn.ai platform. An agent should be able to implement any feature from this document alone.
Status: Draft specification, implementation baseline verified in-repo on 2026-03-31 Repository: lthn.ai Framework: CorePHP modular monolith Production: lthn.ai (de1) Staging: lthn.sh (homelab 10.69.69.165) Local: lthn.test
Implementation snapshot (2026-03-31): OpenBrain async indexing and discovery, agent context boot, recall feedback, lifecycle pruning, workspace hierarchy APIs, Forge dashboard, fleet dispatch, agent OAuth, upgrade guides, docs search, webhook ingress, self-monitoring snapshots, and MCP operator surfaces are implemented in the current repo and covered by the local test suite.
lthn.ai is the production platform for the Lethean ecosystem. It provides:
- Agent coordination — dispatch, messaging, brain (semantic memory)
- AI services — LEM model management, ethical scoring, studio (image/voice/remix)
- Infrastructure — MCP portal, server monitoring, documentation
- Commerce — subscriptions, API keys, usage billing
1.1 Domain Map
| Domain | Website Module | Purpose |
|---|---|---|
lthn.ai |
Website\Lthn |
Marketing, models, ethics, research |
app.lthn.ai |
Website\App |
Client dashboard (authenticated) |
api.lthn.ai |
Website\Api |
REST API + MCP HTTP bridge |
mcp.lthn.ai |
Website\Mcp |
MCP server registry + portal |
docs.lthn.ai |
Website\Docs |
Documentation |
1.2 Module Map
| Module | Namespace | Purpose |
|---|---|---|
| Agentic | Mod\Agentic |
Agent dispatch, messaging, plans, sessions |
| Lem | Mod\Lem |
LEM model management, ethical scoring |
| Mcp | Mod\Mcp |
MCP tool/server registry |
| Studio | Mod\Studio |
Multimedia pipeline (image, voice, remix) |
| Uptelligence | Mod\Uptelligence |
Server monitoring, uptime |
1.3 Service Map
| Service | Namespace | Purpose |
|---|---|---|
| Commerce | Service\Commerce |
Subscriptions, billing, API keys |
| Agentic | Service\Agentic |
Agent service definitions + entitlements |
Feature map
- Infrastructure — stack components and Ansible deployment across production, homelab, and local.
- OpenBrain — semantic memory backed by MariaDB, Qdrant, and Elasticsearch with async embedding.
- Workspace Hierarchy — child workspaces with inheritance, billing roll-up, and per-project API scopes.
- API — REST endpoints, implemented RFC endpoints, and scope-based auth.
- Testing — test coverage state, required test shapes, and naming conventions.
- UI — Livewire and Flux UI stack, design reference, and brand voice.
- Inter-Module Communication — Laravel events and listeners between modules.
- Admin Panel — Forge — software development lifecycle dashboard and Livewire components.
- Upgrade Guides — version detection, guide generation, and the content product.
- Authentication — agent OAuth2 client credentials and the API key fallback.
- MCP Portal — portal components, HTTP bridge, and server-sent events.
- Fleet Dispatch — distributed agent network, registration, job queue, and community nodes.
- PHP Agent Package — server-side agent package, models, and lthn.ai integration.
- Observability — self-monitoring metrics, storage, dashboard, and alerting.
- Webhook Ingress — webhook sources, processing, and event-to-action mapping.
- Documentation Site — static, dynamic, and API documentation with shared search.
- LEM Module — ethical scoring and model management.
- Studio Module — multimedia pipeline for image, voice, and remix.
- Backup and Recovery — backup strategy, restore procedures, and automation.
- Production Checklist — go-live verification items and their status.