💰 FUNDING NEWS: Hushh.ai Secures $5 Million Strategic Investment from hushhTech.com's Evergreen Renaissance AI Fund

💰 FUNDING NEWS: Hushh.ai Secures $5 Million Strategic Investment from hushhTech.com's Evergreen Renaissance AI Fund

💰 FUNDING NEWS: Hushh.ai Secures $5 Million Strategic Investment from hushhTech.com's Evergreen Renaissance AI Fund

Hushh Logo

Developers

Agent Kai API Reference

Explore the live Kai REST contract, PKM data plane, consent model, and MCP runtime.

Overview

Agent Kai is the canonical developer reference for consent-first reads from the Personal Knowledge Model. The important pattern is stable: discover scopes from the live PKM runtime, request one scope at a time, wait for approval inside Kai, then read only the slice the user approved.

This page translates the runtime fact sheet into developer language. It is intentionally documentation-only: enough schema and flow detail to explain endpoint behavior, without exposing secrets, row data, or operational internals that do not belong on a public site.

info

Treat /developers/agent-kai as the primary public reference route. Use the supporting Kai guides for setup, scope grammar, and runtime details after this contract is clear. The older A2A and MuleSoft APIs live in the separate /developers/agentic-apis track.

Runtime architecture

Kai sits between the user-facing approval experience and the PKM runtime. The public API surface is small on purpose: the app, REST base, and MCP endpoint all describe the same consent-first system from different integration angles.

SurfaceCurrent targetWhy it matters
Kai apphttp://localhost:3000User-facing consent review surface and the safe place to complete approval.
REST basehttp://127.0.0.1:8000/api/v1Discovery, consent creation, and consent status polling for backend integrations.
Remote MCPhttp://127.0.0.1:8000/mcpTool-native runtime for hosts that support HTTP MCP directly.
npm bridge@hushh/mcp@betaFallback launcher for hosts that still need a local stdio MCP process.

Core PKM data plane

These tables explain discovery, manifests, scope exposure, and encrypted segment storage. They are the canonical data plane behind Kai scope discovery.

TableDeveloper meaning
pkm_indexFast discovery of available domains, freshness, summary projection, and capability flags.
pkm_blobsEncrypted PKM payload storage keyed by user, domain, segment, and revision metadata.
pkm_manifestsManifest-level versioning and packaging for the slices Kai can expose.
pkm_manifest_pathsPath-level mapping between manifests and the attributes a scope can reveal.
pkm_scope_registryCanonical scope handles, labels, segment ids, and exposure state for discovery.
pkm_eventsRuntime event history for PKM changes, useful when explaining freshness and sequencing.
pkm_migration_stateMigration checkpointing for the PKM runtime during cutovers and backfills.

Shared app records that matter to developers

Developers do not interact with these tables directly, but they explain why approval, export wrapping, and runtime identity behave the way they do.

TablesWhy they matter
consent_audit, consent_exports, consent_scope_templatesRecord consent requests, export state, and reusable approval templates.
developer_applications, developer_apps, developer_tokensDefine app identity, runtime enrollment, and the token state your integration depends on.
vault_key_wrappers, vault_keysTrack wrapping state, onboarding readiness, and whether exports can be returned safely.
runtime_persona_stateStores the active runtime posture that explains persona-specific behavior and readiness.
kai_plaid_items, kai_plaid_link_sessions, kai_plaid_refresh_runsOptional Kai financial context and refresh lifecycle records that shape available financial scopes.
domain_registry, actor_profiles, marketplace_public_profilesShared registry and actor metadata that explain how scopes and app identity are presented.

Legacy transition tables

warning

Legacy encrypted-user tables remain only as bounded migration context. They are not the target for new writes, new integrations, or new approval logic.

Legacy surfaceStatus
legacy encrypted blob tableBounded cutover only. Do not target for new writes.
legacy metadata index tableCompatibility surface retained during migration only.

Endpoint flow and order of operations

The Kai path should be treated as ordered operations, not a collection of unrelated endpoints. Start with discovery, move into a narrow consent request, poll for approval, then decide whether the rest of your integration should stay in REST or move into MCP.

Remote MCP
{
  "mcpServers": {
    "hushh-consent-remote": {
      "url": "http://127.0.0.1:8000/mcp?token=<developer-token>"
    }
  }
}

GET /api/v1/user-scopes/{user_id}

  • Purpose. Discover the exact PKM-backed scopes Kai can expose for a user right now.
  • Auth. Developer token required.
  • Consent state. No user data is returned yet. This is the discovery step that happens before consent.
  • Request shape. Provide the user id in the path and the developer token in the query string or trusted server context.
  • Success. Returns discovered scope strings, available domains, and the runtime shape that the user can approve.
  • Failure modes. 401 for invalid developer tokens, 404 for unknown users, and 500 when the runtime cannot resolve the scope registry.
Example curl
curl -s \
  "http://127.0.0.1:8000/api/v1/user-scopes/user_123?token=<developer-token>"

Database and runtime factors that matter

Developers do not need raw table access, but they do need to understand why scope discovery, approval, export wrapping, and onboarding readiness behave differently across users and environments.

TableImportant fieldsWhy developers care
pkm_indexavailable_domains, domain_freshness, summary_projection, capability_flags, total_attributesExplains what a user can approve right now and how fresh the PKM surface is.
pkm_scope_registryscope_handle, scope_label, segment_ids, sensitivity_tier, exposure_enabledDrives scope discovery, approval labeling, and whether a scope can be exposed at all.
pkm_blobsdomain, segment_id, ciphertext, content_revision, manifest_revision, size_bytesShows how approved reads map to encrypted segments and why revision tracking matters.
vault_keysprimary_wrapper_id, vault_status, first_login_at, last_login_at, pre_onboarding_completedTells you whether vault wrapping and onboarding state are ready for export and approval.

Browser-safe vs backend-only boundaries

Browser-safe testing ends where developer tokens, connector wrapping metadata, or direct financial aggregation begin. Keep the developer-facing proxy for guided testing, but keep consent creation and financial reads on your backend.

SurfaceRecommended executionBoundary
GET /api/v1/user-scopes/{user_id}Backend or server-side onlyDiscovery depends on a developer token and should stay off the public browser path.
POST /api/v1/request-consentBackend onlyRequires connector key metadata so Hushh can wrap export keys back to your client safely.
GET /api/v1/consent-statusBackend or trusted dashboardPolling is token-bound and part of the approval lifecycle, not a public browser flow.
Agentic APIs browser proxySeparate documentation trackOlder A2A and MuleSoft flows now live under /developers/agentic-apis and should not be documented as part of Kai.
Plaid-backed financial refresh flowsBackend onlyFinancial aggregation and refresh remain server-to-server even when Kai later exposes the results.

Examples and common failure points

The most common integration issues come from skipping discovery, over-requesting scopes, or treating migration-era surfaces as if they were canonical. Use the runtime sequence below as the baseline for reviews and troubleshooting.

  • Discover first. Do not hardcode universal scopes when the runtime exposes them per user.
  • Request one scope at a time so approval language and audit state stay understandable.
  • Do not treat legacy transition tables as destinations for new data flows or exports.
  • Keep connector wrapping fields present on request-consent or your export handoff will fail later even if the approval is granted.
  • Keep A2A and MuleSoft guidance in the separate Agentic APIs track.