Metadata-Version: 2.3
Name: cognicore-env
Version: 0.10.1
Summary: Runtime cognition layer for AI agents — memory, reflection, replay, and adaptive execution. The model stays the same. The runtime gets smarter.
Project-URL: Homepage, https://github.com/cognicore-dev/cognicore-my-openenv
Project-URL: Documentation, https://github.com/cognicore-dev/cognicore-my-openenv#readme
Project-URL: Repository, https://github.com/cognicore-dev/cognicore-my-openenv
Project-URL: Issues, https://github.com/cognicore-dev/cognicore-my-openenv/issues
Project-URL: Changelog, https://github.com/cognicore-dev/cognicore-my-openenv/blob/main/CHANGELOG.md
Author: CogniCore Team
License: MIT
License-File: LICENSE
Keywords: agents,ai,autonomous,cognicore,memory,nexus,reflection,replay,runtime
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: jsonschema>=4.0.0
Requires-Dist: numpy>=1.20.0
Provides-Extra: all
Requires-Dist: anthropic>=0.30; extra == 'all'
Requires-Dist: chromadb>=0.4.0; extra == 'all'
Requires-Dist: crewai>=0.50; extra == 'all'
Requires-Dist: fastapi>=0.110; extra == 'all'
Requires-Dist: google-genai>=0.1; extra == 'all'
Requires-Dist: gymnasium>=1.0; extra == 'all'
Requires-Dist: httpx>=0.27; extra == 'all'
Requires-Dist: huggingface-hub>=0.20; extra == 'all'
Requires-Dist: langchain>=0.2; extra == 'all'
Requires-Dist: mcp[cli]>=1.2.0; extra == 'all'
Requires-Dist: mem0ai>=2.0; extra == 'all'
Requires-Dist: mempalace>=3.5; extra == 'all'
Requires-Dist: openai-agents>=0.1; extra == 'all'
Requires-Dist: openai>=1.0; extra == 'all'
Requires-Dist: pydantic>=2.0; extra == 'all'
Requires-Dist: pygame>=2.5; extra == 'all'
Requires-Dist: pyjwt>=2.8.0; extra == 'all'
Requires-Dist: pytest-cov>=4.0; extra == 'all'
Requires-Dist: pytest-xdist>=3.0; extra == 'all'
Requires-Dist: pytest>=7.0; extra == 'all'
Requires-Dist: sentence-transformers>=2.0; extra == 'all'
Requires-Dist: stable-baselines3>=2.0; extra == 'all'
Requires-Dist: supermemory>=3.50; extra == 'all'
Requires-Dist: torch>=2.0; extra == 'all'
Requires-Dist: uvicorn>=0.27; extra == 'all'
Requires-Dist: zep-cloud>=3.23; extra == 'all'
Provides-Extra: crewai
Requires-Dist: crewai>=0.50; extra == 'crewai'
Provides-Extra: dev
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest-xdist>=3.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Provides-Extra: embeddings
Requires-Dist: openai>=1.0; extra == 'embeddings'
Requires-Dist: sentence-transformers>=2.0; extra == 'embeddings'
Provides-Extra: extension
Requires-Dist: mcp[cli]>=1.2.0; extra == 'extension'
Provides-Extra: hf
Requires-Dist: huggingface-hub>=0.20; extra == 'hf'
Provides-Extra: langchain
Requires-Dist: langchain>=0.2; extra == 'langchain'
Provides-Extra: llm
Requires-Dist: anthropic>=0.30; extra == 'llm'
Requires-Dist: google-genai>=0.1; extra == 'llm'
Requires-Dist: openai>=1.0; extra == 'llm'
Provides-Extra: mcp
Requires-Dist: mcp[cli]>=1.2.0; extra == 'mcp'
Provides-Extra: memory
Requires-Dist: chromadb>=0.4.0; extra == 'memory'
Requires-Dist: sentence-transformers>=2.0; extra == 'memory'
Provides-Extra: memory-providers
Requires-Dist: mem0ai>=2.0; extra == 'memory-providers'
Requires-Dist: mempalace>=3.5; extra == 'memory-providers'
Requires-Dist: supermemory>=3.50; extra == 'memory-providers'
Requires-Dist: zep-cloud>=3.23; extra == 'memory-providers'
Provides-Extra: openai-agents
Requires-Dist: openai-agents>=0.1; extra == 'openai-agents'
Provides-Extra: rendering
Requires-Dist: pygame>=2.5; extra == 'rendering'
Provides-Extra: rl
Requires-Dist: gymnasium>=1.0; extra == 'rl'
Requires-Dist: stable-baselines3>=2.0; extra == 'rl'
Requires-Dist: torch>=2.0; extra == 'rl'
Provides-Extra: server
Requires-Dist: fastapi>=0.110; extra == 'server'
Requires-Dist: pydantic>=2.0; extra == 'server'
Requires-Dist: pyjwt>=2.8.0; extra == 'server'
Requires-Dist: uvicorn>=0.27; extra == 'server'
Description-Content-Type: text/markdown

# CogniCore

**Agents don't share conversations. They share experience.**

<br>

[![PyPI](https://img.shields.io/pypi/v/cognicore-env)](https://pypi.org/project/cognicore-env/)
[![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://pypi.org/project/cognicore-env/)
[![License](https://img.shields.io/badge/license-MIT-green)](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

```text
============================================================
 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

```bash
pip install cognicore-env
```

## 60-Second Quickstart

```python
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`

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

### Failure Memory

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)
