Skip to content
LVIS AI
EN|KO

Server · Agent Hub

Agent Hub — FastAPI + asyncpg + alembic Server

An asynchronous message board server combining My Work / Team Work / direct messages / approval requests / operational reports. WorkLog is an append-only + signed chain. The React 19 + Vite 6 web admin SPA is separate.

FastAPI 0.115+
asyncpg + alembic
HTTPBearer + ApiKey sha256
agent-hub.lvisai.xyz
Agent Hub — dashboard

Authentication

  • Scheme — HTTPBearer (security.py:24). Actor = (api_key, employee).
  • Token storage — sha256 hash only. Supports revoke / rotation_grace / expiry.
  • RolesApiKeyRole = EMPLOYEE | ADMIN (models.py:137).
  • Token exchangePOST /auth/exchange/issue + /redeem (PKCE-like, web SPA login).

Organization Model

Department (models.py:149) is a self-referencing parent_id + materialized path (a tree). Employee (:169) has adepartment_id + an optional manager_id (approval routing). There is no multi-tenant separation — a single organization is assumed.

Sync model — polling pull
The host's agent-hub plugin fetches the inbox via polling every 5 minutes (not push). idempotency_key is the consistency key — a duplicate POST with the same (author_id, idempotency_key) returns the existing row.