Catalog PyPI
Back to packageRELEASE DETAILS

0.6.2

PyPI

adaptive-agent-mcp

Self-Evolving RAG for AI Agents — A cross-app persistent memory system where agents autonomously write, retrieve, and evolve their knowledge

ai-agentcross-applicationllmmcpmemorypersistent-memory
Published10 Feb 2026
Direct dependencies10
Transitive dependenciesNot calculated

README

Version 0.6.2 documentation
Adaptive Agent MCP

Self-Evolving RAG for AI Agents

Agents don't just read memory — they write it.

License: MIT Python 3.10+ MCP PyPI

中文 | English


Core Concept

Traditional RAG

User Input → Retrieve KB → Generate
               ↑
            Read-only
        (Human-maintained)

Self-Evolving RAG

User Input → Retrieve Memory → Generate
               ↑↓
           Read + Write
    Agent autonomously evolves

Key Differences:

Traditional RAGAdaptive Agent MCP
ReadRetrieves pre-indexed documentsDynamically accumulates at runtime
WriteHuman-maintained knowledge baseAgent writes autonomously
ScopeGeneric knowledgeUser-specific memory
StateStatic dataContinuously evolves

How It Works

In Claude Code: "Remember, I prefer TypeScript"
         ↓
    Agent automatically calls:
    • append_daily_log() → Record to daily log
    • update_preference() → Update preferences
    • extract_knowledge() → Extract knowledge graph
         ↓
In Antigravity: "What are my coding preferences?"
         ↓
    AI: "You prefer TypeScript"

Teach once, remember forever. Share across apps, never forget.


Getting Started

Prerequisites

  1. Python 3.10+
  2. Ripgrep (rg): REQUIRED for full-text search. (Windows: choco install ripgrep, macOS: brew install ripgrep)
  3. SQLite: Handled automatically by Python.

Configuration (v0.6.0)

Configuration is managed via Environment Variables.

1. mcp.json Structure

{
  "mcpServers": {
    "adaptive-agent-mcp": {
      "command": "uvx",
      "args": ["adaptive-agent-mcp"],
      "env": {
        "ADAPTIVE_EMBEDDING_BASE_URL": "https://api.xxx.cn/v1",
        "ADAPTIVE_EMBEDDING_API_KEY": "sk-your-xxx-key",
        "ADAPTIVE_EMBEDDING_MODEL": "Qwen/Qwen2.5-Coder-7B-Instruct",
        "ADAPTIVE_RERANK_BASE_URL": "https://api.xxx.cn/v1",
        "ADAPTIVE_RERANK_API_KEY": "sk-your-xxx-key",
        "ADAPTIVE_RERANK_MODEL": "BAAI/bge-reranker-v2-m3"
      }
    }
  }
}

