News for hackers. Stuff that matters.

Show HN: Contexa – Git-inspired context management for LLM agents

https://github.com/swadhinbiswas/contexa

Hi HN,

I’ve been experimenting with building LLM agents and kept running into the same problem: managing context gets messy quickly. Prompts grow, reasoning steps get lost, and it's hard to reproduce or roll back agent behavior.

So I built Contexa, a small open-source project that treats LLM context a bit like Git — with ideas like snapshots, branching, and history for context.

The goal is to make it easier to:

track how context evolves

experiment with different reasoning paths

reproduce agent behavior

It’s still early, but I’d love feedback from people building LLM tools.

Repo: https://github.com/swadhinbiswas/contexa Paper: https://arxiv.org/abs/2508.00031

( 1 comment | on HN )
Re:Show HN: Contexa – Git-inspired context management for LL... by hkonte on Saturday March 07, 2026 @04:11AM (#47285930)
The branching/merging mental model is interesting for agent workflows. One thing I've noticed is that context drift often originates upstream at the prompt structure level — agents tend to lose track of their objective when the original prompt mixes role, context, and constraints into one blob.

I've been building flompt (https://flompt.dev) which approaches this from the other end: decompose prompts into typed blocks (role, context, objective, constraints, examples, output_format) before they ever reach the agent. The MCP server exposes compile_prompt() so structured prompts can be injected dynamically into agentic pipelines. Combining that with something like Contexa for runtime context versioning could be a useful pairing.