Agentra LabsAgentra Labs DocsPublic Documentation

AgenticCodebase

Command Surface

Install commands are documented in Installation.

Install commands are documented in Installation.

Binaries

  • acb (CLI compiler and query engine)
  • agentic-codebase-mcp (MCP server)

acb top-level

acb compile
acb info
acb query
acb get
acb completions
acb health
acb gate
acb budget

acb compile

acb compile <repo-path> -o graph.acb
acb compile <repo-path> --exclude "target" --exclude "node_modules"
acb compile <repo-path> --coverage-report coverage.json

Common options:

  • --output <file.acb>
  • --exclude <glob> (repeatable)
  • --include-tests
  • --coverage-report <path>

acb query types

acb query <file.acb> symbol
acb query <file.acb> deps
acb query <file.acb> rdeps
acb query <file.acb> impact
acb query <file.acb> calls
acb query <file.acb> similar
acb query <file.acb> prophecy
acb query <file.acb> stability
acb query <file.acb> coupling
acb query <file.acb> test-gap
acb query <file.acb> hotspots
acb query <file.acb> dead-code

acb health

acb health <file.acb>
acb health <file.acb> --limit 20 --format json

Returns graph-wide risk, test gaps, hotspots, and dead-code summary.

acb gate

acb gate <file.acb> --unit-id 42
acb gate <file.acb> --unit-id 42 --max-risk 0.55 --depth 4 --require-tests

Fails with non-zero exit if risk/test criteria are not met (CI-friendly).

acb budget

acb budget <file.acb>
acb budget <file.acb> --horizon-years 20 --max-bytes 2147483648
acb budget <file.acb> --format json

Estimates long-horizon growth and reports whether the graph is on track for a fixed storage budget.

Runtime policy env:

export ACB_STORAGE_BUDGET_MODE=auto-rollup
export ACB_STORAGE_BUDGET_BYTES=2147483648
export ACB_STORAGE_BUDGET_HORIZON_YEARS=20
export ACB_STORAGE_BUDGET_TARGET_FRACTION=0.85

agentic-codebase-mcp

agentic-codebase-mcp serve

Common options:

  • --config <toml>
  • --graph <file.acb>
  • --name <graph-name>

MCP Tools

All tools exposed by the agentic-codebase-mcp MCP server:

Core Tools

ToolPurpose
symbol_lookupLook up symbols by name in the code graph
impact_analysisAnalyse the impact of changing a code unit
impact_analyzeAnalyze the full impact of a proposed code change with blast radius and risk assessment
impact_pathFind the impact path between two code units
graph_statsGet summary statistics about a loaded code graph
list_unitsList code units in a graph, optionally filtered by type

Context Capture Tools

ToolPurpose
analysis_logLog the intent and context behind a code analysis

Search Tools

ToolPurpose
search_semanticNatural-language semantic search across the codebase
search_similarFind code units similar to a given unit
search_explainExplain why a unit matched a search query

Concept Tools

ToolPurpose
concept_findFind code implementing a concept (e.g., authentication, payment)
concept_explainExplain how a concept is implemented with details
concept_mapMap all detected concepts in the codebase

Archaeology Tools

ToolPurpose
archaeology_nodeInvestigate the full history and evolution of a code unit
archaeology_whenGet the timeline of changes for a code unit
archaeology_whyExplain why code looks the way it does based on its history

Architecture Tools

ToolPurpose
architecture_inferInfer the architecture pattern of the codebase
architecture_validateValidate the codebase against its inferred architecture

Pattern Tools

ToolPurpose
pattern_extractExtract all detected patterns from the codebase
pattern_checkCheck a code unit against detected patterns for violations
pattern_suggestSuggest patterns for new code based on file location

Prophecy Tools

ToolPurpose
prophecyPredict the future of a code unit based on history, complexity, and dependencies
prophecy_ifWhat-if scenario: predict impact of a hypothetical change

Regression Tools

ToolPurpose
regression_predictPredict which tests are most likely affected by a change
regression_minimalGet the minimal test set needed for a change

