Overview

Brains are per-user bare Git repositories that act as hosted knowledge remotes for agents. The Brain Git API exposes each brain through standard git smart-HTTP so you can use ordinary git clients to clone, push, and pull knowledge pages. Brain management and git-token lifecycle are covered on the Brains API page; this page covers the git transport.

Base URL

Management and read endpoints:
Git smart-HTTP endpoints:
For local development:

Authentication

Git smart-HTTP routes require an allternit_git_... token. The token can be passed as a Bearer header or as the password in HTTP Basic auth (the username is ignored). Management routes (/api/v1/brains, /api/v1/tokens/git) require a platform bearer token. See Authentication and Brains API for minting git tokens.

Endpoints

Clone a brain

Use the clone URL returned by POST /api/v1/brains or GET /api/v1/brains.

With Bearer header

With HTTP Basic auth

Push and pull

Once cloned, ordinary git push and git pull work with the same credential. The gateway proxies the git smart-HTTP conversation to git http-backend, so all standard git operations are supported.

Read brain pages over HTTP

To read the markdown pages from the default branch without using git, use:
This route is documented on the Brains API page.

Git token lifecycle

Git tokens are minted, listed, and revoked through the management surface:
  • POST /api/v1/tokens/git — mint a token (plaintext shown once).
  • GET /api/v1/tokens/git — list tokens without plaintext.
  • DELETE /api/v1/tokens/git/:id — revoke a token.
See Brains API for examples.

Error codes