# cortexkit/magic-context

Unbounded context. Memory that manages itself. One session, for life. The hippocampus for coding agents, part of CortexKit.

Repository: https://github.com/cortexkit/magic-context
Canonical: https://ross.abutalabs.com/products/magic-context
Homepage: https://discord.gg/DSa65w8wuf
Language: TypeScript
License: MIT
License Family: permissive
Topics: agent-framework, agent-memory, ai, ai-agents, ai-context, opencode, ai-memory, cache-aware, context-engineering, context-management, langchain, memory, pi-coding-agent
Last push: 2026-08-26T13:49:58+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 11
- inputs: {"age_days": 160, "days_push": 7, "days_rel": 7, "gap_med": 0, "n_releases_24m": 174}
- flags: young
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1892, forks 96 (observed 2026-08-28T04:05:49.588342+00:00)

## What it is
Magic Context is a TypeScript library that gives coding agents self-managing, unbounded memory so a single session can last indefinitely. It is part of the CortexKit ecosystem and ships integrations for coding agents like OpenCode and pi.

## Use cases
- give my coding agent persistent memory across a long session
- stop my AI agent from losing context when the conversation gets too long
- manage context windows automatically for an LLM agent
- add long-term memory to an opencode agent
- let an agent recall earlier decisions without manual summarization
- build a coding assistant that remembers the whole project history

## When to choose
- you are building or extending coding agents that run for long sessions
- you use OpenCode or pi and want drop-in memory/context management
- you want cache-aware, self-consolidating agent memory in a TypeScript stack

## When to avoid
- you need a general-purpose vector database rather than agent session memory
- your stack is not JavaScript/TypeScript or an unsupported agent runtime
- you need a fully hosted memory service with a managed API

## Facets
- artifact type: library
- maturity: active
- function: agent-framework, rag, caching, llm-inference
- domain: large-language-models, developer-tools
- platform: cli
- tags: agent-memory, context-management, coding-agents, opencode, self-managing-memory, long-term-memory, ai-agents, nodejs, typescript

## Member repositories
- cortexkit/magic-context (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:49.588342+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:12:57.365223+00:00, confidence not recorded.
  - readme: https://github.com/cortexkit/magic-context (fetched 2026-08-28T04:05:49.588342+00:00, sha efceb4f351b9)
  - homepage: https://discord.gg/DSa65w8wuf (fetched 2026-08-29T10:52:12.878272+00:00, sha b49a4bfeed4b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
