<- all tokdocs

A CRM Built Around a Durable Research Agent, Not a Form

Watch on TikTok

View on TikTok ->

This open-source CRM inverts the usual design: the research agent is the product, and the database is just where it writes things down. The video walks through trycompai/crm, an MIT-licensed, agentic-first CRM from Comp AI. Most CRMs are a database with a form in front of them, and the AI versions bolt a chat box onto the side. This one runs the agent as its own deployment on its own schedule, so the work of finding out what is true and recording it does not fall back on a human.

The Agent Runs Itself

The README makes the framing explicit: the agent is not a feature of the CRM, the CRM is where the agent keeps its notes. It runs on its own deployment, on its own schedule, against its own work queue. It decides what to look at next, books its own follow-ups, spends a research budget, and stops when that budget runs out. Nothing about it is request-response. As the caption puts it, closing the browser does not stop it, because the work lives in a queue rather than in a live session.

The agent lives in apps/agent, built on eve, described in the repo as Vercel's filesystem-first framework for durable agents. In that model a tool is a file, a skill is a markdown file, and a schedule is a file. The runtime handles the durable part: sessions that survive a redeploy and work that resumes where it stopped. The frames list 18 authored tools such as read_crm_history, search_crm, identify_contact, research_person, enrich_company, and record_fact, alongside 4 skills, 1 schedule, and a sandbox with bash, grep, glob, a /workspace, and deny-all egress.

The Work Queue Instead of Cron

The video shows that the API deliberately has no intelligence in it. NestJS reports that something happened, a thread was ingested or a company was created, by writing a row to a queue. The agent then leases that row and decides what it means. A Nest service that calls an enrichment API directly is treated as a bug.

The queue itself lives in lib/tasks.ts. Its claimDue function leases rows with FOR UPDATE SKIP LOCKED, so two dispatchers take disjoint work and a run that dies frees its row when the lease expires. The repo notes that recurring intent like "every N minutes, the oldest ten contacts" belongs in a task's dueAt, not in a cron expression. A dispatch.ts file decides nothing on its own: it leases what is due and starts one session per row.

Nothing About a Person Is Guessed

The rule the agent never breaks is that nothing about a person is guessed. No tool accepts a confidence score. The reasoning shown on screen is that a model asked to grade its own certainty will be wrong in the direction that makes it look useful, so it flatters itself. Instead, tools report what they actually observed, using signals like crm.signature-block and github.account-identity, and a ledger prices that evidence. Strong evidence writes to the record. Weak evidence becomes a suggestion that a human settles.

The Stack

The frames lay out the full stack: a Turborepo monorepo on Bun, deployed on Vercel. The model layer runs through the Vercel AI Gateway, which the README notes avoids a provider SDK, and OIDC on Vercel means there is no key to manage. Sandboxing uses Vercel Sandbox in production, with Docker or microsandbox locally. The front end is Next.js App Router with shadcn/ui and nuqs for URL state. The API is NestJS with nestjs-trpc, and data runs through Prisma on Postgres (Neon) with optional Redis (Upstash). Auth is Better Auth, Google-only, with a single allow-list. Files use Vercel Blob to mirror profile pictures so they survive the source going away, and tooling is Biome with TypeScript everywhere.

Key Takeaways

  • The agent is the product. The design treats the durable research agent as the core, with the database acting only as its notebook rather than the other way around.
  • Durability comes from the queue. Work is written to a queue and leased with FOR UPDATE SKIP LOCKED, so runs survive redeploys, resume where they stopped, and let multiple dispatchers split work cleanly.
  • The API stays dumb on purpose. NestJS only records that something happened; a service that calls an enrichment API directly is considered a bug, which keeps all decision-making inside the agent.
  • No self-graded confidence. No tool accepts a confidence score, on the reasoning that a model grading its own certainty will inflate it. Tools report observations, and a ledger prices the evidence.
  • Humans settle weak evidence. Strong evidence writes to the record automatically, while weak evidence becomes a suggestion a person confirms, keeping guesses out of the database.
  • Built on a filesystem-first agent framework. eve treats tools, skills, and schedules as files, which is what makes sessions durable across redeploys.

Resources

Published August 3, 2026. Writeup generated from a favorited TikTok.