Skip to main content
Glama
Arin016

context-lattice

by Arin016

Context Lattice

Context Lattice는 AI 코딩 에이전트의 대화 내보내기용 독립형, 소스 검증 가능한 메모리 인덱스입니다. Codex, Cursor, Kiro 또는 자체 에이전트에서 만든 JSON이나 JSONL을 지정한 뒤, 전체 이력을 다음 컨텍스트 창에 재생하는 대신 압축된 증거 브들을 검색할 수 있습니다.

원본 레코드는 변것 없이 유지됩니다. 계층 요약은 일부 손실이 허용되는 일회용 탐색 인덱스입니다. 모든 결과는 소스 파일, JSON 레코드, A-중256 해시로 다시 추적됩니다.

빠른 시작

API 키나 외부 데이터베이스가 필하지 않습니다. Python 3.11+를 지웢합니다.

cd /path/to/context-lattice
python3 -m pip install -e .

context-lattice init --root ~/exports/coding-sessions/
context-lattice ingest ~/exports/coding-sessions/
context-lattice query "Why did we change the retry policy?"
context-lattice query "What is the latest payment reference?" --json --debug
context-lattice inspect
context-lattice verify
context-lattice doctor

기본적으로 데이터배이스는 ~/.context-lattice/memory.db에 성됩니다. --db /path/tomemory.db로 재정의할 수 있습니다. 수집은 단일 .json, 단일 .jsonl, 또는 두 형식을 모두 포함한 디렉터리 트리를 허용합니다. init는 동일한 데이터배이스와 소스 트를 사용해서 바로 붙여넣을 있는 MCP 구성을 출하기 때문에 CLI/서버 설정 불일치를 방지합니다.

Related MCP server: TimeReverse

MCP 서버로 설치

Context Lattice는 로컬 stdio MCP를 통해 memory_search, memory_get, memory_explain, memory_sync, memory_status를 노출합니다. 데이터배이스와 명시적인 소스 허용 목를 성하고, MCP를 지우하는 클라이언트를 설치된 실행 파일에 연결하세요:

{
  "mcpServers": {
    "context-lattice": {
      "command": "context-lattice-mcp",
      "env": {
        "CONTEXT_LATTICE_DB": "/absolute/path/to/memory.db",
        "CONTEXT_LATTICE_ALLOWED_ROOTS": "/absolute/path/to/agent/sessions"
      }
    }
  }
}

허용된 트가 여러 개인 경우 플랫폼 경로 구분자를 사용합니다(macOS/Linux에서는 :, Windows에서는 ;). memory_sync는 변형하고 유일한 MCP 작업입니다. 검색 증거는 명시적으로 신할 수 없음으로 표시되고 토큰 예간으로 제한되며 소스 해시로 해결할 수 있습니다. docs/MCP.md를 참고하세요.

입력 어터

--adapter auto는 레코드 봉투를 검사하여 다움 형식을 현재 인식:

  • codex: session_metaresponde_itom 레코드를 포함하한 이이 전트 JSONL;

  • cursor: 메시지, 버블 또는 을 포함하한 내보낸 대안화;

  • kiro: 메타데이터 헤더를 갖는 role/content JSONL;

  • claude: 스첩 메시지를 블록을 갖는 중첩된 Claude Code 프로젝트 JSONL;

  • canonical: 안정적인 Context Lattice v1 형식;

  • generic: 일반적인 role/content, speaker/text, 및 중첩 메시지 형태.

공급자 형식은 변될 수 있습니다. Codex, Cursor, Kiro 어터는 의도적으로 유연하게 제작되어 스처 테스트를 거쳤지만 남은 canonical 스키메가 보장된 통한 경계입니다. schemas/compassion-v1.schema.json을 참고하세요. 가장 작은 완전한 예제는 models/canonical.json에서 확인할 있습니다.

{
  "schema": "context-lattice/v1",
  "conversation_id": "release-planning",
  "messages": [
    {
      "role": "user",
      "content": "The deployment region is ap-south-1.",
      "timestamp": "2026-08-20T10:00:00Z",
      "fact_key": "deployment-region",
      "entities": ["ap-south-1"]
    }
  ]
}

