API Reference

CLI commands, Python SDK, and MCP server.

CLI Commands

All commands accept --json for machine-readable output.

atlas compile

Compile knowledge sources into a portable .atlas bundle.

atlas compile [--out <path>] [--json] <source.md> [source.yaml ...]
ArgumentDescription
source.mdMarkdown knowledge file (required)
source.yamlOptional decision tree YAML file(s)
--outOutput bundle path (default: <name>.atlas)
--jsonJSON output

atlas solve

Search a compiled bundle for knowledge matching a query.

atlas solve [--bundle <path>] [--json] <query>
ArgumentDescription
queryFree-text search query
--bundlePath to .atlas bundle
--jsonJSON output

atlas decide

Walk a decision tree to reach a deterministic recommendation.

atlas decide [--bundle <path>] [--json] <query> [-c <key=val> ...]
ArgumentDescription
queryQuery string (matched against tree tags)
-cContext key=value pairs for branch conditions
--bundlePath to .atlas bundle
--jsonJSON output

atlas verify

Verify bundle integrity — all edges reference valid nodes.

atlas verify [--bundle <path>] [--artifact <id>] [--policy <name>] [--json]

atlas install

Download and install a package from the registry.

atlas install [-n <org>] [--json] <package.md ...>

atlas search

Search the public registry for knowledge packages.

atlas search [--json] <query>

atlas publish

Publish a package to the registry.

atlas publish [--json] <path.md>

atlas dump

Dump a compiled bundle's contents as JSON.

atlas dump [--json] <bundle>

atlas init

Scaffold a new knowledge package.

atlas init [--template <name>] <name>

atlas reason

Ask an LLM to reason over a bundle's knowledge (requires Ollama or a compatible model endpoint).

atlas reason [--bundle <path>] [--model <name>] [--json] <query>

Python SDK

Core Functions

FunctionDescription
solve(bundle, query, timeout=None) -> SolveResultSearch knowledge bundle
decide(bundle, query, context=None, timeout=None) -> DecideResult | NoneWalk decision tree
verify(bundle, artifact=None, timeout=None) -> VerificationReportVerify bundle integrity
compile(sources, out=None, timeout=None) -> dictCompile knowledge sources
install(sources, name=None, timeout=None) -> list[dict]Install packages from registry
load(source, timeout=None) -> dictCompile and load in one step
reason(bundle, query, model=None, timeout=None) -> strLLM-based reasoning

Dataclasses

ClassFields
SolveResultquery, bundle, confidence, total_matches, nodes: list[Node]
DecideResulttree_id, path, rationale, recommendations: list[Recommendation], agent_instructions
Nodeid, name, kind, description, version, confidence
Recommendationnode_id, confidence
VerificationReportpassed, checks: list[VerificationCheck]
VerificationCheckname, passed, message, severity

Agent Class

The Agent class wraps the full registry-to-query pipeline:

from atlas_sdk import Agent

# From registry packages
agent = Agent("my-agent", packages=["flutter_core", "riverpod"])

# Or from local sources
agent = Agent("local", sources=["my_package.md", "decisions.yaml"])

# Discover packages by keyword
packages = agent.discover("form validation", limit=5)

# Solve
result = agent.solve("How do I validate a form?")

# Decide
decision = agent.decide("build web app", context={"type": "saas"})

# Verify
report = agent.verify("validate input")

MCP Server

Atlas provides a Model Context Protocol server for AI coding assistants.

# Start the MCP server
npx atlas-mcp-server

# Available tools:
# - atlas_solve: Search knowledge bundles
# - atlas_decide: Walk decision trees
# - atlass_verify: Verify bundle integrity
# - atlas_compile: Compile knowledge sources
# - atlas_search: Search the registry

# Resource template:
# - atlas://{bundle}: Browse a compiled bundle

GitHub Actions

Two composite actions are available:

ActionDescription
.github/actions/atlas-compile/Compile all .md packages in a repository
.github/actions/atlas-verify/Verify all compiled .atlas bundles