Text goes in. Evidence comes out.

Every extracted claim carries who said it, how confident we are, and what else corroborates it.

What goes in
#eng-decisions · 2024-02-15 · Sarah Chen

“Talked to Platform team — they approved migrating auth from JWT to sessions. I'll own the migration. Timeline is Q2. Redis will handle session storage, API gateway needs to be updated.”
One Slack message. Buried in a channel nobody will search again.
What comes out
sarah chen proposed auth migration
conf 0.85 · source: slack/#eng-decisions

platform team approved auth migration
conf 0.90 · source: slack/#eng-decisions

auth migration depends_on redis
conf 0.80 · source: slack/#eng-decisions

api-gateway affected_by auth migration
conf 0.75 · source: slack/#eng-decisions
4 claims. Sourced, confidence-scored, queryable. Retract one and dependents are flagged.

Pick your path

Attest Brain — 2 minutes

pip install -U attestdb
attest brain install

Done. Your coding agent gets a persistent brain that learns across sessions. No API key needed. Works with Claude Code, Cursor, Windsurf, Codex, Gemini CLI.

Knowledge Extraction — 10 minutes

Connect Slack, docs, or any text. Structured claims come out.

↓ Walkthrough below.


Cost estimate (Path B only). Attest supports heuristic extraction (free, offline, no API key) and LLM extraction (deeper relationships, needs an API key). We recommend Gemini for LLM extraction — best extraction quality in our benchmarks, and the free tier (1,500 requests/day) is enough for most workspaces. A typical 30-day Slack workspace costs $0.01–0.05 with Gemini 2.5 Flash Lite. Other providers (DeepSeek, Grok, OpenAI) also work — see the provider table below.

What You Need (Path B)

Three things, all free. Takes about 5 minutes total.

WhatWhyTime
Gemini API keyExtracts relationships from text (free tier)1 min
Slack Bot TokenReads your Slack messages3 min
Google Docs token (optional)Reads your Google Docs5 min

Walkthrough

1

Install Attest

pip install attestdb requests streamlit pyvis

attestdb is the database. requests is needed for API connectors. streamlit and pyvis power the visual explorer.

2

Get a Gemini API key

Gemini has the best extraction quality in our benchmarks and a generous free tier (1,500 requests/day — enough for most workspaces).

  1. Go to aistudio.google.com/apikey
  2. Click Create API key
  3. Copy the key (starts with AIza...)

Create a .env file in your project directory and add the key:

GOOGLE_API_KEY=AIza...your-key-here
No API key? You can skip this step. Attest will use heuristic extraction (free, offline), which captures explicit statements like “X depends on Y” but misses implicit relationships. You can always add an API key later and re-run.
3

Create a Slack app and get a bot token

  1. Go to api.slack.com/appsCreate New AppFrom scratch
  2. Name it anything (e.g. “Attest”), select your workspace
  3. In the sidebar, click OAuth & Permissions
  4. Scroll to Bot Token Scopes and add these scopes:
    channels:read · channels:history · channels:join · groups:read · groups:history · users:read · files:read
  5. Scroll up and click Install to WorkspaceAllow
  6. Copy the Bot User OAuth Token (starts with xoxb-)

Add it to your .env file:

SLACK_BOT_TOKEN=xoxb-your-token-here

Your .env file should now look like:

GOOGLE_API_KEY=AIza...your-key-here
SLACK_BOT_TOKEN=xoxb-your-token-here
Privacy. The Slack bot reads messages directly from the Slack API to your machine. Nothing is sent anywhere except the LLM provider you configured (Gemini by default). Your Slack data never touches Attest servers — there are no Attest servers. Everything runs locally.
4

Run the quickstart

python examples/quickstart.py

This reads your .env file, connects to Slack, fetches the last 90 days of messages, extracts claims using your LLM provider, and launches the Streamlit explorer.

Common options:

# Fewer days of history (faster first run)
python examples/quickstart.py --lookback-days 30

# Only specific channels
python examples/quickstart.py --channels general,engineering,product

# Skip the Streamlit UI
python examples/quickstart.py --no-streamlit

On re-runs, the script resumes from where it left off — only new messages are fetched.

First run timing. Depends on your Slack workspace size. A small workspace (a few channels, 30 days) takes 2–5 minutes. A large workspace (50+ channels, 90 days) can take 15–30 minutes, mostly waiting on the Slack API rate limit (1 request per 1.2 seconds).
5

Explore with Streamlit

