@silverbackbase/root
v0.7.3
Published
Business knowledge primitive for AI agents
Readme
@silverbackbase/root
Business knowledge primitive for AI agents — a per-client "brain" in three layers:
- Soul — stable identity: offers, personas, objections, differentiators, competitors, geo zones, pricing, FAQs, profile. Extracted automatically at onboarding.
- Goals — quantified objectives with direction: a target value (floor to reach or ceiling not to exceed), unit, period, and optional current value. Keeps agent recommendations anchored to real numbers.
- 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. Goals anchor recommendations to real numbers. 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 + goals + memory) — call before any content/SEO/prospection task. Optional task_type keeps it lean (filters decisions/patterns; soul + goals + never-do always full) |
| root_get_category | Read | Specific category (personas, objections, target, 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, goals/target, 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) |
Goals — quantified objectives
| Category | Contains |
|----------|---------|
| target | Quantified objective with direction: a number to reach (min) or not exceed (max) |
Target fields:
| Field | Required | Description |
|-------|----------|-------------|
| label | Yes | Human name, e.g. "Qualified leads per month" |
| target_value | Yes (number) | Numeric threshold, e.g. 50 |
| unit | Yes | Free unit: "leads", "EUR", "%", "ratio"... |
| direction | Yes | "min" = floor to reach (>= N) / "max" = ceiling not to exceed (<= N) |
| metric | No | Machine key, e.g. "qualified_leads_per_month" |
| period | No | "month" / "quarter" / "year" / null |
| current_value | No (number) | Current value for progress tracking |
| source | No | Origin of the target, e.g. "client brief 2026-06-25" |
// root_create_item — a target
{
"category": "target",
"data": {
"label": "Qualified leads per month",
"target_value": 50,
"unit": "leads",
"direction": "min",
"period": "month",
"current_value": 32,
"source": "client brief 2026-06-25"
}
}root_get_context returns targets under a targets key, alongside the soul and memory layers.
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 soul + goals + memory: constraints (never-do), decisions, patterns, and targets. Treat constraints as non-negotiable.
Requirements
- Node.js 22+
- Claude Code or any MCP-compatible AI agent
License
MIT — SilverBackBase
