Max
What Max does
Max syncs data from external APIs (GitHub, Linear, Google Drive, HubSpot) into local SQLite through typed connectors. Queries run locally - millisecond latency, no rate limits, no network round-trips. Designed so AI agents have fast, unfettered data access.
# create a workspacemax init .
# add your favourite connectorsmax install --collection git@github.com:max-hq/max-connectors.git# > added 8 connectors
# connect a couple of sourcesmax connect @max/connector-github --name pi-mono-repomax connect @max/connector-linearmax connect @max/connector-claude-code-conversations --name my-chats
# sync a connectormax sync pi-mono-repo# Syncing...# GitHubRepo █████ 12 1021.8 op/s# GitHubUser █████ 283 4391.1 op/s# GitHubIssue ███▒· 2156 4811.3 op/s# ──────────────────────────────────────────────# 3.2s elapsed
# query itmax search pi-mono-repo GitHubIssue \ --filter="state = open AND labels ~= bug" \ --fields="title,author"
# tell your agent about max, so it's connected to your data# > Hey Claude - run `max -g llm-bootstrap`// Define your entitiesconst GitHubIssue = EntityDef.create("GitHubIssue", { title: Field.string(), state: Field.string(), author: Field.ref(GitHubUser),});
// Create a loader that fetches from your APIconst IssueLoader = Loader.entity({ name: "github:issue:basic", context: GitHubContext, entity: GitHubIssue, async load(ref, env) { const issue = await env.ops.execute(GetIssue, { id: ref.id }); return EntityInput.create(ref, { title: issue.title, state: issue.state, author: GitHubUser.ref(issue.author.id), }); },});
// Wire fields to loadersconst IssueResolver = Resolver.for(GitHubIssue, { title: IssueLoader.field("title"), state: IssueLoader.field("state"), author: IssueLoader.field("author"),});
// Package it upexport default ConnectorModule.create({ def: ConnectorDef.create({ name: "github", schema: GitHubSchema, resolvers: [IssueResolver, UserResolver, RepoResolver], seeder: GitHubSeeder, onboarding: GitHubOnboarding, operations: [...GitHubOperations], }), initialise(config, credentials) { return Installation.create({ context, start, stop, health }); },});The connector SDK tutorial walks through this step by step.
import { GlobalMax } from "@max/federation";import { BunPlatform } from "@max/platform-bun";
// Boot the platformconst max = await BunPlatform.createGlobalMax();
// Open a workspace and installationconst workspace = await max.workspace("./my-project");const installation = await max.installation("pi-mono-repo");
// Syncconst handle = await installation.sync();await handle.completion();
// Query - local SQLite, millisecond responsesconst issues = await installation.engine.query( Query.from(GitHubIssue) .where("state", "=", "open") .where("labels", "~=", "bug") .select("title", "author"));Max runs as a library. Same engine, same connectors - no CLI required.
Get started
New to Max? The getting started guide walks through creating a workspace, connecting a source, and running your first sync.
Write a connector
The connector SDK tutorial builds a complete connector in six parts - from defining entities to publishing an installable package. The SDK reference covers each subsystem in detail.
Architecture
How Max is structured and why - package layers, federation model, and module boundaries.