Grounding Tools (v0.2)

ToolPurpose
codebase_groundVerify a code claim has graph evidence — zero hallucination
codebase_ground_claimGround a claim with full citations including file locations and code snippets
codebase_evidenceGet graph evidence for a symbol name
codebase_suggestFind symbols similar to a name (for corrections)
codebase_citeGet a citation for a specific code unit
hallucination_checkCheck AI-generated output for hallucinations about code
truth_registerRegister a truth claim for ongoing maintenance
truth_checkCheck if a registered truth is still valid

Workspace Tools (v0.2)

ToolPurpose
workspace_createCreate a workspace to load multiple codebases
workspace_addAdd a codebase to an existing workspace
workspace_listList all contexts in a workspace
workspace_querySearch across all codebases in workspace
workspace_compareCompare a symbol between source and target
workspace_xrefFind where symbol exists/doesn't exist across contexts
compare_codebasesFull structural, conceptual, and pattern comparison between two codebases
compare_conceptCompare how a concept is implemented across two codebases
compare_migrateGenerate a migration plan from source to target codebase

Translation Tools (v0.2)

ToolPurpose
translation_recordRecord source-to-target symbol mapping
translation_progressGet migration progress statistics
translation_remainingList symbols not yet ported

Compact Facade Tools (v0.3+)

Use these to keep MCP tool surfaces small while preserving backward compatibility:

ToolPurpose
codebase_coreUnified core analysis/impact operations via operation
codebase_groundingUnified grounding operations via operation
codebase_workspaceUnified workspace/compare operations via operation
codebase_sessionUnified session operations via operation
codebase_conceptualUnified concept/architecture/search operations via operation
codebase_translationUnified translation operations via operation
codebase_archaeologyUnified archaeology/resurrection operations via operation
codebase_patternsUnified pattern/genetics operations via operation
codebase_collectiveUnified telepathy/soul operations via operation
codebase_intelligenceUnified prophecy/regression/omniscience operations via operation

Compact list mode:

export ACB_MCP_TOOL_SURFACE=compact

In compact mode, tools/list returns only the 10 facade tools above, while all legacy tool names remain callable.

Advanced Tools

Resurrection Tools

ToolPurpose
resurrect_searchSearch for traces of deleted code
resurrect_attemptAttempt to reconstruct deleted code from traces
resurrect_verifyVerify a resurrection attempt is accurate
resurrect_historyGet resurrection history for the codebase

Genetics Tools

ToolPurpose
genetics_dnaExtract the DNA (core patterns) of a code unit
genetics_lineageTrace the lineage of a code unit through evolution
genetics_mutationsDetect mutations (unexpected changes) in code patterns
genetics_diseasesDiagnose inherited code diseases (anti-patterns passed through lineage)

Telepathy Tools

ToolPurpose
telepathy_connectEstablish telepathic connection between codebases
telepathy_broadcastBroadcast a code insight to connected codebases
telepathy_listenListen for insights from connected codebases
telepathy_consensusFind consensus patterns across connected codebases

Soul Tools

ToolPurpose
soul_extractExtract the soul (essential purpose and values) of code
soul_compareCompare souls across code reincarnations
soul_preservePreserve a code soul during rewrite
soul_reincarnateGuide a soul to a new code manifestation
soul_karmaAnalyze the karma (positive/negative impact history) of code

Omniscience Tools

ToolPurpose
omniscience_searchSearch across global code knowledge
omniscience_bestFind the best implementation of a concept globally
omniscience_censusGlobal code census for a concept
omniscience_vulnScan for known vulnerability patterns
omniscience_trendFind emerging or declining code patterns
omniscience_compareCompare your code to global best practices
omniscience_api_usageFind all usages of an API globally
omniscience_solveFind code that solves a specific problem

Universal MCP entry

{
  "mcpServers": {
    "agentic-codebase": {
      "command": "$HOME/.local/bin/agentic-codebase-mcp",
      "args": []
    }
  }
}