{"id":47969306,"url":"https://github.com/kiloloop/cortex","last_synced_at":"2026-04-04T10:42:00.478Z","repository":{"id":344116585,"uuid":"1180514010","full_name":"kiloloop/cortex","owner":"kiloloop","description":"Cross-session memory for multi-agent teams — an OACP example app","archived":false,"fork":false,"pushed_at":"2026-03-13T06:28:35.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-13T15:08:11.905Z","etag":null,"topics":["claude-code","codex","cross-session-memory","multi-agent","oacp"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiloloop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-13T05:45:09.000Z","updated_at":"2026-03-13T06:28:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kiloloop/cortex","commit_stats":null,"previous_names":["kiloloop/cortex"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/kiloloop/cortex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiloloop%2Fcortex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiloloop%2Fcortex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiloloop%2Fcortex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiloloop%2Fcortex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiloloop","download_url":"https://codeload.github.com/kiloloop/cortex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiloloop%2Fcortex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31397055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","codex","cross-session-memory","multi-agent","oacp"],"created_at":"2026-04-04T10:41:58.228Z","updated_at":"2026-04-04T10:42:00.472Z","avatar_url":"https://github.com/kiloloop.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cortex — Cross-Session Memory for Multi-Agent Teams\n\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)\n[![Status](https://img.shields.io/badge/Status-Alpha-orange)](https://github.com/kiloloop/oacp)\n[![OACP](https://img.shields.io/badge/OACP-%3E%3D0.1.0-orange.svg)](https://github.com/kiloloop/oacp)\n[![Claude Code](https://img.shields.io/badge/Runtime-Claude_Code-6B4FBB.svg)](https://code.claude.com/docs)\n[![Codex](https://img.shields.io/badge/Runtime-Codex-74AA9C.svg)](https://github.com/openai/codex)\n\n\u003e **Reference app, not a standalone tool.** Cortex is an [OACP](https://github.com/kiloloop/oacp) example app that shows how to build cross-session memory on top of the protocol. Requires `oacp-cli`.\n\nCortex solves a common multi-agent problem: **agents forget everything between sessions.**\n\nEach agent debriefs at session end, and a morning sync consolidates everything into a single source of truth (SSOT) — so every agent starts the day knowing what happened yesterday, across all projects and runtimes.\n\n## The Problem\n\nWhen you run AI agents across multiple sessions and runtimes (Claude Code, Codex, Gemini), each session starts cold:\n\n- Agent A fixes a bug in the morning, Agent B reintroduces it in the afternoon\n- Decisions made in one session are forgotten in the next\n- No one remembers what was tried, what failed, or what's in progress\n\nCortex fixes this with two skills, the OACP workspace, and a shared inbox.\n\n## How It Works\n\n```\nSESSION END (any repo, any runtime)       MORNING (cortex repo)\n====================================       =====================\n\n[claude code session]\n  └─ /debrief                             /sync\n       │                                    ↑\n       └─ oacp send ──→ $OACP_HOME/        │\n                        projects/cortex/    │\n                        agents/*/inbox/ ────┘\n                                            │\n[codex session]                             ├──→ SSOT.md\n  └─ /debrief                              │\n       │                               enrich from:\n       └─ oacp send ──→ (same) ────────→ OACP project memory\n                                          git log --since=last_sync\n```\n\n1. **`/debrief`** runs at the end of every agent session (from any project repo). It captures a structured summary (what was done, decisions made, blockers, next steps) and sends it to the cortex OACP workspace via `oacp send`.\n\n2. **`/sync`** runs once daily (typically morning, from the cortex repo). It reads all unprocessed debriefs from `$OACP_HOME/projects/cortex/agents/*/inbox/`, enriches with project memory and git history, and rewrites `SSOT.md` — a compact (\u003c60 lines) document that any agent can read at session start. Processed debriefs are deleted from the inbox after consumption.\n\nSee [`SSOT.example.md`](SSOT.example.md) for a sample of what the generated output looks like.\n\nCortex uses OACP end-to-end: `oacp send` for debrief delivery, OACP workspace layout for agent inboxes, shared memory for the SSOT, and `oacp doctor` for health checks.\n\n## Install\n\n### Prerequisites\n\n- [OACP](https://github.com/kiloloop/oacp) installed (`pip install oacp-cli`)\n- At least one supported runtime ([Claude Code](https://code.claude.com/docs) or [Codex](https://github.com/openai/codex))\n\n### Assumptions\n\n- Your project repos are cloned locally (cortex enriches from `git log`)\n- OACP memory directories exist for projects you want to enrich from\n- `/sync` is a manually invoked daily skill, not a daemon — run it yourself each morning\n\n### Quick Start\n\n```bash\n# Clone\ngit clone https://github.com/kiloloop/cortex.git\ncd cortex\n\n# Initialize OACP workspace (creates $OACP_HOME/projects/cortex/)\noacp init cortex --repo .\n\n# Create your config\ncp config.example.yaml config.yaml\n# Edit config.yaml — see \"Configure\" below\n\n# Install skills into Claude Code\nmkdir -p ~/.claude/skills/debrief ~/.claude/skills/sync\ncp skills/claude/debrief/SKILL.md ~/.claude/skills/debrief/SKILL.md\ncp skills/claude/sync/SKILL.md ~/.claude/skills/sync/SKILL.md\n\n# Install skills into Codex\nmkdir -p ~/.codex/skills/debrief ~/.codex/skills/sync\ncp skills/codex/debrief/SKILL.md ~/.codex/skills/debrief/SKILL.md\ncp skills/codex/sync/SKILL.md ~/.codex/skills/sync/SKILL.md\n```\n\n### Configure\n\nEdit `config.yaml` to point at your projects:\n\n```yaml\n# OACP workspace — cortex reads debriefs from here\noacp_home: $OACP_HOME\nproject: cortex\n\n# Where the cortex repo is cloned (skills reference this)\ncortex_dir: ~/cortex\n\nenrich_sources:\n  oacp_memory:\n    base_dir: $OACP_HOME/projects\n    pattern: \"*/memory/*.md\"\n\n  git_repos:\n    - path: ~/my-project\n      name: my-project\n      lookback_days: 1\n\nmax_ssot_lines: 60\n```\n\n## Usage\n\n```bash\n# End of any session — capture what happened\n/debrief\n\n# Morning — consolidate everything into SSOT\n/sync\n\n# Preview without writing\n/sync --dry-run\n\n# Check workspace health\noacp doctor --project cortex\n```\n\n## Architecture\n\n```\ncortex/                              # repo (kiloloop/cortex)\n├── README.md\n├── LICENSE                          # Apache-2.0\n├── config.yaml                      # Points to OACP workspace\n├── SSOT.md                          # Single source of truth (\u003c60 lines)\n├── SSOT.example.md                  # Sample output for new users\n├── CONTRIBUTING.md\n└── skills/\n    ├── claude/\n    │   ├── debrief/SKILL.md         # Session-end capture\n    │   └── sync/SKILL.md            # Morning consolidation\n    └── codex/\n        ├── debrief/SKILL.md\n        └── sync/SKILL.md\n\n$OACP_HOME/projects/cortex/         # OACP workspace (standard layout)\n├── agents/\n│   ├── claude/{inbox,outbox,dead_letter}/\n│   └── codex/{inbox,outbox,dead_letter}/\n├── memory/                          # Shared project memory\n├── artifacts/                       # Generated outputs\n└── workspace.json\n```\n\nThe repo contains the app logic (skills, config, SSOT). All runtime data (debriefs, agent state) flows through the OACP workspace — same protocol, same tools, same directory layout as any other OACP project.\n\n## How It Fits Into OACP\n\nCortex is a reference implementation showing how to build on OACP:\n\n| Layer | Repo | What |\n|-------|------|------|\n| Protocol | [oacp](https://github.com/kiloloop/oacp) | Coordination spec + CLI |\n| Skills | [oacp-skills](https://github.com/kiloloop/oacp-skills) | Reusable agent skills (inbox, review loop) |\n| **App** | **cortex** | **Cross-session memory (this repo)** |\n\nIt demonstrates:\n- Using `oacp send` for structured message delivery\n- Reading from OACP agent inboxes for data collection\n- Sharing memory across runtimes via the OACP workspace\n- Building runtime-specific skills (Claude + Codex) for the same workflow\n\n## Built With\n\n- [OACP](https://github.com/kiloloop/oacp) — file-based agent coordination protocol\n- [Claude Code](https://code.claude.com/docs) + [Codex](https://github.com/openai/codex) — supported agent runtimes\n- Skills from [oacp-skills](https://github.com/kiloloop/oacp-skills) (coming soon)\n\n## License\n\nApache 2.0 — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiloloop%2Fcortex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiloloop%2Fcortex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiloloop%2Fcortex/lists"}