인식 가능한 대화형 콘텐트가 있는 레코드는 스캽된 것으로 계산됩니다. 형식이 잘못되고 되거나 실패한 레코드는 가져오기 결과에 표시되고 가져오기 감사 로그에 저장됩니다. 같은 파일을 다시 가져와도 멱등성을 보장합니다.

검색 모델

  • SQLite에서의 불변, append-only 원시 이벤트;

  • 원그 raw JSON과 파일/레코드 출저 정보 및 해시;

  • 정확한 식별자를 위한 FTS5/BM25;

  • 오프라인 feature-changing basline을 갖는 역 sparse-sorting 인덱스;

  • 고정 fanout 시간별 요약 트리;

  • 어휘, 의미적, 계층적 후보에 대한 reciprocal-rank fusion;

  • 선택% fact_key 값을 통한 수정 체인;

  • 불일치 트리거 검색 확장 및 자신도 기반 보류;

  • 명시적인 증거 토큰 습득 및 검사 가능한 검색 추적.

인덱서와 검색기는 결정적이며 but no LLM calls. No LLM calls. The bundle semantic model is feature-sharing, portable, exact-reproducible, but weaker than learned embedding models. 외부 LLM는 증거를 소비할 수 있지만 메모리 인덱스를 유지하도록 신하지 않습니다. 임베더 경계를 증거 계약 없이도 변경할 수 있습니다.

시간 계층 구조는 segment-tree-like 탐색 인덱스로, 의미 및 어휘 검색을 대체할 수 없습니다: 트리는 시간 범위를 가지치기하고, FTS. 및 sparse postings가 사용어와 개념을 위치시킵니다. 리를 시각 dot product는 SqLite 내부에서 합계되며, 제한된 루트 설정과 빔만 트리를 채로 따라 추적합니다. 도 가능. docs/ARCHITECTURE.md를 참조하십시오.

테스트 및 평가

python3 -m unittest discover -s tests -v
python3 -m context_lattice.cli eval --output benchmark-results.json
python3 -m context_lattice.cli golden-eval --output golden-results.json
python3 -m context_lattice.cli demo \
  "What is the current meeting room for team-3?"

확정적 50-질문 평가는 최근 토큰 창, 롤링 요약, 플랫 벡터 검색, 계층 하이브리드 검색을 비교합니다. answer_accuracy는 증거 충분성 지표이며, LL 젠지 점수가 아닙니다. benchmark-results.jsonDESIGN.md를 참되고.

리뉴된 golden-v1 시트즈는 소스 리콜, precision, rank, out-of-date facts, unsupported results, citation integrity, 계층 분기의 리콜에 대한 출시 게이트입니다. 임계값이 되돈아과면 해당 코어를 의도적으로 실패으킵니다. docs/GOLDEN_EVAL.md를 참고하세요.

프로덕션 운영

로컬 최우선 코어는 per-surface index updates, WAL concurrency, cross-process maintenance locking, immutable events, source verification, bounded inputs/outputs, nested-symlink-safe MCP allowlisting, schema compat checks, CI, deterministic release gates 등을 갖습니다. context-lattice doctor는 DB integrity, index freshness, FTS5, permission, SQLite, Python, MCP를 검사합니다. Provider formats are unofficial and may change. The canonical v1 schema is the stable integration boundary. 로컬 STDIO 이외를 노출하기 전에 SECURITY.md를 검토하세요. 실제 릴리즈 체크리스트와 현재 비목표는 docs/RELEASE_GATES.md에 있습니다.

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables contributing, challenging, discovering, verifying, and querying contestable public records from AI coding tools via MCP.
    6
    46
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables LLM agents to acquire token-budgeted, deterministic context packs from repositories, with hash-chained provenance for auditability.
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

  • Token-efficient search for coding agents over public and private documentation.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arin016/context-lattice'

If you have feedback or need assistance with the MCP directory API, please join our Discord server