Layered multi-channel cognitive memory framework with local-first storage, RAG, and optional graph integration.
Project description
CogniWeave Memory
cogni-mem is the current Python package name for CogniWeave Memory, a local-first Python framework for layered multi-channel memory, retrieval-augmented workflows, and agent execution with memory writeback.
This 0.1.x release line is the first public packaging line. It is based on the internal architecture milestone 范式+记忆系统&RAG重构 v0.2, while keeping the framework's core behavior aligned with that code line and focusing this release on packaging, dependency declaration, and documentation.
Notes
For full design notes, diagrams, and the architecture overview in English, see docs/note.en.md.
What Is Included
- Local-first memory runtime with JSON, SQLite, and local Qdrant path mode
- Multi-channel memory abstractions for key, semantic, episodic, perceptual, and experience memory
- Tool registry and memory-aware agent loop
- Optional MiniMax OpenAI-compatible provider integration
- Optional Neo4j graph linkage
Installation
Base install:
pip install cogni-mem
Install with MiniMax provider support:
pip install "cogni-mem[minimax]"
Install with Neo4j graph support:
pip install "cogni-mem[graph]"
Install from the GitHub repository tag:
pip install "git+https://github.com/luckly06/cogniweave-memory.git@v0.1.0"
Gitee can remain as a mirror or release distribution channel for the original source repository.
Quick Start
from cogniweave_full import (
CalculatorTool,
Config,
LLMFactory,
MemoryAgent,
MemoryForgetTool,
MemoryLifecycleTool,
MemoryManager,
MemorySearchTool,
OfflineIngestionTool,
ToolRegistry,
)
config = Config(
llm_provider="mock",
enable_hyde=False,
enable_mqe=False,
enable_qdrant=False,
enable_neo4j=False,
)
llm = LLMFactory.create(config=config)
registry = ToolRegistry()
manager = MemoryManager(
llm=llm,
tool_registry=registry,
base_dir="./runtime_demo",
config=config,
)
registry.register_tool(CalculatorTool())
registry.register_tool(MemorySearchTool(manager))
registry.register_tool(MemoryForgetTool(manager))
registry.register_tool(MemoryLifecycleTool(manager))
registry.register_tool(OfflineIngestionTool(manager))
agent = MemoryAgent(
name="assistant",
llm=llm,
memory_manager=manager,
user_id="demo_user",
session_id="demo_session",
system_prompt="You are a memory-aware assistant.",
)
print(agent.run("Remember that future answers should start with the conclusion."))
print(agent.run("What did we agree on earlier?"))
Runtime Model
- Default local runtime: key memory uses JSON, metadata uses SQLite, vector memory uses local Qdrant path mode
- Optional remote services:
set
COGNIWEAVE_ENABLE_QDRANT=trueto connect to a remote Qdrant service - Optional graph enhancement:
set
COGNIWEAVE_ENABLE_NEO4J=trueand install thegraphextra
Environment
See .env.example for configuration. Important variables:
COGNIWEAVE_LLM_PROVIDERMINIMAX_API_KEYMINIMAX_BASE_URLMINIMAX_MODELCOGNIWEAVE_ENABLE_QDRANTCOGNIWEAVE_ENABLE_NEO4J
Validation
Minimal local smoke test:
python3 smoke_test.py
Real integration workflow:
bash scripts/run_integration_suite.sh
See INTEGRATION_GUIDE.md for full details.
Release Scope
This package release intentionally avoids changing the framework's core implementation behavior. The 0.1.0 work is limited to packaging, dependency layering, documentation, and release metadata needed for public distribution.
License
MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cogni_mem-0.1.0.tar.gz.
File metadata
- Download URL: cogni_mem-0.1.0.tar.gz
- Upload date:
- Size: 64.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d61d9b3bcfc2e25db858296bc34afb63cc4564532b87e745748f2a8e188fa524
|
|
| MD5 |
37d7370a50329aa845f7875b775b6e89
|
|
| BLAKE2b-256 |
8882339b024beb7ef618666409597ef3505d7c89e262fe9c0febab218a3e29ca
|
File details
Details for the file cogni_mem-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cogni_mem-0.1.0-py3-none-any.whl
- Upload date:
- Size: 64.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef027456579143b26e00687c555af26657387b9753ad8b2cae0ab0ddbb248b63
|
|
| MD5 |
e70541c29c5a2ca8d1393f1b13db90db
|
|
| BLAKE2b-256 |
a1514c243320c7ed8e3de0575dc4578f936446c2ac5cccc0f998c4973d8012c6
|