Skip to main content

Entity Detection: Run It on Every Message

Goal

Every inbound message gets scanned for original thinking AND entity mentions so the brain grows on every conversation, automatically.

What the User Gets

Without this: the agent answers questions but forgets everything. You mention Pedro in a meeting, and next week the agent doesn’t know who Pedro is. With this: every person, company, and idea mentioned in conversation gets a brain page. Next time Pedro comes up, the agent already has context. The brain compounds.

Implementation

Spawn a lightweight sub-agent on EVERY inbound message. Do NOT wait for it to finish before responding. It runs in parallel.

The Detection Prompt

Notability Filtering

Before creating a new entity page, check notability:

What Counts as Original Thinking

Filing Rules

The Iron Law of Back-Linking

Every entity mention MUST create a back-link FROM the entity page TO the source. This is not optional.
Without back-links, you can’t traverse the graph. “Show me everything related to Pedro” only works if Pedro’s page links back to every mention.

Tricky Spots

  1. Don’t block the conversation. Entity detection runs async. The user should see a response immediately, not wait 2 minutes while the sub-agent enriches 5 entity pages.
  2. Sonnet, not Opus. Entity detection is pattern matching, not deep reasoning. Sonnet is 5-10x cheaper and fast enough. Use Opus for the main conversation.
  3. Exact phrasing matters. “Markdown is actually code” is an insight. “Markdown can be used as code” is a summary. Capture the first version.
  4. Don’t create stubs. If you create a page, make it good. Run a web search, build out the compiled truth, add context. A stub page with just a name is worse than no page (it gives false confidence).
  5. Dedup before creating. Always modusbrain search before creating a page. Variant spellings, nicknames, and company abbreviations cause duplicates. “Pedro Franceschi” and “Pedro” might be the same person.

How to Verify

  1. Send a message mentioning a person. Say “I had coffee with Sarah Chen from Acme Corp today.” Verify: brain/people/sarah-chen.md was created or updated, brain/companies/acme-corp.md was created or updated, both have timeline entries with today’s date.
  2. Send a message with an original idea. Say “What if we could distribute software as markdown files that agents execute?” Verify: brain/originals/{slug}.md was created with your exact phrasing.
  3. Check back-links. Open Sarah Chen’s page. It should have a timeline entry linking back to today’s conversation. Open Acme Corp’s page. Same.
  4. Send a boring message. Say “ok sounds good.” Verify: nothing was created. The detector should report “No signals detected.”
  5. Check for duplicates. Mention “Pedro” then later “Pedro Franceschi.” Verify: one page, not two.

Part of the ModusBrain Skillpack.