Skip to main content

Mountable FastAPI admin router for lattice-meetbot captures. Constructor-DI, MeetbotAdminRepo protocol, SQLite reference impl.

Project description

lattice-meetbot-admin

Mountable FastAPI admin router for lattice-meetbot captures.

Installation

pip install lattice-meetbot-admin

With dev server support:

pip install 'lattice-meetbot-admin[server]'

Optional extras for v0.2 features:

# Background workers (rq + redis) -- required for /webhooks/capture-complete + worker CLI
pip install 'lattice-meetbot-admin[queue]'

# Chat surface (anthropic SDK) -- required if you wire a real BrainClient that proxies to Claude
pip install 'lattice-meetbot-admin[chat]'

# All-in-one
pip install 'lattice-meetbot-admin[server,queue,chat]'

Quick Start

Mount into a FastAPI host

from fastapi import FastAPI
from lattice_meetbot_admin import create_router, MeetbotAdminConfig

config = MeetbotAdminConfig(
    db_url="sqlite:///./meetbot_admin.db",
    # auth_dependency=require_admin_auth,  # optional: your FastAPI auth callable
)

app = FastAPI()
app.include_router(create_router(config), prefix="/api/meetbot-admin")

Then hit http://localhost:8000/api/meetbot-admin/health to confirm it's live.

Dev server (standalone)

lattice-meetbot-admin dev-server --db-url sqlite:///./meetbot_admin.db
# API at http://127.0.0.1:5557/api/meetbot-admin/docs

Architecture

lattice-meetbot-admin is a constructor-DI package -- no global state. Pass your config once at mount time:

  • MeetbotAdminConfig -- Pydantic v2 settings model (env-var overrides via MEETBOT_ADMIN_* prefix)
  • MeetbotAdminRepo -- typing.Protocol; implement against your storage backend or use the bundled SqliteMeetbotAdminRepo
  • create_router(config, repo=...) -- returns an APIRouter; mount under any prefix
  • create_admin_app(config, repo=...) -- returns a FastAPI sub-application for app.mount()

REST API

Core (v0.1)

Method Path Description
GET /health Health check (returns version + 5 feature flags)
GET /meetings List meetings (paginated, filterable)
GET /meetings/{id} Meeting detail (segments + speakers)
GET /meetings/{id}/segments Transcript segments
GET /meetings/{id}/speakers Per-speaker stats
GET /personas List personas
GET /personas/autocomplete?q= Ranked autocomplete
GET /personas/{name} Persona detail
PATCH /personas/{name} Update persona fields
GET /voicenotes List voicenote profiles
GET /voicenotes/{persona_name} Voicenote profile
PUT /voicenotes/{persona_name} Upsert voicenote (idempotent)

v0.2 (Phase 1)

All v0.2 routes are gated behind feature flags + auth (same auth_dependency as core routes). A route returns 503 when its feature flag is off or its required collaborator (BrainClient, TaskQueue, ffmpeg) is missing.

Method Path Description 503 gate
POST /chat BrainClient proxy (retrieval + Q&A) enable_chat=False OR brain_client is None
POST /search FTS5 segment search (Sqlite) / linear scan (InMemory) enable_search=False
POST /clips Enqueue ffmpeg clip job enable_clip_export=False OR ffmpeg not on PATH
GET /clips/{id}/download Stream rendered clip (FileResponse) enable_clip_export=False
POST /webhooks/capture-complete Record + enqueue post-capture job enable_webhooks=False OR rq queue unreachable

Multi-tenant scope: every list/search/chat/webhook surface accepts owner_user_id and threads it into repo filters, BrainClient.retrieve scope, and TaskQueue job kwargs.

Configuration (v0.2)

MeetbotAdminConfig adds the following fields on top of v0.1:

Field Type Default Notes
enable_chat bool False Gates /chat.
enable_search bool False Gates /search.
enable_clip_export bool False Gates /clips + /clips/{id}/download.
enable_webhooks bool False Gates /webhooks/capture-complete.
anthropic_api_key SecretStr | None None Excluded from model dump; never appears in /health.
clip_storage_dir Path | None None Where rendered clips land.
brain_client BrainClient | None None Host-injected. Excluded from dump.
task_queue TaskQueue | None None Host-injected. Excluded from dump.
redis_url str | None None Used by RqTaskQueue + worker CLI.

Env-var loading uses the MEETBOT_ADMIN_* prefix (e.g. MEETBOT_ADMIN_ENABLE_CHAT=true).

Worker CLI (v0.2)

Background jobs (post-capture pipeline, clip render, etc.) run via rq. Start a worker with:

lattice-meetbot-admin worker --redis-url redis://localhost:6379/0 --queue meetbot

Optional --owner-user-id scopes the worker to a single tenant (useful for per-tenant capacity isolation).

Migrations

lattice-meetbot-admin migrate --db-url sqlite:///./meetbot_admin.db

Alembic 0002 (shipped in v0.2) adds the FTS5 segments_fts shadow table, capture_events, and the voicenotes.owner_user_id column.

Deferred (v0.3+)

  • Worker-side owner_user_id enforcement (v0.2 carries the id end-to-end; worker filtering is not yet wired).

License

Apache-2.0. Author: CodeWarrior4Life.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lattice_meetbot_admin-0.2.1.tar.gz (584.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lattice_meetbot_admin-0.2.1-py3-none-any.whl (42.6 kB view details)

Uploaded Python 3

File details

Details for the file lattice_meetbot_admin-0.2.1.tar.gz.

File metadata

  • Download URL: lattice_meetbot_admin-0.2.1.tar.gz
  • Upload date:
  • Size: 584.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for lattice_meetbot_admin-0.2.1.tar.gz
Algorithm Hash digest
SHA256 75c56257d3417cb20208f68e2106b620306c377b63bed8b3855acf8d69d8fb08
MD5 e3cb629754e0512ca75d748c0e3e9a3c
BLAKE2b-256 0cab1b4a4c1e1125c5679c1ef408cc67ccd11c1349b3fcf36c620750373f6926

See more details on using hashes here.

File details

Details for the file lattice_meetbot_admin-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lattice_meetbot_admin-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9fdbaf7f2e115faceaa38bd8f7d6463693144c5868513ff34e35d17588f26521
MD5 93cc3681674e2267e9417fd01dfb6909
BLAKE2b-256 a55c36861ed11a847cf9ad206a96f29ba84cb3f247046e2b22ffd2c2e14f2139

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page