跳到正文
GitHub·· 8 天前AI 评分30

OxyHQ/Clarity:Oxy 的引证答案与深度研究产品架构

OxyHQ/Clarity

AI 导读

Oxy 的引证答案与深度研究产品 Clarity 由名为 Alia 的 agent 驱动,架构为 Clarity 客户端经 Clarity API 接入 Alia 中的 bot/agent,再经 Oxy 推理边缘到 Kaana 执行推理。Clarity 自身不含推理提供商适配器、密钥、路由选择或本地推理计费,后端仅用 PostgreSQL/Drizzle,推理额度与遥测来自 Alia。

正文

Oxy's cited-answer and deep-research product, powered by a named Alia agent.

Architecture

Clarity client
  -> Clarity API (Oxy auth, product IDs, PostgreSQL product state)
  -> Clarity bot/agent in Alia (conversation runtime, tools, search, citations)
  -> Oxy inference edge (identity, billing, exact route authorization/order)
  -> Kaana (provider execution and failover within Oxy's signed order)

Clarity has no inference-provider adapters, keys, route selection or local inference billing. Its backend is PostgreSQL/Drizzle only. Product plans and entitlements remain Clarity data; inference credits and telemetry come from Alia. Kaana is the sole hosted inference data plane and its only canonical signed origin is https://kaana.ai, never a hostname under oxy.so.

Packages

Package Purpose
@clarity/frontend Expo app for web, iOS and Android
@clarity/backend Express product API and Alia agent proxy
@clarity/shared-types Conversation, model, streaming and Jobs DTOs
@clarity.surf/sdk Public SDK for Search, Jobs, Indexing and News

Local development

bun install
cp packages/backend/.env.example packages/backend/.env
bun run dev:backend
bun run dev:frontend

The API requires DATABASE_URL, the byte-exact canonical CLARITY_ALIA_AGENT_ID, and Clarity's dedicated Oxy backend credential. The credential secret belongs in the production platform's managed secret store; it is never stored in the repository, a user bearer or an inference-provider key. Redis, Stripe and browser-push settings are optional.

bun run --filter @clarity/backend lint
bun run --filter @clarity/backend test
bun run build:backend

The default branch is main. Migration and cutover instructions are in docs/postgres-alia-migration.md; the branch does not claim any production cutover or deployment.

Documentation

来源:GitHub · github.com