After ingestion, the quickstart automatically opens the Streamlit explorer at localhost:8501. If you skipped it, launch it manually:

streamlit run app.py

Here’s what you’ll see — six tabs:

who owns the auth migration?
Sarah Chen proposed the auth migration and the Platform team approved it. Redis will handle session storage. The API gateway needs to be updated as part of the migration.
5 claims 3 sources conf 0.87
▼ Evidence
  • sarah chen proposed auth migration 0.85
  • platform team approved auth migration 0.90
  • auth migration depends_on redis 0.80
Entities
  • › auth migration
  • redis
  • sarah chen
  • api-gateway
  • platform team

auth migration

Type: project · Claims: 12
Relationships:
depends_on → redis 0.80
proposed ← sarah chen 0.85
approved ← platform team 0.90
affected_by ← api-gateway 0.75
aspirin reduces inflammation via COX-2
SUPPORTED — confidence 0.82
2 supporting chains through COX-2 and prostaglandin synthesis. 1 confidence gap: aspirin → platelet aggregation (weak, 0.4).
2 supporting 0 contradicting 1 gap
▼ Supporting chain
  • aspirin inhibits COX-2 0.92
  • COX-2 promotes inflammation 0.88
3 discoveries generated from graph structure analysis.
▼ Top discoveries
  • TREM2 may inhibit TP53 via NF-kB 0.78
  • BRCA1’s promotes pattern may extend to DNA repair 0.65
  • KRAS may activate ERK via RAF 0.71
Health: 74/100 Multi-src: 62% Fresh: 85%
▼ Vulnerabilities
  • 12 single-source entities blind
  • 5 stale claims (>90 days) stale
  • 3 fragile claims (1 source) fragile
7 intelligence APIs — diff, simulate, compile, explain, forecast, contradictions, merge.
▼ Sample: db.diff(since="2025-01-01")
  • 312 new beliefs discovered new
  • 89 beliefs strengthened stronger
  • 3 new contradictions conflict
847
Claims
234
Entities
12
Types

Sidebar stats show the shape of your knowledge base at a glance.

6

Connect Google Docs (optional)

Pull documents from your Google Drive and extract claims from their content. No GCP project needed — use Google’s OAuth 2.0 Playground to get a token in 5 clicks.

Get an OAuth token via the Playground:

  1. Go to OAuth 2.0 Playground
  2. In the left panel, find Drive API v3 → check https://www.googleapis.com/auth/drive.readonly
  3. Find Google Docs API v1 → check https://www.googleapis.com/auth/documents.readonly
  4. Click Authorize APIs → sign in with your Google account → Allow
  5. Click Exchange authorization code for tokens
  6. Copy the Access token (starts with ya29.)

Add it to your .env file:

GOOGLE_DOCS_TOKEN=ya29.a0...your-token

Run with Docs:

python examples/quickstart.py --gdocs-token $GOOGLE_DOCS_TOKEN

Fetches up to 50 documents by default. Change with --max-docs 100. Can be combined with Slack — both sources are ingested into the same database.

Token expires in 1 hour. The OAuth Playground tokens are short-lived. For long-running use, the auth proxy at auth.attestdb.com handles OAuth and refresh automatically — no GCP project needed on your end.

Domain Context

The quickstart auto-detects your domain from Slack channel names. If your workspace has channels like #drug-discovery, #ml-research, #customer-support, the extractor automatically understands what your organization does and prioritizes domain-relevant claims over routine CI/CD noise.

You can override auto-detection if needed:

db.set_domain_context(
    "E-commerce platform. High-value: product catalog, customer segments, "
    "pricing strategy, vendor relationships. Lower priority: build notifications."
)

The extractor will still capture CI/CD events (who merged what), but will spend more effort on substantive domain discussions.

Using the Python API Directly

The quickstart script is a convenience wrapper. You can do everything from Python:

1

Ingest claims manually

import attestdb
db = attestdb.open("my.db")

db.ingest(
    subject=("sarah chen", "person"),
    predicate=("proposed", "proposed"),
    object=("auth migration", "project"),
    provenance={"source_type": "slack", "source_id": "slack/eng-decisions"},
    confidence=0.85,
)
2

Extract from text

db.ingest_text(
    "Platform team approved migrating auth from JWT to sessions. "
    "Redis will handle session storage.",
    source_id="slack/eng-decisions/2024-02-15",
)
3

Query

