Comp AI CRM
Self-hosted CRM where a scheduled research agent keeps the records, tuned by four markdown skill files.
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.
- 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
- 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.
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_URLBETTER_AUTH_SECRETALLOWED_SIGN_INGOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRETMICROSOFT_CLIENT_IDMICROSOFT_CLIENT_SECRETMICROSOFT_TENANT_IDAPI_URLAPP_URLAUTH_COOKIE_DOMAINPERPLEXITY_API_KEYAI_GATEWAY_API_KEYAGENT_BRIDGE_SECRETREDIS_URLCRON_SECRETSLACK_CLIENT_IDSLACK_CLIENT_SECRETCRM_TELEMETRY_DISABLED- Config files
.env.exampledocker-compose.ymlapps/agent/agent/schedules/dispatch.ts- Prompt files
apps/agent/agent/instructions.mdapps/agent/agent/skills/evidence.mdapps/agent/agent/skills/identity-matching.mdapps/agent/agent/skills/data-boundaries.mdapps/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
- github.com/trycompai/crm
- MIT license
- Last commit Sep 2, 2026
- 9,383 stars
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_historysearch_crmidentify_contactresearch_personenrich_companyrecord_factschedule_recheckquery_crmread_crm_recordcreate_crm_activitypost_slack_message
Reach
Partial coverage. 2 of 7 jobs reachable through the stated interface.
| Job | Through the interface | Evidence |
|---|---|---|
| Research and enrich a contact or company | Not reachable | Runs on the bundled agent's schedule; no endpoint or token for an outside agent to trigger it |
| Read pipeline records | Not reachable | tRPC 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 record | Not reachable | Same tRPC surface, same cookie-only auth; no API token or key flow documented |
| Talk to the agent about a contact | Not reachable | Agent tab in the web app, guarded by AGENT_BRIDGE_SECRET; not an external endpoint |
| Sync Gmail or Microsoft mailboxes | Reachable | POST /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 person | Not reachable | schedule_recheck is an internal agent tool, not exposed outside the agent |
| Manage sign-in allow-list and SSO | Reachable | ALLOWED_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_KEYPERPLEXITY_API_KEYAGENT_BRIDGE_SECRET- Prompts live in
apps/agent/agent/instructions.mdapps/agent/agent/skills/evidence.mdapps/agent/agent/skills/identity-matching.mdapps/agent/agent/skills/data-boundaries.mdapps/agent/agent/skills/writing-a-brief.mdapps/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
| Field | Where it was seen | Confidence |
|---|---|---|
| formFactor | README: Next.js app plus NestJS API plus agent deployment | 95% |
| executionModel | README The agent: model-driven research with a fixed dispatcher and evidence ledger; runs with no keys at all | 90% |
| operability | README (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% |
| effort | README Configuration table and .env.example; skills are markdown files in apps/agent/agent/skills | 90% |
| editions | README License: MIT; no paid edition found | 80% |
| active | GitHub pushedAt 2026-09-02 | – |
| reach | 80% |
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
- github.com/trycompai/crm sourcing:smb-ops-crm:github
- trycrm.ai sourcing:smb-ops-crm:github