AtlasKB is a code knowledge graph runtime for engineering teams and coding agents.
It indexes repositories into a structured graph (entities, facts, decisions, relationships), then serves that context through:
- CLI workflows (
index,ask,status,repos,retry,link) - A web dashboard + REST API
- MCP tools over HTTP (
/mcp) and legacy stdio transport
- What AtlasKB Does
- Architecture
- Implementation Status
- Current Limitations
- Requirements
- Install
- Quick Start
- Docker Quick Start
- Using Runtime and CLI Together
- Configuration
- CLI Reference
- Indexing Pipeline (Detailed)
- Retrieval and Querying
- MCP Interface
- REST API Surface
- Homebrew Tap and Release Automation
- Development
- Troubleshooting
- Repository Layout
- Additional Docs
AtlasKB turns source code and engineering history into queryable organizational memory.
It extracts and links:
entities: modules, services, functions, types, endpoints, configs, concepts, clustersfacts: grounded claims with dimension/category/confidence/provenancedecisions: rationale and tradeoffs mined from git history and GitHub PRs/issuesrelationships: calls, depends_on, implements, extends, configured_by, member_of, etc.execution_flows: detected call-chain flows from entry points
Primary outcomes:
- Faster onboarding to large codebases
- Better cross-repo impact analysis
- Agent context grounded in real project conventions and architecture
Local Repos + Git + GitHub
|
v
Multi-phase Indexing Pipeline
(static + LLM + backfill + clustering)
|
v
PostgreSQL + pgvector Knowledge Graph
(entities, facts, decisions, relationships, flows)
|
+--------------------------+
| |
v v
CLI / Ask Runtime Server
- Web Dashboard
- REST API (/api/*)
- MCP over HTTP (/mcp)
Runtime modes:
atlaskb(default): starts combined runtime (dashboard + MCP HTTP)atlaskb serve: same runtime explicitlyatlaskb mcp: stdio MCP server for clients that require stdio transport
As of 2026-03-05, backlog status is:
- Implemented: contract checks, feedback lifecycle, observability baseline, exclusion controls, ETag caching
- Partial: staleness/revalidation policy depth, parser quality guardrails
- Not implemented yet: API/MCP authz baseline, webhook/polling ingestion worker, managed clone/discovery lifecycle, retrieval eval harness, security hardening, packaging beyond Homebrew
Detailed evidence and sequencing: docs/IMPLEMENTATION-GAP-REPORT.md
- API and MCP HTTP currently do not enforce built-in authentication/authorization boundaries.
- Treat runtime endpoints as trusted local/dev infrastructure unless protected by network or reverse-proxy auth.
- Repository onboarding requires an existing local git checkout path.
- Incremental ingestion is currently manual (
atlaskb indexor reindex endpoints), not webhook-driven.
Required:
- Go
1.26(for source builds) - Node.js + npm (for web build during source/Homebrew builds)
- PostgreSQL with extensions:
vector(pgvector)uuid-ossp
- OpenAI-compatible LLM endpoint for extraction/synthesis
- OpenAI-compatible embeddings endpoint
Recommended:
- Universal Ctags (
brew install universal-ctags) for better entity grounding
brew tap TysonLabs/tap
brew install TysonLabs/tap/atlaskbWhy brew install TysonLabs/tap/atlaskb and not brew install TysonLabs/tap?
- Homebrew install syntax is
owner/tap/formula. - Here, tap name is
tapand formula name isatlaskb, so both segments appear.
Run as a background service:
atlaskb setup
brew services start atlaskb
brew services list | grep atlaskbStop service:
brew services stop atlaskbgit clone https://github.com/TysonLabs/atlaskb.git
cd atlaskb
make build-full
./bin/atlaskb versionmake build-full builds web assets first, then the Go binary.
Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/TysonLabs/atlaskb/main/install.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/TysonLabs/atlaskb/main/install.ps1 | iexScoop (Windows):
scoop bucket add tysonlabs https://github.com/TysonLabs/scoop-bucket
scoop install tysonlabs/atlaskbdocker compose up --buildThis starts:
- AtlasKB runtime on
http://localhost:3000 - PostgreSQL + pgvector as
dbservice
On first run (no config), AtlasKB serves setup mode at http://localhost:3000.
Complete setup in the browser, then restart runtime:
docker compose restart atlaskb- Run setup wizard:
atlaskb setupAliases: atlaskb configure, atlaskb init
- Start runtime:
atlaskbDefault endpoints:
- Dashboard:
http://localhost:3000 - MCP HTTP:
http://localhost:3000/mcp
- Index a repository:
atlaskb index /path/to/repo- Ask questions:
atlaskb ask "How is authentication handled?"
atlaskb ask "Where are retries implemented?" --repo my-service- Inspect status:
atlaskb status
atlaskb reposStart stack:
docker compose up --buildOpen setup UI:
open http://localhost:3000After setup is saved, restart runtime:
docker compose restart atlaskbRun one-off commands in the app container:
docker compose exec atlaskb atlaskb version
docker compose exec atlaskb atlaskb status
docker compose exec -it atlaskb atlaskb setupStop stack:
docker compose downReset DB volume:
docker compose down -vYou can run AtlasKB as a long-running runtime and still use CLI commands.
- Runtime process (
atlaskboratlaskb serve) hosts dashboard/MCP HTTP. - CLI subcommands (
index,ask,status, etc.) are independent invocations that connect to the same DB/config. - Homebrew service mode (
brew services start atlaskb) is ideal if you do not want a tmux session.
Typical local pattern:
brew services start atlaskb # keep runtime in background
atlaskb index ~/src/my-repo # run indexing jobs on demand
atlaskb ask "what changed in retry flow?"Default config path:
~/.atlaskb/config.toml
Override path:
atlaskb --config /path/to/config.toml <command>[database]
host = "localhost"
port = 5432
user = "atlaskb"
password = "atlaskb"
dbname = "atlaskb"
sslmode = "disable"
[llm]
base_url = "http://localhost:1234"
api_key = ""
[embeddings]
base_url = "http://localhost:1234"
model = "mxbai-embed-large-v1"
api_key = ""
[pipeline]
concurrency = 2
extraction_model = "qwen/qwen3.5-35b-a3b"
synthesis_model = "qwen/qwen3.5-35b-a3b"
context_window = 32768
git_log_limit = 500
global_exclude_dirs = ["tests", "test", "__tests__", "spec", "testing", "testdata", "fixtures", "e2e", "cypress", "playwright", "migrations"]
[server]
port = 3000
chats_dir = ""
[github]
token = ""
api_url = "https://api.github.com/graphql"
max_prs = 200
pr_batch_size = 10
enterprise_host = ""Supported variables:
ATLASKB_DB_HOSTATLASKB_DB_USERATLASKB_DB_PASSWORDATLASKB_DB_NAMEATLASKB_LLM_URLATLASKB_LLM_API_KEYATLASKB_EMBEDDINGS_URLATLASKB_EMBEDDINGS_MODELATLASKB_EMBEDDINGS_API_KEYATLASKB_GITHUB_TOKEN(takes priority)GITHUB_TOKEN(fallback)ATLASKB_GITHUB_API_URL
Show active config:
atlaskb config showTop-level help:
atlaskb --helpStart combined runtime.
Flags:
--port(serve only, default3000)- global:
--config,--verbose,--json
Interactive wizard covering:
- Database connection + migration + optional schema reset
- LLM endpoint + extraction model + synthesis model + API key
- Embeddings endpoint/model/key
- Runtime port + chats directory
- Pipeline concurrency
- GitHub integration (token/API URL/enterprise host/max PRs/batch size)
- Optional Ctags install prompt
Analyze repository and update graph.
Flags:
--dry-run: cost estimate only, stop before LLM calls--force: full rebuild for target repo-y, --yes: skip prompts--concurrency <n>: override configured concurrency--phase <name>: run partial phases--exclude <pattern>: exclude path/pattern (repeatable, highest precedence)
AtlasKB also reads .atlaskbignore from the repo root using gitignore-style patterns.
Examples:
atlaskb index ~/src/repo
atlaskb index ~/src/repo --force
atlaskb index ~/src/repo --dry-run
atlaskb index ~/src/repo --phase phase2 --phase backfill
atlaskb index ~/src/repo --exclude generated --exclude '**/*.snap'Retrieve facts and synthesize answer.
Flags:
--repo <name>: scope to repo--top-k <n>: retrieval depth (default40)
Show indexing health, staleness/revalidation backlog, and recent run metrics.
Supports --json global flag.
List indexed repos and quality snapshot.
Supports --json global flag.
Reset failed jobs to pending for retry.
Flag:
--phase <phase>: only retry failed jobs in a phase
Create manual cross-repo relationship.
Required flags:
--from-repo,--from-entity,--to-repo,--to-entity
Optional:
--kind(defaultdepends_on)--strength(strong|moderate|weak)--description
Subcommands:
atlaskb config showatlaskb config set-github-token <token>atlaskb config set-github-api-url <url>
Runs MCP server over stdio (legacy mode).
Use this for clients that cannot connect over HTTP.
Print build version.
With global --json, prints version metadata JSON.
AtlasKB orchestrator supports three run modes:
incremental(default)full(--force)partial(--phase ...)
phase1Structural inventory
- Enumerates files/languages/stack
- Computes cost estimate
- Cleans stale entities for deleted files
- Parses dependencies and discovers cross-repo links
phase1.5Ctags symbol extraction
- Creates canonical entity roster for name grounding
phase1.6Import parsing
- Deterministic relationship extraction from Go imports
phase1.7Tree-sitter extraction
- Structural call and embedding relationships (Go AST)
phase2File-level LLM extraction
- Extracts entities/facts/relationships per file
- Uses context-window-aware budgeting
- Dedup and stale cleanup logic
phase2.5Backfill
- Repairs orphan entities with no facts
phase2.7Flow detection
- Detects execution flows and entry-point chains
gitlog
- Mines local commit history for facts/decisions
phase3
- Mines GitHub PR/issue/comment signals (if GitHub token configured)
phase4
- Cross-module synthesis (patterns, contracts, data-flow links)
phase5
- Repository summary synthesis
phase6
- Functional clustering +
member_ofrelationships
embedding
- Generates embeddings for facts and entity summaries
- Quality + overview
- Computes quality score dimensions
- Stores repo overview text
If an incremental full run finds no changed files in Phase 2, AtlasKB short-circuits later phases and reports up-to-date state.
CLI help lists common filters:
phase1,phase2,backfill,gitlog,phase3,phase4,phase5,embedding
Internally, additional recognized phases include phase1.5, phase1.7, flows, and phase6.
ask and MCP search rely on hybrid retrieval:
- query decomposition (when LLM is configured)
- vector search (pgvector)
- full-text search (tsvector)
- reciprocal rank fusion
- entity mention and relationship-neighborhood expansion
- score adjustments by confidence/category/kind/repo affinity
This enables both direct fact retrieval and graph-traversal oriented answers.
- HTTP streamable MCP endpoint:
http://localhost:3000/mcp - Legacy stdio:
atlaskb mcp
search_knowledge_baselist_reposget_conventionsget_module_contextget_service_contractget_impact_analysisget_decision_contextget_task_contextget_execution_flowsget_functional_clustersget_repo_overviewsearch_entitiesget_entity_sourcesubmit_fact_feedback
get_task_context is the best default tool for coding-agent task bootstrap because it bundles conventions, context, contracts, and decision history.
Base path: /api
Security note:
- No auth middleware is enabled by default for API/MCP HTTP routes.
- For shared environments, place AtlasKB behind a trusted network boundary or proxy auth.
GET /api/healthGET /api/metricsGET /api/statsGET /api/stats/recent-runs
GET /api/reposPOST /api/reposGET /api/repos/{id}PUT /api/repos/{id}DELETE /api/repos/{id}POST /api/repos/{id}/reindexGET /api/repos/{id}/reindex/statusGET /api/repos/{id}/indexing-runsGET /api/repos/{id}/decisionsGET /api/repos/{id}/clustersGET /api/repos/{id}/flows
GET /api/entitiesGET /api/entities/{id}GET /api/entities/{id}/factsGET /api/entities/{id}/relationshipsGET /api/entities/{id}/decisions
GET /api/graph/repo/{id}GET /api/graph/entity/{id}GET /api/graph/multi
GET /api/cross-repo/linksGET /api/cross-repo/links/{id}POST /api/cross-repo/linksDELETE /api/cross-repo/links/{id}
POST /api/indexing/batchGET /api/indexing/batch/statusPOST /api/indexing/batch/cancelGET /api/indexing/jobsGET /api/indexing/history
POST /api/askGET /api/searchGET /api/feedbackPOST /api/feedbackPOST /api/feedback/{id}/resolveGET /api/chatsPOST /api/chatsGET /api/chats/{id}PUT /api/chats/{id}DELETE /api/chats/{id}POST /api/chats/{id}/messages
GET /api/file
Heavy GET endpoints (/api/search, /api/repos, /api/repos/{id}, /api/stats, /api/stats/recent-runs) support conditional caching with ETag/If-None-Match.
Detailed guide:
Formula generation script:
Release automation workflow:
.github/workflows/release-homebrew-tap.yml.github/workflows/release.yml(cross-platform release tarballs + checksums + scoop update)
Install/packaging scripts:
How release automation works:
- Push tag
v*in source repo. - Workflow generates
Formula/atlaskb.rbpinned to tag + revision. - Workflow commits formula update to Homebrew tap repo
main.
Required repo secret:
HOMEBREW_TAP_TOKEN(must push to tap repository)SCOOP_BUCKET_TOKEN(must push to scoop bucket repository)
Optional repo variables:
HOMEBREW_TAP_REPO(defaults to<owner>/homebrew-tap)HOMEBREW_SOURCE_REPO(defaults tohttps://github.com/<owner>/<repo>.git)SCOOP_BUCKET_REPO(defaults to<owner>/scoop-bucket)SCOOP_SOURCE_REPO(defaults to current source repository)
make build # Go binary only
make web # web npm ci + build
make build-full # web build + go build
make run # build + run
make test # go test ./... -v
make lint # golangci-lint
make cleanContract drift checks run in CI via .github/workflows/contracts.yml and validate CLI command/flag surface plus MCP tool names.
make dev-web # vite dev server
make dev-server # go runtime at :8080go run ./cmd/atlaskb serve --port 3000Cause: web/dist was missing when building.
Fix:
cd web
npm ci
npm run build
cd ..
go build ./cmd/atlaskbFor Homebrew formula builds, ensure formula runs both web build and Go build (current generated formula already does this).
Use HTTPS for both tap URL and formula source URL:
brew tap TysonLabs/tapGenerate formula with:
scripts/generate-homebrew-formula.sh --tag vX.Y.Z --source-repo https://github.com/<owner>/atlaskb.gitCheck:
brew list atlaskb
brew info atlaskb
echo $PATHThen relink/reinstall if needed:
brew reinstall <owner>/atlaskb/atlaskbValidate DB + config:
atlaskb config show
atlaskb statusIf DB auth/host changed, rerun:
atlaskb setup
brew services restart atlaskbatlaskb index checks:
GET <llm_base_url>/v1/modelsPOST <embeddings_base_url>/v1/embeddings
Ensure both endpoints are reachable and model IDs are valid.
When AtlasKB runs in Docker, host model servers are typically reachable at:
http://host.docker.internal:<port>.
Set LLM and embeddings URL to that value in setup UI (or atlaskb setup in container).
If you need to reconfigure:
docker compose exec -it atlaskb atlaskb setup
docker compose restart atlaskbcmd/atlaskb/ main entrypoint
internal/cli/ cobra commands and setup wizard
internal/server/ web runtime, API handlers, MCP HTTP wiring
internal/mcp/ MCP tool registry + handlers
internal/pipeline/ indexing orchestration and phase implementations
internal/models/ stores and graph/domain models
internal/db/ DB connection + embedded SQL migrations
web/ React dashboard (Vite), embedded into Go binary
docs/ architecture, model, pipeline, tap/release docs
scripts/ release and utility scripts
No license file is currently present in this repository.