frame = db.query("auth migration", depth=2)
print(frame.narrative)
for rel in frame.direct_relationships:
    print(f"  {rel.target.name} --[{rel.predicate}]--> conf={rel.confidence:.2f}")
4

Connect data sources

# Live Slack
conn = db.connect("slack", token="xoxb-...")
conn.run(db)

# Google Docs
conn = db.connect("gdocs", token="ya29.a0...")
conn.run(db)

# CSV file
conn = db.connect("csv", path="data.csv",
    mapping={"subject": "from", "predicate": "relation", "object": "to"})
conn.run(db)

30 connectors available: slack, teams, gmail, gdocs, gdrive, zoho, postgres, mysql, mssql, notion, confluence, sharepoint, csv, sqlite, github, jira, linear, hubspot, salesforce, zendesk, servicenow, pagerduty, http, airtable, mongodb, elasticsearch, s3, google_sheets, box, dsi. See the Connector Library for setup details.

5

Retract and time-travel

# Retract a bad source — corroborated facts survive
cascade = db.retract_cascade("k8s-manifest-v2.3", reason="Outdated config")

# Time-travel: what did we know yesterday?
import time
yesterday = time.time_ns() - 86_400 * 10**9
snapshot = db.at(yesterday)
frame = snapshot.query("api-gateway", depth=1)

What Queries Look Like

Who owns the auth migration?
sarah chen proposed auth migration — conf 0.85 platform team approved auth migration — conf 0.90 sources: slack/#eng-decisions (2024-02-15), eng-all-hands-2024-02
What breaks if Redis goes down?
api-gateway depends_on redis — conf 1.0 (3 sources) session-service depends_on redis — conf 0.90 (2 sources) rate-limiter depends_on redis — conf 0.85 (1 source) sources: k8s-manifest-v2.3, incident-42, postmortem-redis-2024
What discoveries can you find?
TREM2 may inhibit TP53 via NF-kB — conf 0.78 BRCA1’s promotes pattern may extend to DNA repair — conf 0.65 3 bridge predictions, 1 cross-domain insight from graph structure
Test the hypothesis that NAC treats TTP
PARTIAL — confidence 0.45 1 supporting chain: NAC → glutathione → oxidative stress → TTP 1 confidence gap: NAC → platelet function (missing)

Every answer traces back to a specific Slack message, email, or config file. Not generated — grounded in claims with provenance.

LLM Providers

Attest auto-detects your API key and uses the best available provider. Set one environment variable in your .env file:

ProviderEnv VariableFree Tier?Notes
GeminiGOOGLE_API_KEYYes (1,500 req/day)Best extraction quality. Recommended.
TogetherTOGETHER_API_KEYLimitedQwen 80B — strong extraction.
OpenAIOPENAI_API_KEYNoGPT-4.1 Mini.
DeepSeekDEEPSEEK_API_KEYYes (limited)DeepSeek V3.2.
GrokGROK_API_KEYYes (limited)Grok 4.1 Fast.
OpenRouterOPENROUTER_API_KEYSome modelsRoutes to best available model.
AnthropicANTHROPIC_API_KEYNoClaude Haiku 4.5.
GLMGLM_API_KEYYesGLM-4 Flash.

If multiple keys are set, Attest uses the first available in the order shown above. Heuristic extraction (no API key) is always available as a fallback.

Cost comparison for a typical 30-day Slack workspace (~100 channels):
Gemini 2.5 Flash Lite: ~$0.01–0.05 (likely free within daily limit)
DeepSeek V3: ~$0.02–0.10
OpenAI GPT-4.1 Mini: ~$0.10–0.50
Heuristic mode: $0

Storage Engine

db = attestdb.open("my.db")    # Single-file Rust engine (1.3M claims/sec)

Attest stores everything in a single .attest file — append-only claim log, maintained indexes, CRC32 crash recovery. Zero infrastructure, zero configuration.

Next Steps

Cookbooks

Full working examples: org knowledge, biomedical research, DevOps, and ML.

API Reference

Every method, parameter, and return type.

Core Concepts

What claim-native means and why provenance changes everything.

Connectors

All 30 connectors: Slack, Teams, Gmail, Google Docs, Google Drive, Zoho Mail, Notion, Confluence, SharePoint, PostgreSQL, MySQL, MSSQL, CSV, SQLite, GitHub, Jira, Linear, HubSpot, Salesforce, Zendesk, ServiceNow, PagerDuty, HTTP, Airtable, MongoDB, Elasticsearch, S3, Google Sheets, Box, DSI.