AI agents are stateless by default. Every time an agent runs, it usually starts blind, making the same wrong decisions repeatedly.
Fusemomo is the behavioral entity graph for action-taking AI agents. It resolves who every entity is across all connected APIs, logs every action outcome, and recommends what works, before your agent acts. It provides three core layers:
- L1 — Identity Resolution: Resolves the same entity across every connected API into one canonical record, using both deterministic and probabilistic (trigram similarity) fuzzy matching.
- L2 — Behavioral Graph: An immutable, append-only log of every action an agent has taken on any entity through any API.
- L3 — Behavioral Intelligence (Next Best Action): Before an agent acts, it queries Fusemomo for the highest-success action type relative to its intent based on historical interactions.
The backend API is designed using a clean three-layer architecture (Handler → Service → Repository).
- Language: Go
1.25.1 - Framework: Fiber
v3 - Primary Database: PostgreSQL 17 via Supabase
- Driver:
pgx/v5 - Validations:
validator/v10 - Auth: SHA-256 hashed API Keys & Supabase JWT via
golang-jwt/v5 - OpenAPI:
swaggo/swagauto-generation
FuseMomo's backend runs heavily strictly typed tables with full integration for Row Level Security (RLS) and Role-Based Access Control (RBAC).
| Table | Purpose |
|---|---|
tenants |
One row per FuseMomo customer. Linked via Supabase Auth. Root of data isolation. |
api_keys |
Programmatic credentials for agents with stored SHA-256 hashes. Bypasses RLS. |
entities |
The canonical domain-agnostic record for any observed entity (person, repo, ticket). |
entity_identifiers |
L1 Graph: Stores deterministic and probabilistic mapping of identifiers across APIs. |
entity_links |
The audit trail mapping of merged entity events. |
interactions |
L2 Graph: Highly-indexed, append-only immutable event log of all API attempts and outcomes. |
recommendations |
L3 Audit Log: Tracks the Next Best Action quality over time to close the feedback loop. |
webhook_endpoints |
Tenant-registered URLs for real-time event delivery. |
webhook_events |
Per-attempt delivery log featuring automatic retry tracking. |
usage_logs |
Monthly usage counters for usage-based billing limitations. |
FuseMomo serves explicit operations via pragmatically versioned endpoints (/v1).
Requires standard API Key authentication (Bearer <key>)
GET /v1/core/entities- List entities globallyGET /v1/core/entities/:id- Fetch singular entity summaryDELETE /v1/core/entities/:id- GDP erasure/redact anonymityPOST /v1/core/entities/resolve- Search or dynamically create an entity profile via identifierPOST /v1/core/entities/:id/link- Forcefully merge identitiesPOST /v1/core/interactions/log- Log a single behavioral interactionPOST /v1/core/interactions/batch- Batch submit multiple interaction eventsPOST /v1/core/recommends- Get "Next Best Action" recommendation given an intentPATCH /v1/core/recommends/:id/outcomes- Push final execution outcome for scoring feedback
Requires Supabase JWT Auth & active user / admin roles.
GET /v1/dashboard/profile- Fetch tenant subscription and constraintsPATCH /v1/dashboard/profile- Update profile configurationsDELETE /v1/dashboard/- Tenant account deletionGET /v1/dashboard/usage- Current metrics (resolution count, limits)GET /v1/dashboard/usage/history- Monthly billing retention metricsGET /v1/dashboard/recommendations- Paginated insights of intelligence success queriesGET /v1/dashboard/recommendations/stats- Recommendation success and improvement metrics
Requires Supabase JWT Auth.
GET /v1/app/key- Fetch individual key usageGET /v1/app/key/all- List all generated credentialsPOST /v1/app/key/create- Provision new key for agent systemsDELETE /v1/app/key/:id- Revoke and explicitly delete API keyPOST /v1/app/key/:id/revoke- Revoke activity but preserve audit historyPOST /v1/app/key/sync-expired- Cron manual job for expiration state maintenance
GET /v1/auth/login/:provider- OAuth Provider Handshake (Google, GitHub)GET /ping- Health Check (pong)GET /health- Deeper structural DB ping
Requires Supabase JWT Auth with strict admin role.
GET /v1/admin/tenants- Display all registered usersPATCH /v1/admin/tenants/:id/plan- Direct plan overridesDELETE /v1/admin/tenants/:id- Prune tenant profileGET /v1/admin/usage/global- Full macro platform usage metrics
Note
other endpoints are include in cmd/docs directory
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Ensure a .env file is placed in your root directory containing your Supabase instances (DATABASE_URL, SUPABASE_JWT_JWK, etc)
Run build make command with tests
make allBuild the Go application via cmd/api
make buildRun the application locally
make runLive reload the application (requires package installer like Air):
make watchRun the testify test suite:
make testClean up binary from the last build:
make clean