EverAlgo is the algorithm library for memory extraction and ranking used by EverOS, EverMind's open-source AI memory framework.
It is business-stateless and persistence-free: operators use explicit in-memory inputs and outputs and never own caller storage or business state.
EverAlgo does not connect to caller databases or indexes. Parser operators are the narrow I/O exception: URL parsing fetches HTTP(S), and Office conversion uses a managed temporary directory before returning in-memory ParsedContent.
EverAlgo provides two symmetric algorithm axes:
Extract (write path) — Turn raw conversation messages or structured inputs into typed memories.
from everalgo.user_memory import BoundaryDetector, EpisodeExtractor, to_memcells
from everalgo.testing.fake_llm import FakeLLMClient
fake = FakeLLMClient(responses=["..."])
cuts = await BoundaryDetector(llm=fake).adetect_batch(messages, is_final=True)
episode = await EpisodeExtractor(llm=fake).aextract(to_memcells(messages, cuts)[0], sender_id="u_alice")Retrieve / Rank (read path) — Compose caller-provided recall functions or rank already-fetched business candidates.
from everalgo import rank
# Low-level synchronous fusion.
merged = rank.fusion.rrf(vec_hits, keyword_hits)
# High-level retrieval strategies accept caller-injected RetrieveFn callables.
hits = await rank.ahybrid_retrieve(
query,
dense_retrieve=dense_retrieve,
sparse_retrieve=sparse_retrieve,
)- Connect to caller databases or indexes, read arbitrary local paths, or persist business state (the parser may fetch HTTP(S) URLs and use controlled temporary files while converting Office documents)
- Own retry logic, multi-key rotation, or provider fallback
- Route requests to different LLM models by business scene (that is EverOS's
SceneRouter) - Compute embeddings (the caller computes and passes vectors in)
EverAlgo is a monorepo of 8 independently versioned PyPI distributions sharing the everalgo.* namespace via PEP 420.
Install only what your use case needs:
| Distribution | Purpose |
|---|---|
everalgo-core |
Types, LLM client + providers, prompt validators, testing helpers |
everalgo-boundary |
BoundaryDetector (batch and step, both returning Cuts: indices into the input) + to_memcells + unimplemented workspace placeholder |
everalgo-clustering |
Cluster value object + cluster_by_geometry / acluster_by_llm operators |
everalgo-rank |
4 retrieval strategies (hybrid / agentic / cluster / maxsim) + category-aware retrieval + 4 business rankers (episodic / profile / case / skill) + fusion / weight / rerank tools |
everalgo-parser |
Multimodal raw-file → ParsedContent |
everalgo-user-memory |
Episode / Foresight / AtomicFact / Profile extractors |
everalgo-agent-memory |
AgentCaseExtractor, AgentSkillExtractor, AgentProfileExtractor |
everalgo-knowledge |
KnowledgeMemory extractor |
| Goal | Document |
|---|---|
| Install and run a first example in 5 minutes | Getting started |
| Understand the full architecture | Architecture |
| Install options and prerequisites | Installation |
| Understand the difference between stateless operators and pure compute | Stateless design |
Understand the a-prefix async convention |
Async–sync bridge |
| Understand why the user Profile merges, caps and dates its items the way it does | Profile design notes |
| Browse per-package API docs | API index |
| Versioning and support policy | Version policy |
| Contribute to EverAlgo | Contributing |
| 审核新建或修改的 Prompt 与动态输入组装 | Prompt 文本审核标准 |
# Full user-memory pipeline (boundary + 4 extractors)
pip install everalgo-user-memory
# Agent memory
pip install everalgo-agent-memory
# Retrieval re-ranking only
pip install everalgo-rank
# Multimodal knowledge extraction
pip install everalgo-knowledgeDevelopment install (all 8 packages, editable):
git clone git@github.com:EverMind-AI/EverAlgo.git
cd everalgo
uv sync --all-packagesApache License 2.0. See LICENSE.