mothermachine

Browse / SMB ops and CRM

Comp AI CRM

Self-hosted CRM where a scheduled research agent keeps the records, tuned by four markdown skill files.

AdaptableOperable Business appWeb app Hybrid TypeScript Screen only License: MIT

An MIT-licensed CRM whose built-in agent runs on its own schedule, reads your mail threads and signature blocks, researches contacts, and writes only strongly evidenced facts back. Three deployments (Next.js app, NestJS tRPC API, agent) share one .env; the agent's behavior lives in prompt files you can edit. There is no token-authenticated API for an outside agent yet.

Use it when
  • I want a CRM that fills itself in from our inboxes instead of nagging reps to log calls
  • I want to change what the research agent is allowed to look at and write, without rewriting the app
Gotchas
  • No API tokens: every request needs an identity-provider session, so an outside agent has no documented way in
  • Three separate deployments must agree on DATABASE_URL and BETTER_AUTH_SECRET or you get a redirect loop
  • Microsoft client secrets expire (6 months default) and mail sync fails silently when they do
  • Default branch is release, not main

Last activity Sep 2, 2026. Fit: adaptable 3, operable 1.

Editions

Free · Free open source

  • Clonegit clone https://github.com/trycompai/crm
  • ImageContainer

For agents: JSON · Markdown

Adaptable: what is yours to change

Make it yours

Config only27 things to edit

One .env at the repo root feeds all three processes; the README table lists which values matter. Sign-in is an allow-list (ALLOWED_SIGN_IN) plus Google or Microsoft OAuth. The agent's judgement is prose in apps/agent/agent/skills/*.md and instructions.md, versioned like code; edit those to change what counts as evidence, how identities are matched, and what a brief looks like. Optional keys open more sources.

Env vars
DATABASE_URL BETTER_AUTH_SECRET ALLOWED_SIGN_IN GOOGLE_CLIENT_ID GOOGLE_CLIENT_SECRET MICROSOFT_CLIENT_ID MICROSOFT_CLIENT_SECRET MICROSOFT_TENANT_ID API_URL APP_URL AUTH_COOKIE_DOMAIN PERPLEXITY_API_KEY AI_GATEWAY_API_KEY AGENT_BRIDGE_SECRET REDIS_URL CRON_SECRET SLACK_CLIENT_ID SLACK_CLIENT_SECRET CRM_TELEMETRY_DISABLED
Config files
.env.example docker-compose.yml apps/agent/agent/schedules/dispatch.ts
Prompt files
apps/agent/agent/instructions.md apps/agent/agent/skills/evidence.md apps/agent/agent/skills/identity-matching.md apps/agent/agent/skills/data-boundaries.md apps/agent/agent/skills/writing-a-brief.md
Accounts you need
Google Cloud OAuth client or Microsoft Entra app (at least one)Perplexity (optional)Context (optional)Vercel AI Gateway (optional)

Source

Operable: what an agent can drive

Interface

GUIScreen onlypublished by the builderlocal

How an agent can drive an Operable Listing, in five levels: native (built for the agent as the primary interface), official (the Builder ships an agent interface), wrapped (a third party wraps the software's API), config (an agent can only drive it by editing files), gui (screen control only). An interface is official only when it is published by the same organization that ships the software. GUI-level Listings are allowed and sorted last.

Docs
github.com/trycompai/crm
Tools
read_crm_history search_crm identify_contact research_person enrich_company record_fact schedule_recheck query_crm read_crm_record create_crm_activity post_slack_message

Reach

Partial coverage. 2 of 7 jobs reachable through the stated interface.

JobThrough the interfaceEvidence
Research and enrich a contact or companyNot reachableRuns on the bundled agent's schedule; no endpoint or token for an outside agent to trigger it
Read pipeline recordsNot reachabletRPC router in apps/api sits behind a Better Auth IdP session cookie; README: 'there is no way to get a session from a terminal'
Write facts and activities to a recordNot reachableSame tRPC surface, same cookie-only auth; no API token or key flow documented
Talk to the agent about a contactNot reachableAgent tab in the web app, guarded by AGENT_BRIDGE_SECRET; not an external endpoint
Sync Gmail or Microsoft mailboxesReachablePOST /internal/sync/mailboxes guarded by the CRON_SECRET env var, documented in README Deploying; the one non-interactive endpoint
Schedule a re-check on a personNot reachableschedule_recheck is an internal agent tool, not exposed outside the agent
Manage sign-in allow-list and SSOReachableALLOWED_SIGN_IN env var; Settings → SSO in-app

Code stack

Languages
TypeScript
Frameworks
Next.jsNestJSnestjs-trpcPrismaBetter Autheve
Package manager
bun
Database
PostgreSQLRedis (optional)
Hosting target
VercelDocker
Built
Unknown (recorded, never ranked)

Model stack

Providers
Vercel AI GatewayPerplexity (optional)Context (optional)
Models
none
Keys you need
AI_GATEWAY_API_KEY PERPLEXITY_API_KEY AGENT_BRIDGE_SECRET
Prompts live in
apps/agent/agent/instructions.md apps/agent/agent/skills/evidence.md apps/agent/agent/skills/identity-matching.md apps/agent/agent/skills/data-boundaries.md apps/agent/agent/skills/writing-a-brief.md apps/agent/agent/subagents/agent_runner/instructions.md

Skills

One repo tooling skill for AI UI elements used by contributors.

Kind
contributor
Paths
.agents/skills/ai-elements/SKILL.md

Evidence and confidence

FieldWhere it was seenConfidence
formFactorREADME: Next.js app plus NestJS API plus agent deployment95%
executionModelREADME The agent: model-driven research with a fixed dispatcher and evidence ledger; runs with no keys at all90%
operabilityREADME (release branch): app talks to the API over tRPC; sign-in only through Google/Microsoft IdP, session cookie minted by Better Auth; no token, API key, or REST docs. Only non-interactive route is POST /internal/sync/mailboxes with CRON_SECRET. Screen control of the web app is the fallback.90%
effortREADME Configuration table and .env.example; skills are markdown files in apps/agent/agent/skills90%
editionsREADME License: MIT; no paid edition found80%
activeGitHub pushedAt 2026-09-02–
reach80%

Open questions

  • Is a token-authenticated API or MCP endpoint planned for outside agents?
  • Which model does the agent call through AI_GATEWAY_API_KEY by default?
  • Is trycrm.ai a hosted edition with pricing?

Sources