Managing AI Coding Sessions with Agit

AI LABSgo watch the original →

Agit provides version control for AI agent conversations, allowing users to branch, share, and port session history across different coding agents.

Managing Session History with Git-like Workflows

Agit functions as a version control system for AI agent conversations, treating chat logs as repositories. By initializing a project with agit init, users can create distinct branches for different experimental directions within the same project. Each commit captures the prompt history and agent responses, allowing users to revert to previous states using the revert command. Crucially, reverting a session via Agit only affects the context seen by the agent, not the actual codebase files.

Portability and Context Sharing

Agit enables cross-agent workflows by allowing users to move conversation history between different tools. The fork command converts existing session history into formats compatible with other agents, such as Codex, eliminating the need for manual handoff documentation. Additionally, the cherry-pick command allows users to pull specific message turns from one session into another, effectively merging context across disparate conversations.

Security and Secret Management

Agit automatically scans conversations for recognized API key patterns and replaces them with placeholders before saving or pushing to a remote repository. Because plain-text passwords often lack recognizable patterns, the authors recommend using a custom skill to register sensitive strings at the start of a session. This ensures the tool identifies and scrubs these values before they are committed to the session history. Once a secret is saved in the history, adding a registration skill retroactively will not remove it, so proactive registration is required.

  • #ai
  • #claude-code
  • #git
  • #dev-tooling

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.