Engineering Architecture • v3.2.2

Under the hood of Your Company Brain.

A local-first knowledge extraction pipeline that connects to 38 workspace tools, runs local models by default, and synthesizes structured procedures for autonomous agents.

Quick Start CLI CommandsPyPI: ycb
# 1. Install CLIpip install ycb
# 2. Initialize & Licenseycb init
# 3. Connect Data Sourceycb connect github
# 4. Sync Knowledgeycb sync
# 5. Ask Questionsycb --ask "deployment process"
Local inference by default (Gemma 4 via Ollama)Get license key →
Performance & Engineering Metrics

Built for speed, accuracy, and absolute sovereignty.

Rigorous benchmarks measured across multi-connector syncs, sentence chunking, and local LLM synthesis in YCB.

01 / EFFICIENCY
-95%

Documentation Time

Procedures that took 45 minutes to draft manually are synthesized and formatted in under 2 minutes.

02 / CONNECTORS
38

Enterprise Sources

Unified across communication, code, tracking, HR, customer support, and analytics tools.

03 / IDEMPOTENCY
0 dupes

Deduplicated Sync

Running sync 10 times produces the exact same result as running once. Resume interrupted syncs instantly.

04 / PRIVACY
Local

Local by Default

Inference runs on your own computer by default, with optional cloud models (OpenAI, Claude, OpenRouter) available whenever you need them.

Interactive CLI Simulator

Experience the YCB workflow in real time.

YCB lives in your terminal. Ask natural-language questions, switch local or cloud AI models, and inspect auto-generated procedure cards.

ycb terminal — zsh (localhost:11434)
Sample queries:
$
Confidence: 94%Category: Finance & Customer Operations
340ms local inference

📋 Handle Customer Refunds & Disputes

Procedure Steps:
  1. Verify transaction ID in Stripe / Billing portal against HubSpot deal record.
  2. Check customer account age — if under 30 days, approve standard refund without manager sign-off.
  3. If subscription is active, prompt user whether to cancel renewal or issue partial credit.
  4. Trigger automated confirmation receipt via Slack (#billing-ops) and customer email.
Decision Rules (If / Then):
if transaction > 30 daysEscalate to Tier 2 Support Lead via Linear ticket.
if chargeback filedLock dispute window and export audit logs immediately.
if annual contractCalculate pro-rated service credits instead of direct cash refund.
Source lineage:slack:C04A92K:171928341notion:page:9f83a1c8github:org/billing-service#142
Idempotency Verified (zero data re-processing)YCB v3.2.2 • Offline Local SQLite
Technical Architecture

The 5-stage knowledge synthesis pipeline.

Engineered from the ground up for privacy, idempotency, and high-accuracy extraction across 38 enterprise platforms.

01DATA LAYER

Ingestion & 38 Connectors

Pulls raw documents, messages, issues, and customer tickets through a unified BaseConnector interface with error isolation.

Engineering Highlights:
  • →Abstract BaseConnector enforces ingest(days_back=30) and retry_with_backoff() for 429/5xx rate limits.
  • →Dynamic registry.py loads configured connectors automatically without hardcoding.
  • →Idempotency check filters out already processed items via get_processed_source_item_ids().
  • →One failing connector logs an error and continues — never blocking the rest of the sync run.
Stage Benchmark38 Connectors • 0 Duplicates
src/pipeline/stage_01.pyPython 3.11
class SlackConnector(BaseConnector):
    def ingest(self, days_back: int = 30) -> List[RawDataItem]:
        # Idempotent fetch with exponential backoff
        for channel in self.get_joined_channels():
            messages = self.retry_with_backoff(
                lambda: self.client.conversations_history(channel=channel.id)
            )
            for msg in messages:
                yield RawDataItem(
                    id=f"slack:{channel.id}:{msg['ts']}",
                    source=DataSourceType.SLACK,
                    content=msg['text']
                )
Synthesized Knowledge Cards

Machine-readable procedure cards for AI agents.

Instead of raw messy text dumps, Company Brain extracts actionable step-by-step procedures with strict domain schema enforcement.

Select example:
96% ConfidenceFinance & Support

Handle Customer Refunds & Billing Disputes

Standardized procedure for evaluating customer refund eligibility, processing Stripe charge adjustments, and recording customer retention notes.

Prerequisites & Required Access:
  • ✓Stripe Billing Admin or HubSpot Support Specialist permissions
  • ✓Access to #billing-ops Slack channel for manager sign-offs
Execution Procedure Steps:

Step 1: Lookup and verify transaction

Locate customer Stripe Customer ID (cus_xxx) via email in HubSpot. Cross-reference invoice charge ID and verify card authorization status.

Step 2: Check 30-day freshness window

If transaction was billed within the last 30 calendar days, proceed directly without escalation. If > 30 days, tag @finance-lead in #billing-ops.

Step 3: Issue credit or cash reversal

Execute refund in Stripe Dashboard with reason "Requested by customer". If customer wishes to stay on free tier, downgrade plan immediately.

Step 4: Send confirmation & update ticket

Dispatch automated receipt, log resolution in HubSpot ticket, and mark conversation closed with tag "refund_processed".

Decision Matrix (If / Then Branching):
IF: if chargeback or dispute filed→ Do not issue manual refund. Forward evidence to Stripe dispute portal within 7 days.
IF: if annual enterprise contract→ Calculate prorated service credits; cash refunds require CFO approval.
IF: if churn reason is missing feature→ Log feature request to Linear roadmap with customer tag before closing ticket.
Zero-Data-Leakage Guarantee

Your company data never leaves your hardware.

Confidential Slack threads, salary discussions, security post-mortems, and customer PII should never be transmitted to third-party cloud AI vendors.

Company Brain executes inference locally via Ollama (Gemma 4), stores raw data and chunks in an on-premise SQLite database, and enforces strict offline idempotency.

✓ 100% On-PremiseRuns on your laptops, workstations, or air-gapped private servers.
✓ Zero Cloud DPA NeededNo third-party data processing agreements or compliance audits.
LOCAL AIR-GAPPED PERIMETER
INGESTION LAYER38 Connectors
SlackNotionGitHubJiraGoogle Docs+33 more
↓ Sliding Window Chunker & Dedup
LOCAL AI ENGINE (OLLAMA)localhost:11434
gemma4:e4bSingle Combined Extraction Prompt
↓ Pydantic Domain Synthesis
ON-PREMISE STORAGE & OUTPUTLocal Only
data/company_brain.dboutput/skills_file.json
✓ 0 External API Calls • 0 Data Transmitted Outside Your Network
Target Audience

Designed for teams that value speed and data ownership.

Whether you're an engineer building autonomous workflows or a COO streamlining operations.

PROFILE_A

Fast-Growing Startups & Scaleups

High onboarding velocity, rapidly evolving product specs, and thin documentation. Transform informal Slack consensus into official SOPs automatically.

PROFILE_B

AI Agent & Tool Builders

Engineers building autonomous agents with LangChain, AutoGen, or Cursor who need structured company procedures with exact decision trees.

PROFILE_C

Regulated & Security-Conscious Orgs

FinTech, healthcare, and enterprise teams with strict data residency requirements that cannot send internal documents to public cloud AI APIs.

PROFILE_D

Distributed Teams Across 38+ SaaS Apps

Teams tired of hunting across Slack threads, Notion wikis, Linear backlogs, and Jira boards just to find out how a simple process works.