@silverbackbase/root
v0.7.0
Published
Business knowledge primitive for AI agents
Downloads
3,205
Readme
@silverbackbase/root
Business knowledge primitive for AI agents — a per-client "brain" in two layers:
- Soul — stable identity: offers, personas, objections, differentiators, competitors, geo zones, pricing, FAQs, profile. Extracted automatically at onboarding.
- Memory — accumulated experience: decisions and their reasons, patterns that repeatedly work or break, and never-do hard rules. Written as the work happens.
The soul tells an agent who the client is. The memory stops it from resurfacing a dead idea, breaking a constraint, or repeating last month's mistake.
How it works
Give Root a client URL. In 5 minutes, all your agents have full business context — no manual briefing.
URL → Firecrawl (site scraping) → LLM extraction → DataForSEO (local competitors) → structured knowledgeMCP Tools
| Tool | Type | Description |
|------|------|-------------|
| root_get_context | Read | Full business knowledge (soul + memory) — call before any content/SEO/prospection task. Optional task_type keeps it lean (filters decisions/patterns; soul + never-do always full) |
| root_get_category | Read | Specific category (personas, objections, decisions, never-do, etc.) |
| root_search | Read | Text search across all knowledge |
| root_history | Read | Change timeline of an item (or recent project activity) — before/after snapshots |
| root_onboard_from_url | Write | Onboard a client from their website URL |
| root_refresh | Write | Re-query SERP and detect new/lost competitors — run weekly or on demand |
| root_create_item | Write | Add a knowledge item (soul, or memory with required provenance; optional task_types to scope) |
| root_update_item | Write | Update an existing item (provenance re-checked on memory items) |
| root_delete_item | Write | Delete an item |
| root_revert | Write | Roll an item back to a previous state (re-creates it if deleted) — never destructive |
Self-hosted
Requirements
- Node.js ≥ 22
- Firecrawl API key (for onboarding)
- Anthropic API key (for LLM extraction)
- DataForSEO credentials (for competitor analysis, optional)
No database setup required — Root uses SQLite by default.
Install
Add to your Claude Code MCP config (.mcp.json in your project, or ~/.claude/claude_desktop_config.json):
{
"mcpServers": {
"root": {
"command": "npx",
"args": ["-y", "--package=@silverbackbase/root", "root-mcp"],
"env": {
"ROOT_ACCOUNT_ID": "my-agency",
"ANTHROPIC_API_KEY": "sk-ant-...",
"FIRECRAWL_API_KEY": "fc-...",
"DATAFORSEO_LOGIN": "...",
"DATAFORSEO_PASSWORD": "..."
}
}
}
}Root creates a root.db SQLite file automatically on first run. No migration, no setup.
Cloud deployment
For multi-user or hosted setups, set DATABASE_URL to switch to PostgreSQL automatically:
DATABASE_URL=postgresql://user:password@host:5432/root
ROOT_ACCOUNT_ID=my-agency
ANTHROPIC_API_KEY=sk-ant-...
FIRECRAWL_API_KEY=fc-...Root detects DATABASE_URL at startup and creates the table if it doesn't exist.
Environment variables
| Variable | Required | Description |
|----------|----------|-------------|
| ROOT_ACCOUNT_ID | No | Account identifier (default: "default") |
| DB_PATH | No | SQLite file path (default: ./root.db). Ignored when DATABASE_URL is set. |
| DATABASE_URL | No | PostgreSQL connection string. If set, Root uses Postgres instead of SQLite. |
| ANTHROPIC_API_KEY | For onboarding | LLM extraction from website content |
| FIRECRAWL_API_KEY | For onboarding | Website scraping |
| DATAFORSEO_LOGIN | For onboarding + refresh | Competitor analysis via SERP |
| DATAFORSEO_PASSWORD | For onboarding + refresh | Competitor analysis via SERP |
| ROOT_REFRESH_CRON | No | Cron expression for automatic market refresh (e.g. 0 8 * * 1 = every Monday 8am). Scheduler is disabled if not set. |
Knowledge categories
Soul — stable identity
| Category | Contains |
|----------|---------|
| offer | Services, products, prices |
| persona | Target customer profiles |
| objection | Common sales objections and responses |
| differentiator | Competitive advantages |
| competitor | Competitor names, positioning, weaknesses |
| geo | Geographic zones served |
| pricing | Pricing structure and packages |
| faq | Frequently asked questions |
| profile | General business profile (name, sector, tone) |
Memory — accumulated experience
| Category | Contains |
|----------|---------|
| decision | A choice that was made, and the reasoning behind it |
| pattern | Something that repeatedly works or breaks, by task type |
| never_do | A hard constraint — what to never propose, write, or recommend |
Provenance is mandatory for memory. Every decision, pattern, and never_do item must include source (where the knowledge came from) and reason (why it matters) — otherwise the write is rejected. A brain is only useful if the team trusts it, and trust comes from knowing where each entry came from. No source, no entry.
// root_create_item — a never-do rule
{
"category": "never_do",
"data": {
"rule": "Never position the client as the cheap alternative",
"source": "client strategy call 2026-06-01",
"reason": "Premium positioning — price-led messaging attracts the wrong leads"
}
}root_get_context returns memory alongside the soul, under constraints (never-do), decisions, and patterns. Treat constraints as non-negotiable.
Requirements
- Node.js 22+
- Claude Code or any MCP-compatible AI agent
License
MIT — SilverBackBase
