Skip to main content

Agent orchestration framework with git-backed storage

Project description

GitLord

Agent orchestration framework with Git-backed storage. Every turn is a Git commit — inspectable, rewindable, forkable.

Quickstart

pip install gitlord[all]
from gitlord import Session, SessionConfig, Turn, TurnRole

config = SessionConfig(log_repo_path="log")
session = Session.create("my-agent", config)
session.append_user_turn("Hello, what's the weather in London?")

turns = session.get_turns()
for t in turns:
    print(f"  [{t.role}] {t.content[:80]}")

Install

pip install gitlord           # core only (pydantic)
pip install gitlord[all]      # everything
pip install gitlord[mcp]      # MCP server support
pip install gitlord[litellm]  # LLM model routing (litellm)
pip install gitlord[chromadb] # ChromaDB vector index

Architecture

Module What
gitlord.git Git plumbing — tree/commit construction, CAS updates, orphan branches
gitlord.session Session lifecycle — create, resume, append turns, rewind
gitlord.subagent Subagent management — spawn, complete, drain, trim
gitlord.context Context assembly — dedup, summarization, token budget, cache
gitlord.mcp MCP server lifecycle — tool discovery, call, crash recovery
gitlord.model LLM router — tool schema translation, retry/fallback
gitlord.rag Vector index — ChromaDB wrapper, MMR search
gitlord.index JSON index — rebuild from git log
gitlord.cli CLI — gitlord run, log, tree, show, rewind, diff, index

How it works

Every turn is a Git commit on a branch under refs/agents/:

  • refs/agents/<session-id> — session branch
  • refs/agents/sub/<session-id>/<ulid> — subagent branches

Turn content is stored as JSON blobs in a turns/ subdirectory in the tree. Git trailers encode turn metadata (turn number, type, agent, tokens). Subagent results are linked via Subagent-Result trailer.

CLI

gitlord run my-session                    # run a session
gitlord log my-session                    # view turn history
gitlord tree my-session                   # view branch structure
gitlord show <sha>                        # show turn JSON
gitlord rewind my-session <sha>           # rewind to checkpoint
gitlord diff <sha-a> <sha-b>              # diff two turns

Development

pip install -e ".[all]"
pytest tests/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitlord-0.1.0.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitlord-0.1.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file gitlord-0.1.0.tar.gz.

File metadata

  • Download URL: gitlord-0.1.0.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for gitlord-0.1.0.tar.gz
Algorithm Hash digest
SHA256 434f27a0a298b4e363b30f7a19608ed4fa1937b5ad98b01e1e242f96998f6cee
MD5 cfa3c1573523236821f70da06f6c1b69
BLAKE2b-256 ac7855ae399341c0814dd3bc5e6f1624bb1dead4e35ad835b65530d1c33d022e

See more details on using hashes here.

File details

Details for the file gitlord-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gitlord-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for gitlord-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 485907a76129a1c5a1f94a92f0e389fc3af63d7f86288ca7a27ee28778612427
MD5 c416cdd64cf4de6aed858c3a33573f55
BLAKE2b-256 65212bb53e2cfc58b148638ca886a6b99f2ea2a94aed30511d5790ae5a57cb9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page