Agent orchestration, git-native

Every agent turn.Stored in git.

An orchestration framework where AI conversations live as commits. Spawn subagents on branches. Rewind to any point.

pip install gitlord[all] copy

Not a log. A commit.

Each conversation turn writes a git object. Your agent history is branched, diffed, and reverted — just like code.

Turn → Commit

Every message, tool call, and response becomes a git object with a SHA. Immutable. Inspectable.

Branch → Subagent

Spawn child agents on isolated branches. Each gets its own context window and git history.

Rewind → Restore

Jump to any SHA. Fork from there. Your entire history is a navigable graph.

Built for agents that ship.

Six capabilities. One framework. Zero lock-in.

Subagents

Fork at any turn. Spawn child agents on isolated branches — each with its own context and history. Queue management, depth limits, auto-cleanup. No merge conflicts.

main session
subagent-a
subagent-b
↳ result linked via trailer

Context Management

Token budgets, not token chaos. Dedup repeated reads, summarize older turns, vector search across your full history. Never overflow your context window again.

context pipeline
dedup repeated file reads
summarize old turns
apply token budget
augment with RAG results

MCP Tools

Connect to everything. Filesystem, git, browser, search — via Model Context Protocol. Add any MCP server with one command. Tools flow through to subagents automatically.

connected servers
git
filesystem
browser
search

Model Routing LiteLLM

One interface, any provider. Switch between OpenAI, Anthropic, local models — or mix them per subagent. Cost-optimized routing built in.

model: "claude-sonnet-4-20250514" # root session model: "gpt-4o-mini" # subagent (cheaper)

Rewind & Diff

Undo without starting over. Step back to any turn, diff between commits, compare branches. Your agent history is a manipulable graph — not a black box.

$ gitlord rewind my-session a3f2c1d $ gitlord diff a3f2c1d b7e4a9f

CLI terminal

Inspect sessions, manage subagents, replay turns — all from the command line. Every operation in the framework is accessible via the CLI.

$ gitlord run my-session # start or continue $ gitlord log my-session # turn history $ gitlord tree my-session # branch structure $ gitlord show <sha> # full turn JSON $ gitlord rewind my-session <sha> # fork from checkpoint $ gitlord diff <sha-a> <sha-b> # compare turns

Five lines. Full agent.

Create a session, add turns, spawn a subagent — git handles the rest.

Python
from gitlord import Session, SessionConfig

config = SessionConfig(model="gpt-4o")
session = Session.create("my-agent", config)

# Every turn is a git commit
session.add("user", "Analyze the codebase for security issues")
session.add("assistant", "I'll scan for SQL injection vulnerabilities...")

# Spawn a subagent on its own branch
sub = session.spawn("security-scanner")
sub.add("user", "Focus on OWASP Top 10")

# Rewind to any point
session.rewind(session.log()[0].sha)
$ git log --oneline
a3f2c1d  security-scanner: OWASP Top 10 analysis complete
b7e4a9f  assistant: Scanning for SQL injection...
c1d8f3a  user: Analyze codebase for security issues
e9a2b4c  session: my-agent created

Modular. Composable. Inspectable.

Every component is a Python module. Swap what you need. Inspect what you don't.

session.pyTurn lifecycle, branching, rewind, snapshots
subagent.pySpawn, queue, depth management, completion
context.pyDedup, summarization, token budget, cache
rag.pyChromaDB vector index, semantic search
mcp.pyMCP server management, tool dispatch
model.pyLiteLLM routing, provider abstraction
git.pyGit plumbing — the engine underneath
cli.pyTerminal interface for everything above

Start building.

Install in one command. Full stack included.

pip install gitlord[all] copy

Requires Python 3.11+. Works with OpenAI, Anthropic, or any LiteLLM-supported provider.