Local Models:

  • Ollama: Set ADAPTIVE_EMBEDDING_PROVIDER to ollama.
  • LM Studio/vLLM: Set ADAPTIVE_EMBEDDING_PROVIDER to openai_compatible.
  • Base URL: Set to your local endpoint (e.g., http://localhost:11434/v1 or http://localhost:1234/v1).
  • API Key: Any string.

2. Environment Variables

All variables are prefixed with ADAPTIVE_.

VariableDescriptionDefault
ADAPTIVE_STORAGE_PATHStorage location~/.adaptive-agent/memory
ADAPTIVE_RIPGREP_PATHPath to rg executableAuto-detect
ADAPTIVE_EMBEDDING_PROVIDEREmbedding provider (openai_compatible)openai_compatible
ADAPTIVE_EMBEDDING_BASE_URLAPI EndpointNone
ADAPTIVE_EMBEDDING_API_KEYAPI KeyNone
ADAPTIVE_EMBEDDING_MODELEmbedding ModelQwen/Qwen3-Embedding-8B
ADAPTIVE_RERANK_PROVIDERRerank provider (cohere_compatible)cohere_compatible
ADAPTIVE_RERANK_BASE_URLAPI EndpointNone
ADAPTIVE_RERANK_API_KEYAPI KeyNone
ADAPTIVE_RERANK_MODELReranker ModelQwen/Qwen3-Reranker-8B

Default storage path: ~/.adaptive-agent/memory. All apps share the same memory.

Enhance Agent Memory Behavior (Optional)

If your AI doesn't actively read/write memory, add this to your system prompt or user rules:

## Memory System Instructions

- At the start of each conversation, call `initialize_session` to load user preferences.
- When user says "remember", "save", or expresses preferences, call `update_preference` or `append_daily_log`.
- After completing tasks, briefly record progress using `append_daily_log`.
- When user asks about past conversations, use `query_memory_headers` or `search_memory_content`.

Features

FeatureDescriptionVersion
Three-Layer MemoryMEMORY.md + Daily Logs + Knowledge Itemsv0.1.0
Scope Isolationproject:xxx, app:xxx, globalv0.2.0
Concurrent SafetyCross-process file locking + async locksv0.3.0
Incremental Indexingmtime-based smart updatesv0.3.0
Hybrid SearchVector + FTS5 with RRF fusionv0.6.0
Rerank ServiceCohere-compatible re-ranking for higher precisionv0.6.1
Area PartitioningScope-based knowledge routingv0.6.0
Knowledge GraphNetworkX-based entity relationsv0.5.0
Async FoundationNon-blocking I/O throughoutv0.6.0

Available Tools (14 tools)

Session & Retrieval

ToolDescription
initialize_sessionInitialize session with user profile and recent context
query_memory_headersIndex scan — browse memory file metadata
read_memory_contentRead complete memory file content
search_memory_contentFull-text search using ripgrep

Memory & Knowledge

ToolDescription
update_preferenceIntelligently update user preferences
append_daily_logAppend content to daily log or knowledge items
query_knowledgeHybrid search (Vector + FTS5 + RRF fusion) with browse fallback
delete_knowledgeSoft-delete knowledge items
get_period_contextAggregate weekly/monthly logs for summaries
archive_periodSave period summaries

Knowledge Graph

ToolDescription
extract_knowledgeExtract entity relations from text
add_knowledge_relationManually add relations
query_knowledge_graphQuery entities, relations, or stats
multi_hop_queryMulti-hop reasoning queries

Storage Structure

~/.adaptive-agent/memory/
├── MEMORY.md                          # User preferences (scope-based)
├── knowledge/
│   └── areas/
│       ├── general/items.json         # Global knowledge
│       ├── chat/items.json            # Chat-scope knowledge
│       ├── coding/items.json          # Coding-scope knowledge
│       ├── writing/items.json         # Writing-scope knowledge
│       └── projects/{name}/items.json # Project-specific knowledge
├── .index/
│   ├── vectors.db                     # SQLite + sqlite-vec + FTS5
│   └── index.json                     # Indexer metadata
├── .graph/
│   └── knowledge.json                 # NetworkX graph
├── .locks/                            # File lock directory
└── memory/
    └── 2026/
        └── 02_february/
            └── week_07/
                └── 2026-02-10.md      # Daily logs

Data Safety

  • Isolated storage: Data stored in ~/.adaptive-agent/memory, independent of uvx installation
  • Concurrent safety: filelock prevents data corruption from multiple clients
  • Human-readable: All data in Markdown/JSON format, easy to backup and version control

License

MIT License - See LICENSE for details.


Adaptive Agent MCP — Where agents learn, remember, and evolve.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 10

Native requirements
10 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
aiofiles
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
aiofiles>=23.2.0runtime
filelock
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
filelock>=3.16.0runtime
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.28.0runtime
mcp
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mcp>=1.20.0runtime
networkx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
networkx>=3.4runtime
pydantic-settings
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pydantic-settings>=2.6.0runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.10.0runtime
pyyaml
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pyyaml>=6.0runtime
sqlite-vec
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
sqlite-vec>=0.1.6runtime
tenacity
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
tenacity>=8.2.0runtime

Distribution files

2 collected
adaptive_agent_mcp-0.6.2-py3-none-any.whl

bdist_wheel · 47.33 KB · Python py3

Source file
adaptive_agent_mcp-0.6.2.tar.gz

sdist · 38.39 KB · Python source

Source file

Repository

PENDING
justforever17/adaptive-agent-mcp

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:05 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ed9ca784ec025645ea2117758d36850bded2aac18020b3655d08adeb7beabeb7

Other collected versions

View all collected versions →