codejunkie99/agentic-stack: Portable AI Memory Across Coding Agents
codejunkie99/agentic-stack: Portable AI Memory Across Coding Agents
Switching between AI coding tools shouldn't mean losing your agent's learned behaviors, project conventions, and accumulated context. Yet that's exactly what happens today: each harness—whether Claude Code, Cursor, Windsurf, or others—maintains its own isolated memory system. codejunkie99/agentic-stack solves this by providing a portable .agent/ folder that travels with your project, preserving memory layers, skills, and protocols regardless of which tool you plug into.
What is codejunkie99/agentic-stack?
codejunkie99/agentic-stack is an open-source Python↗ Bright Coding Blog project (Apache 2.0 licensed, 2,179 GitHub stars, 264 forks) maintained by @AV1DLIVE. It defines itself as a "portable memory-and-skills layer" for coding agents—a .agent/ directory that lives inside your project repository and maintains consistent state across multiple AI harnesses.
The project addresses a specific friction in the emerging agent-engineering workflow: developers increasingly switch between tools depending on the task, team conventions, or subscription availability. Each switch currently resets the agent's understanding of your codebase preferences, architectural decisions, and learned patterns. agentic-stack treats this as a portability problem rather than a feature gap in any single tool.
The architecture centers on four memory layers—working, episodic, semantic, and personal—each with distinct retention policies. A nightly auto_dream.py cycle clusters recurring patterns into candidate lessons, which the host agent reviews via CLI tools before graduating to long-term semantic memory. This design reflects patterns from Claude Code's native memory system and broader agent-engineering community discussions, but decouples them from any single provider.
The project also includes a local data layer for monitoring multiple agents from one place, plus an optional data flywheel that converts approved, redacted runs into training-ready artifacts without external API calls or model training.
Key Features
Harness-Agnostic Portability. The core .agent/ folder plugs into Claude Code, Cursor, Windsurf, OpenCode, OpenClaw, GitHub Copilot CLI, Google Gemini CLI, Hermes, Pi Coding Agent, Codex, Antigravity, or a standalone Python loop. Adapter shims translate the portable format into each harness's native configuration files—CLAUDE.md, .cursor/rules/*.mdc, .windsurfrules, gemini.md, and others.
Structured Memory System. Four layers with query-aware retrieval: working memory for active context, episodic memory for action logs, semantic memory for graduated lessons (stored in lessons.jsonl and rendered to LESSONS.md), and personal memory for developer preferences in PREFERENCES.md—the first file loaded in every session.
Host-Agent Review Protocol. The auto_dream.py cycle stages candidate lessons mechanically, but never auto-accepts them. Developers review via graduate.py, reject.py, reopen.py, and retract_lesson.py—each requiring a rationale and maintaining append-only audit history. This prevents runaway memory growth and preserves decision provenance.
Nine Seed Skills. Progressive disclosure loading via manifest: skillforge (pattern extraction), memory-manager (reflection cycles), git-proxy (constrained git operations), debug-investigator (structured debugging), deploy-checklist (staging/production gates), design-md (Google Stitch-style design documents), data-layer (cross-harness monitoring), data-flywheel (approved-run artifacts), and tldraw (opt-in visual canvas).
Safe Upgrade Path. The agentic-stack upgrade command refreshes skeleton-owned infrastructure—harness Python files, memory tooling, skill indices—without overwriting CLAUDE.md, personal memory, existing skills, or adapter settings. Dry-run preview and manifest repair commands prevent accidental data loss.
Optional External Brain Integration. Version 0.18.0 adds a bridge to codejunkie99/brain, a git-backed long-term memory CLI/TUI/MCP server, for cross-project recall without vendoring the Rust workspace.
Use Cases
Multi-Tool Development Teams. Organizations standardizing on .agent/ can let developers choose their preferred harness while maintaining consistent coding conventions, review standards, and architectural knowledge. The PREFERENCES.md file propagates commit message style, test strategy, and explanation depth across all tools.
Long-Running Projects with High Context Turnover. For codebases maintained over months or years, the semantic memory layer preserves lessons about why certain patterns were rejected, which authentication approaches failed, and how deployment pipelines evolved—surviving beyond any single agent session or tool subscription.
Agent Performance Monitoring. The data-layer skill generates local dashboards tracking harness events, cron timelines, token/cost estimates, and KPI summaries. Teams running multiple agents against the same project can visualize activity mix, success rates, and resource allocation without external telemetry.
Training Data Generation. The data-flywheel skill exports approved, redacted runs into trace records, context cards, eval cases, and training-ready JSONL. This supports prompt engineering and future adapter development without sending data to third-party training services.
Regulatory and Audit Environments. The append-only review protocol with required rationales for graduation, rejection, and retraction creates a decision log suitable for compliance contexts where automated reasoning must be explainable and reversible.
Installation & Setup
macOS / Linux (Homebrew)
# tap + install (both lines required)
brew tap codejunkie99/agentic-stack https://github.com/codejunkie99/agentic-stack
brew install agentic-stack
# initialize in any project — onboarding wizard runs automatically
cd your-project
agentic-stack claude-code
# alternatives: cursor | windsurf | opencode | openclaw | copilot-cli | gemini | hermes | pi | codex | standalone-python | antigravity
The brew tap command registers the custom tap from GitHub; brew install fetches the formula defined in Formula/agentic-stack.rb. Running agentic-stack <adapter> in a project directory creates the .agent/ folder structure and launches the preferences wizard.
Windows (PowerShell)
# clone + run the native installer
git clone https://github.com/codejunkie99/agentic-stack.git
cd agentic-stack
.\install.ps1 claude-code C:\path\to\your-project
The PowerShell installer performs the same file operations as the Unix shell script, adapted for Windows path conventions and file locking via msvcrt.
Post-Install Management
# add a second adapter to an existing project
./install.sh add cursor
# health check with color-coded per-adapter status
./install.sh doctor
# interactive TUI for add/remove/audit operations
./install.sh manage
# preview and apply safe infrastructure upgrades
agentic-stack upgrade --dry-run
agentic-stack upgrade --yes
The bare ./install.sh (no arguments) launches a multi-select wizard that auto-detects installed harnesses and pre-checks them for batch installation.
Real Code Examples
Reviewing and Graduating Candidate Lessons
After the nightly auto_dream.py cycle stages candidates, review them through the host-agent CLI:
# list pending candidates, sorted by priority
python3 .agent/tools/list_candidates.py
# accept with required rationale
python3 .agent/tools/graduate.py <id> --rationale "evidence holds, matches PREFERENCES"
# reject with reason; preserves full decision history
python3 .agent/tools/reject.py <id> --reason "too specific to generalize"
Graduated lessons append to semantic/lessons.jsonl and re-render semantic/LESSONS.md. Rejected candidates remain in review_state.py's decision log with their rationale, preventing recurring churn on the same pattern. This design enforces human review for all semantic memory mutations—the tool stages mechanically but never graduates unattended.
Generating Local Dashboard Exports
# export 30 days of cross-harness activity, bucketed by day
python3 .agent/tools/data_layer_export.py --window 30d --bucket day
Outputs land in .agent/data-layer/exports/<date>/ including dashboard.html, dashboard.tui.txt, and daily-report.md. The command also prints a terminal dashboard directly. Optional local inputs at .agent/data-layer/cron-runs.jsonl and harness-events.jsonl feed scheduled run tracking and custom categories.
Exporting Approved Runs to Flywheel Artifacts
# after populating .agent/flywheel/approved-runs.jsonl
python3 .agent/tools/data_flywheel_export.py
This produces .agent/flywheel/exports/<date>/ containing:
trace-records.jsonl— structured execution tracestraining-examples.jsonl— prompt-completion pairseval-cases.jsonl— testable scenarioscontext-cards/<domain>/<workflow>.md— condensed reference materialflywheel-metrics.json— aggregate statistics
The process is local-only and model-agnostic; it prepares artifacts without training models or calling external APIs.
Configuring the Nightly Staging Cycle
crontab -e
0 3 * * * python3 /path/to/project/.agent/memory/auto_dream.py >> /path/to/project/.agent/memory/dream.log 2>&1
auto_dream.py uses absolute path resolution and performs only mechanical operations: clustering, staging, prefiltering, and decay. No git commits, network calls, or reasoning occur—safe for unattended execution.
Advanced Usage & Best Practices
Start with One Harness, Expand Incrementally. The multi-select wizard supports batch installation, but for production stability, establish working memory and graduate initial lessons with one harness before adding others. This prevents adapter-specific configuration conflicts during the learning phase.
Version Control the .agent/ Directory. The README notes that git log .agent/memory/ becomes the agent's autobiography. Commit memory changes to track semantic evolution and enable rollback of problematic lessons. The .agent/memory/.index/ directory for FTS search is gitignored by default.
Use --dry-run Before Upgrades. The upgrade command's safe design is only as reliable as the user's verification. Preview skeleton-owned file changes before applying them, especially when local modifications exist in harness/ or tools/ directories.
Opt Into Beta Features Selectively. FTS memory search and tldraw canvas are off by default. Enable them in .agent/memory/.features.json after understanding their storage and performance implications—particularly the FTS5 index size for large memory corpora.
Monitor the Data Layer for Drift. Regular data_layer_export.py runs with consistent --window parameters create comparable time-series. Watch for sudden token cost spikes or harness mix shifts that indicate configuration changes or unexpected agent behavior.
Comparison with Alternatives
| Approach | Portability | Memory Layers | Review Protocol | Local-Only Option |
|---|---|---|---|---|
| codejunkie99/agentic-stack | Multi-harness .agent/ folder |
4 structured layers | Required host-agent rationale | Yes, fully |
| Claude Code native memory | Single harness | Working + project | Automatic acceptance | Yes |
| Cursor rules | Single harness | Static .cursor/rules |
None (static files) | Yes |
| Custom MCP servers | Varies by implementation | Varies | Varies | Varies |
Claude Code's built-in memory system offers tighter integration but locks context to Anthropic's ecosystem. Cursor's .cursor/rules provides static convention enforcement without dynamic lesson accumulation. agentic-stack trades native integration depth for cross-tool consistency and explicit human review—valuable when tool choice varies by task, team, or organizational policy.
The optional Brain integration (v0.18.0) extends this portability to cross-project recall, though it introduces an external Rust dependency that pure-Python deployments may wish to avoid.
FAQ
Does this work with all AI coding tools? Twelve adapters are supported including Claude Code, Cursor, Windsurf, GitHub Copilot CLI, Google Gemini CLI, Hermes, Pi, Codex, and others. Hook depth varies—Claude Code and Pi offer the richest integration, while Cursor and Windsurf require manual reflect calls.
Is my data sent to external services? No. All memory, data layer exports, and flywheel artifacts are local-only. The optional Brain integration requires explicit setup and remains git-backed on your infrastructure.
What Python version is required? Python 3.9 or later. Version 0.10.0 specifically fixed a Python 3.9 crash affecting macOS Homebrew users.
How do I migrate from pre-v0.9 installations? Run ./install.sh doctor first—it synthesizes install.json from on-disk adapter signals. Skipping this step orphans prior installs under the new manifest-driven backend.
Can I use this in CI/CD pipelines? Yes. The --yes flag accepts all defaults without TUI interaction, and non-TTY shells automatically print available subcommands instead of opening interactive interfaces.
What happens to my existing skills during upgrade? Existing skill directories are untouched. upgrade --yes only refreshes skeleton-owned infrastructure: harness Python files, memory tooling, and new skill directories from upstream.
Is there commercial support? The project is maintained by an individual developer (@AV1DLIVE) with community contributions. No commercial support tier is documented.
Conclusion
codejunkie99/agentic-stack addresses a genuine gap in the current AI coding tool landscape: the fragmentation of agent memory across incompatible harnesses. For developers who regularly switch between Claude Code, Cursor, and other tools—or teams standardizing on consistent conventions while permitting individual tool choice—the portable .agent/ folder offers a pragmatic middle ground.
The project's strength lies in its explicit design choices: mechanical staging with human-mandatory review, append-only audit logs, safe upgrade paths, and local-first data handling. These reflect engineering maturity rather than feature velocity. The 2,179-star adoption suggests resonance with developers experiencing the same portability pain.
Best suited for: developers running multiple AI coding tools, teams needing consistent agent behavior across heterogeneous environments, and organizations with audit requirements for automated reasoning.
Explore the project, review the architecture documentation, and install via https://github.com/codejunkie99/agentic-stack.
Outils recommandés
Explore on the BrightCoding network
Hand-picked resources from our other sites.
abus-aikorea/voice-pro: Open-Source AI Dubbing with Whisper, F5-TTS & Gradio
Voice-Pro is a free, open-source Gradio WebUI that integrates Whisper ASR, F5-TTS/CosyVoice voice cloning, and multilingual translation into a single local appl...
0xchamin/mcptube: YouTube Knowledge Engine with Vision + Wiki
mcptube transforms YouTube videos into a persistent, compounding knowledge base using transcripts, vision analysis, and a wiki engine. Built as an MCP server fo...
agiresearch/A-mem: Dynamic Memory System for LLM Agents
agiresearch/A-mem is an open-source agentic memory system for LLM agents using Zettelkasten principles and ChromaDB. Features dynamic organization, automatic me...
Continuez votre lecture
Why Alexandrie is the Ultimate Markdown Note-Taking App
Why CrossPaste is the Ultimate Game Changer for Clipboard Management
Why Chandra is the Ultimate OCR Tool for Handwriting and Tables
Stop Coding Alone: OPC-Skills Gives Your AI Agent Superpowers
Commentaires 0
Aucun commentaire pour l'instant. Soyez le premier à réagir !