<p align="center">
<img src="./agentmind-hero-minimal.png" alt="AgentMind" width="800">
</p>
<h1 align="center">AgentMind</h1>
<p align="center"><strong>Self-Learning Memory System for AI Agents</strong></p>
<p align="center">Give your AI agent memory. Let it learn your style. Make it better over time.</p>
<p align="center">
<a href="https://github.com/Youhai020616/Agentmind/stargazers"><img src="https://img.shields.io/github/stars/Youhai020616/Agentmind?style=social" alt="Stars" /></a>
<a href="https://github.com/Youhai020616/Agentmind/fork"><img src="https://img.shields.io/github/forks/Youhai020616/Agentmind?style=social" alt="Forks" /></a>
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="License" /></a>
<img src="https://img.shields.io/badge/node-%3E%3D20-green" alt="Node" />
</p>
<p align="center">
<a href="#quick-start">Quick Start</a> โข
<a href="#how-it-works">How It Works</a> โข
<a href="#features">Features</a> โข
<a href="#why-agentmind">Why AgentMind</a> โข
<a href="./README.zh-CN.md">ไธญๆๆๆกฃ</a>
</p>
---
## The Problem
Every time you start a new session with an AI coding agent, it forgets everything:
- โ Your coding style preferences
- โ The mistakes it already made (and you corrected)
- โ Your project conventions and patterns
- โ The workflows that work best for you
**You end up repeating the same corrections, over and over.**
## The Solution
AgentMind observes how you work, learns your preferences, and automatically applies them in future sessions. Zero configuration. Install and forget.
```
Session 1: You correct the agent โ AgentMind observes
Session 2: Agent remembers โ No correction needed
Session 10: Agent anticipates โ Works exactly how you like
```
## Why AgentMind
| Approach | Remembers? | Learns? | Cross-Session? | Zero Config? |
|----------|:---:|:---:|:---:|:---:|
| AGENTS.md / CLAUDE.md | โ
| โ Manual | โ
| โ Manual |
| Chat history | โ Lost | โ | โ | โ
|
| Custom system prompts | โ
| โ Manual | โ
| โ Manual |
| **AgentMind** | โ
| โ
Auto | โ
| โ
|
**AgentMind is the only solution that learns automatically from your behavior and applies it across sessions.**
## Quick Start
### Install (30 seconds)
```bash
# In Claude Code
/plugin marketplace add Youhai020616/Agentmind
/plugin install agentmind@agentmind-marketplace
```
That's it. AgentMind starts learning immediately.
### Or install from source
```bash
git clone https://github.com/Youhai020616/Agentmind.git
cd Agentmind && npm install
claude --plugin-dir .
```
## How It Works
```
You work with your AI agent
โ
โโโโโโโโโโโโผโโโโโโโโโโโ
โ ๐๏ธ OBSERVE โ Watches corrections, patterns, errors
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโโผโโโโโโโโโโโ
โ ๐ง UNDERSTAND โ Extracts preferences and patterns
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโโผโโโโโโโโโโโ
โ ๐พ MEMORIZE โ Stores as "instincts" with confidence
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโโผโโโโโโโโโโโ
โ โก APPLY โ Auto-injects into future sessions
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโโผโโโโโโโโโโโ
โ โ
VALIDATE โ Tracks if it helped or not
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโโผโโโโโโโโโโโ
โ ๐ EVOLVE โ Strengthens good patterns, drops bad
โโโโโโโโโโโโดโโโโโโโโโโโ
```
### Confidence System
Every learned pattern gets a confidence score:
```
Confidence = Frequency ร 0.35 + Effectiveness ร 0.40 + Human Feedback ร 0.25
```
| Confidence | Level | What happens |
|:---:|------|------|
| โฅ 0.8 | ๐ข Core | Auto-applied every session |
| 0.6โ0.8 | ๐ต Strong | Suggested when relevant |
| 0.4โ0.6 | ๐ก Moderate | Available on request |
| 0.2โ0.4 | โช Tentative | Observing silently |
| < 0.2 | ๐ด Deprecated | Queued for removal |
### Four-Level Evolution
Patterns grow smarter over time:
```
Level 0: Instinct โ "Use semicolons in TypeScript"
Level 1: Pattern โ "Always run tests before committing"
Level 2: Strategy โ "When refactoring, start with types"
Level 3: Expert โ "Full-stack TypeScript project workflow"
```
## Features
### ๐ Automatic Observation (Zero Config)
| Observer | What it watches |
|----------|----------------|
| **Intent** | When you correct the agent or express preferences |
| **Execution** | Tool call patterns and workflows |
| **Evaluation** | Error patterns and how they get resolved |
| **Context** | Project conventions and coding style |
### ๐ฎ Commands
| Command | Description |
|---------|-------------|
| `/agentmind:status` | Learning status overview |
| `/agentmind:instincts` | Browse and manage learned patterns |
| `/agentmind:reflect` | Review pending learning outcomes |
| `/agentmind:evolve` | Trigger pattern evolution |
| `/agentmind:dashboard` | Visualize learning data |
### ๐ Privacy First
- All data stored **locally** (never sent to any server)
- Only metadata patterns stored (no actual code content)
- You control what's learned via commands
- Full transparency โ inspect any stored instinct
## Architecture
<p align="center">
<img src="./agentmind-architecture-minimal.png" alt="Architecture" width="700">
</p>
```
agentmind/
โโโ hooks/ # Event observers (intent, execution, evaluation)
โโโ agents/ # Evolution engine, learning analyst
โโโ commands/ # CLI commands (status, instincts, reflect, evolve)
โโโ scripts/lib/ # Core library
โ โโโ storage.ts # Local persistence
โ โโโ confidence.ts # Confidence scoring
โ โโโ detector.ts # Pattern detection
โ โโโ evolution.ts # Pattern evolution
โ โโโ types.ts # Type definitions
โโโ scripts/ # Shell integration
```
## Use Cases
**For individual developers:**
- Agent remembers your code style across sessions
- Fewer repeated corrections = faster coding
**For teams:**
- Export team conventions as shareable instincts
- Onboard new team members with learned patterns
**For AI agent builders:**
- Plug-in memory layer for any agent
- Modular: use storage, confidence, or detection independently
## Development
```bash
# Prerequisites: Node.js 20+, Claude Code (latest)
git clone https://github.com/Youhai020616/Agentmind.git
cd Agentmind
npm install
npm test # Run tests
npm run build # Build
```
## Roadmap
- [x] Core learning engine
- [x] Confidence scoring system
- [x] Four-level evolution
- [x] Claude Code plugin integration
- [ ] VS Code extension
- [ ] Cross-device sync
- [ ] Team sharing
- [ ] Multi-agent support
- [ ] OpenAI / Cursor integration
## Contributing
Contributions welcome! Some areas where help is appreciated:
- **New observers** โ Detect more types of user preferences
- **Evolution strategies** โ Smarter pattern merging and promotion
- **Integrations** โ VS Code, Cursor, OpenCode, other agents
- **Testing** โ More edge cases and real-world scenarios
## Star History
<a href="https://star-history.com/#Youhai020616/Agentmind&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Youhai020616/Agentmind&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Youhai020616/Agentmind&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Youhai020616/Agentmind&type=Date" />
</picture>
</a>
## ๐ Ecosystem
| Project | Description |
|---------|-------------|
| [stealth-cli](https://github.com/Youhai020616/stealth-cli) | Anti-detection browser CLI powered by Camoufox |
| [stealth-x](https://github.com/Youhai020616/stealth-x) | Stealth X/Twitter automation |
| [dy-cli](https://github.com/Youhai020616/douyin) | Douyin/TikTok CLI |
| [xiaohongshu](https://github.com/Youhai020616/xiaohongshu) | Xiaohongshu automation |
| [freepost](https://github.com/Youhai020616/freepost-saas) | AI social media management |
## License
[MIT](./LICENSE)