Skip to main content

CogniCore

Agents don't share conversations. They share experience.


PyPI Python License


The Problem

Agent A discovers a bug fix, optimizes an algorithm, or learns what doesn't work. But when Agent B encounters a similar task, it starts from zero.

CogniCore solves this. It persists agent experiences across independent sessions, providing subsequent agents with retrieved context containing verified approaches—and failures to avoid.


See It In 30 Seconds

============================================================
 SESSION 1: Agent A (Claude) fixes an authentication bug
============================================================

AGENT A: Task -> Fix intermittent JWT authentication failures

Attempt 1: Increase JWT expiration
❌ FAILED: tests/auth timeout

Attempt 2: Modify retry logic
❌ FAILED: race condition in auth_middleware.py

Attempt 3: Fix refresh-token lifecycle
✅ SUCCESS
VERIFICATION: pytest tests/auth -> 18 passed

🧠 COGNICORE: Verified experience promoted and saved.

============================================================
 SESSION 2: Agent B (Gemini) encounters the same problem
============================================================

NEW SESSION: No previous conversation available.

AGENT B: Task -> Investigate JWT authentication failure.

AGENT B: Let me query CogniCore for related past experiences...

🧠 CogniCore retrieved 1 relevant experience
  ❌ Increasing JWT expiration
     Failed because: tests/auth timeout
  ❌ Modifying retry logic
     Failed because: race condition in auth_middleware.py
  ✅ Refresh-token lifecycle fix
     Verified: 18 tests passed

AGENT B:
"I found a verified previous experience for this repository.
 I'll inspect the refresh-token lifecycle first rather than
 repeating the two failed approaches."

Install

pip install cognicore-env

60-Second Quickstart

import cognicore

runtime = cognicore.CogniCoreRuntime()

def my_agent(task, context):
    print(f"Task: {task}")
    print(f"Memory: {context.get('experience')}")
    # Call your LLM here
    return True

result = runtime.execute(my_agent, task="Fix the JWT login bug")

Why This Isn't Just Memory

Most agent memory is just a dump of past conversations. CogniCore operates on Experience Memory.

Verification

An experience progresses through a strict lifecycle: Observed → Evidence → Verified → Promoted → Transferable

<<<<<<< Updated upstream memory = cognicore.Memory(max_size=10000) memory.store({"text": "add null check before dereferencing user", "category": "crash", "correct": True})

results = memory.semantic_search("null pointer crash", top_k=3)

=======
CogniCore requires independent evidence (e.g., `exit_code: 0` from tests) before allowing an experience to be transferred.

### Failure Memory
>>>>>>> Stashed changes

CogniCore explicitly stores what *didn't* work and why. Often, knowing a specific approach leads to a race condition is more valuable to an agent than a direct answer.

### Context Guardians

If an experience was verified on Python 3.11 but an agent retrieves it on Python 3.13, CogniCore flags a `CONTEXT MISMATCH` and requires the agent to independently verify the approach against the new environment before committing.

## Cross-Agent Transfer

CogniCore memory is model-agnostic. 

`Claude (learns) → CogniCore (verifies & stores) → Codex (retrieves & applies)`

---

## Benchmarks

**LongMemEval** (Strict R@5 on 500 chunks, 30 targets, 470 distractors)

| System         | Accuracy | Tokens / Query |
|----------------|----------|----------------|
| CogniCore FTS5 |  76.7%   |      68        |
| Mem0           |  70.0%   |      72        |
| Naive Context  |  95.0%   |    7,942       |

CogniCore achieves a ~99% token reduction vs Naive Context injection while outperforming remote embedding pipelines natively.

[Full methodology → docs/benchmarks.md](docs/benchmarks.md)

---

## Architecture & Features

CogniCore is a full cognitive framework for AI.

- [Architecture (Time Travel, Immutable Shield)](docs/architecture.md)
- [Semantic & Episodic Memory Details](docs/memory.md)
- [Experience Transfer Deep-Dive](docs/experience-transfer.md)
- [Integrations (MCP, API Keys, Claude Plugin)](docs/integrations.md)
- [Research (RL Environments, NEXUS Autonomous Coding)](docs/research.md)

---

## Community

🔥 Join the CogniCore Lab to experiment with agent memory.

- [Discord](https://discord.gg/cognicore)
- [Issues](https://github.com/cognicore-dev/cognicore-my-openenv/issues)
- [Contributions](CONTRIBUTING.md)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cognicore_env-0.10.2.tar.gz (705.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cognicore_env-0.10.2-py3-none-any.whl (678.1 kB view details)

Uploaded Python 3

File details

Details for the file cognicore_env-0.10.2.tar.gz.

File metadata

  • Download URL: cognicore_env-0.10.2.tar.gz
  • Upload date:
  • Size: 705.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cognicore_env-0.10.2.tar.gz
Algorithm Hash digest
SHA256 3f3df942674479da0c28f728bf585d70ce3fbd85197d98009a0326f3b99f5837
MD5 c1faa7ce77ddf4ae20f4d79d2f1d3c20
BLAKE2b-256 03553aacf724932acb748495b57e9433be31f0261dc8bdc2985b83e22e5a7868

See more details on using hashes here.

File details

Details for the file cognicore_env-0.10.2-py3-none-any.whl.

File metadata

  • Download URL: cognicore_env-0.10.2-py3-none-any.whl
  • Upload date:
  • Size: 678.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cognicore_env-0.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb1bd303df6b1608a4e085d6088f28279c7d0084ebcb9654c4a97bfc75c4d590
MD5 551f467bbeb41ec55bed563bf6749932
BLAKE2b-256 cfa770a1338f2fdaaa662adf9bfbe2292d843dc2e4eaf9cc74b5def975a655e7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.10.3

2 files

This release

0.10.2 This release

2 files

0.10.1

2 files

0.10.0

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page