An open API service indexing awesome lists of open source software.

https://github.com/deepleaper/leaper-agent

Self-learning AI agent framework with 6-layer memory evolution engine. Build intelligent agents for any business scenario.
https://github.com/deepleaper/leaper-agent

ai-agent ai-employee cxo memory python self-evolving telegram

Last synced: 16 days ago
JSON representation

Self-learning AI agent framework with 6-layer memory evolution engine. Build intelligent agents for any business scenario.

Awesome Lists containing this project

README

          

# ๐Ÿš€ Leaper Agent

### The Agent Framework That Actually Remembers

### Hermes-Compatible Agent Orchestration + DeepBrain 6-Layer Evolving Memory

[![PyPI version](https://img.shields.io/pypi/v/leaper-agent.svg)](https://pypi.org/project/leaper-agent/)
[![Downloads](https://img.shields.io/pypi/dm/leaper-agent.svg)](https://pypi.org/project/leaper-agent/)
[![GitHub stars](https://img.shields.io/github/stars/deepleaper/leaper-agent.svg)](https://github.com/deepleaper/leaper-agent/stargazers)
[![License](https://img.shields.io/badge/License-BSL--1.1-blue.svg)](LICENSE)
[![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)](https://python.org)

[Website](https://www.deepleaper.com) ยท [Quick Start](#-quick-start) ยท [Why Memory Matters](#-why-memory-matters) ยท [ไธญๅ›ฝ็‰ˆ](https://github.com/deepleaper/leaper-agent-cn)

---

## ๐Ÿค” The Problem

Every agent framework gives you tool-calling and multi-model support. **None of them give you real memory.**

- CrewAI? Flat key-value store, resets between runs.
- AutoGen? Conversation history only, no knowledge evolution.
- LangGraph? Checkpoints, not understanding.
- Hermes Agent? Skill files on disk โ€” smart, but static.

**Your agent forgets everything the moment the session ends.**

## ๐Ÿ’ก The Solution

**Leaper Agent = [Hermes Agent](https://github.com/hermes-agent) base + [DeepBrain](https://github.com/deepleaper/opc-deepbrain) memory engine.**

We took the proven Hermes Agent architecture โ€” its agent loop, tool runtime, and multi-provider support โ€” and integrated DeepBrain's 6-layer self-evolving memory engine. The result: **an agent that gets smarter every time you talk to it.**

```
Session 1: "I'm building a SaaS product with FastAPI and React."
Session 2: "What stack should I use for the admin panel?"
โ†’ Agent recalls your tech choices, suggests FastAPI Admin + React
โ†’ No manual context injection. It just knows.
```

## ๐Ÿง  Why Memory Matters

| What happens | Without memory | With DeepBrain |
|-------------|---------------|----------------|
| You mention your tech stack | Forgotten next session | Remembered forever, evolves over time |
| You correct the agent | Same mistake tomorrow | Learns the correction, never repeats |
| You have 50 conversations | Each starts from zero | Agent builds a knowledge graph of YOU |
| Knowledge conflicts | Silently contradicts itself | 4-Gate system detects & resolves conflicts |

### 6-Layer Memory Architecture

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Layer 5: Meta-Knowledge โ”‚
โ”‚ "I know your tech preferences well, โ”‚
โ”‚ but I'm uncertain about your budget" โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Layer 4: Archived โ€” Historical ref โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Layer 3: Consolidated โ€” Cross-session โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Layer 2: Long-Term โ€” Validated facts โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Layer 1: Short-Term โ€” Recent context โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Layer 0: Flash โ€” Current session โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ†‘ Auto-promotion via 4-Gate QC โ†‘
(Relevance ยท Novelty ยท Consistency ยท Utility)
```

This isn't RAG. This isn't vector search. This is **knowledge that evolves** โ€” facts get validated, promoted, consolidated, and the agent develops meta-awareness of what it knows well and what it doesn't.

## ๐Ÿš€ Quick Start

```bash
# Install
pip install leaper-agent

# Set your API key
export OPENAI_API_KEY=sk-xxx
# or: export ANTHROPIC_API_KEY=sk-ant-xxx
# or: export GEMINI_API_KEY=xxx

# Create an agent with the CEO Coach template
leaper create my-agent --template ceo-coach

# Start
leaper start my-agent
```

### Deploy as Telegram Bot

```bash
leaper create my-bot --template ceo-coach --bot-token YOUR_TELEGRAM_TOKEN
leaper start my-bot
```

## ๐Ÿ—๏ธ Architecture

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Leaper Agent Runtime โ”‚
โ”‚ (Hermes-compatible agent loop) โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ OpenAI โ”‚ Claude โ”‚ Gemini โ”‚ Ollama โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Agent Orchestration โ”‚
โ”‚ Role templates ยท Tool calling โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ ๐Ÿง  DeepBrain Memory Engine โ”‚
โ”‚ 6-Layer ยท 4-Gate ยท Zero Dependencies โ”‚
โ”‚ SQLite-only ยท 100% Local ยท Evolving โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

**Key difference from Hermes:** Hermes stores skills as static Markdown files. Leaper Agent's DeepBrain **automatically extracts, validates, and evolves knowledge** from every conversation โ€” no manual curation needed.

## โšก Hermes Compatibility

Leaper Agent is built on the Hermes Agent foundation. If you're familiar with Hermes, you'll feel at home:

- Same agent loop architecture
- Same multi-provider model support
- Same tool runtime
- **Plus:** 6-layer evolving memory that Hermes doesn't have

## ๐Ÿ”Œ Supported Providers

| Provider | Models | Status |
|----------|--------|--------|
| OpenAI | GPT-4o, GPT-4o-mini, o1/o3 | โœ… |
| Anthropic | Claude Sonnet, Opus, Haiku | โœ… |
| Google | Gemini 2.0, 2.5 | โœ… |
| Ollama | Any local model | โœ… |

## ๐Ÿ“Š vs Other Frameworks

| | Leaper Agent | Hermes | CrewAI | AutoGen | LangGraph |
|---|:---:|:---:|:---:|:---:|:---:|
| Memory that evolves | โœ… 6-layer | โŒ Static files | โŒ Flat KV | โŒ Chat history | โŒ Checkpoints |
| Knowledge quality control | โœ… 4-Gate | โŒ | โŒ | โŒ | โŒ |
| Meta-knowledge | โœ… | โŒ | โŒ | โŒ | โŒ |
| Multi-provider | โœ… | โœ… | โœ… | โœ… | โœ… |
| Zero memory dependencies | โœ… SQLite only | N/A | โŒ Redis/Qdrant | โŒ | โŒ Vector DB |
| Hermes compatible | โœ… | โœ… | โŒ | โŒ | โŒ |

## ๐Ÿ‡จ๐Ÿ‡ณ China Version / ไธญๅ›ฝ็‰ˆ

For Chinese LLM providers (DeepSeek, ้€šไน‰ๅƒ้—ฎ, ๆ™บ่ฐฑ, Moonshot) + 150 role templates:

```bash
pip install leaper-agent-cn
```

โ†’ [Leaper Agent CN](https://github.com/deepleaper/leaper-agent-cn)

## ๐Ÿ”— Ecosystem

| Project | Description |
|---------|-------------|
| [OPC DeepBrain](https://github.com/deepleaper/opc-deepbrain) | Standalone memory engine (use in any framework) |
| [OPC Agent](https://github.com/deepleaper/opc-agent) | Local-first agent with Ollama |
| [Leaper Agent CN](https://github.com/deepleaper/leaper-agent-cn) | China-optimized with 150 templates |

## ๐Ÿ“„ License

[BSL-1.1](LICENSE) โ€” Free for non-competitive use. Converts to Apache-2.0 after 4 years.

## ๐Ÿค Contributing

We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md).

๐Ÿ“ง Contact: [tech@deepleaper.com](mailto:tech@deepleaper.com)

---

**Built with โค๏ธ by [Deepleaper Technology / ่ทƒ็›Ÿ็ง‘ๆŠ€](https://www.deepleaper.com)**

*Other agents forget. Leaper Agent evolves.*