Experia AI
Memory layers help your agents remember. Experia helps them learn.
The open-source experience-learning layer that makes AI agents measurably stop repeating their mistakes. Experia captures what an agent did, evaluates why it worked or failed, distills a reusable lesson, and reinforces the strategies that keep paying off — a cognitive plugin for the frameworks you already use (LangChain, LangGraph, and more). It doesn't replace your agent framework; it closes the feedback loop around it.
Vision
Current AI agents start from zero on every interaction. Experia adds an experience learning loop around agents. It allows agents to remember what happened, understand why it worked or failed, and improve future decisions.
Observation → Action → Result → Experience → Lesson → Memory → Better Future Action
flowchart TD
subgraph Multi-Agent Swarm
AgentA[Coder Agent]
AgentB[Researcher Agent]
Supervisor[Supervisor Agent]
end
subgraph Experia AI Cognitive Layer
Store[(Shared MemoryStore)]
Eval[LLM Evaluator\nRoot Cause Analysis]
RuleGen[Rule Generator]
Reflect[Reflection Engine\nBatch Analysis]
Ctx[Context Builder]
AgentA & AgentB -- 1. Record Action --> Store
Store -- 2. Evaluate Outcome --> Eval
Eval -- 3. Extract Lesson (agent_role) --> Store
Eval -- 4. Consolidate --> RuleGen
RuleGen -- 5. Generate RULE --> Store
Supervisor -- 6. Trigger reflect() --> Reflect
Reflect -- 7. Generate Global STRATEGY --> Store
Store -- 8. retrieve_context(agent_role) --> Ctx
end
Ctx -- 9. Inject Shared Knowledge --> AgentA & AgentB & Supervisor
Does it actually work?
A deterministic, fully offline benchmark (benchmark/learning_benchmark.py)
pits two identical agents against the same workday of ops tasks. The agent has
no built-in knowledge — its only intelligence is the context Experia injects,
so every difference is attributable to the cognitive layer.
Experia learning benchmark (6 tasks x 4 rounds = 24 episodes)
==================================================================
Metric Baseline Experia
------------------------------------------------------------------
Tasks completed successfully 0/24 18/24
Overall success rate 0% 75%
Mistakes repeated (avoidable) 18 0
==================================================================
Success rate per round (the learning curve)
------------------------------------------------------------------
Round 1 baseline [....................] 0% experia [....................] 0%
Round 2 baseline [....................] 0% experia [####################] 100%
Round 3 baseline [....................] 0% experia [####################] 100%
Round 4 baseline [....................] 0% experia [####################] 100%
------------------------------------------------------------------
The baseline agent makes the same avoidable mistake 18 times. The Experia agent fails each task at most once, extracts the lesson, and never repeats it — reaching a 100% success rate from the second encounter on. No LLM or API key is required to reproduce this:
python benchmark/learning_benchmark.py
Integrations
Experia acts as a cognitive plugin. It does not replace your agent frameworks (like LangChain, AutoGen, CrewAI), it enhances them by managing long-term memory, learned experiences, user knowledge, and behavioral patterns.
Getting Started
Install the base package for the offline core quickstart:
pip install experia
Optional features have separate extras: experia[llm] for LiteLLM-backed
evaluation/embedding/rules/reflection, experia[langchain] for LangChain, and
experia[langgraph] for LangGraph. Provider credentials are needed only when
the selected LLM or embedding provider requires them.
For class and method details, see the API Reference.
Offline quickstart
This is the canonical executable quickstart from
examples/quickstart.py. It needs no network access,
credentials, or optional extra, and its assertions document the installed
ExperienceRecord and Memory behavior.
"""Executable, offline Experia quickstart using only the base installation."""
import asyncio
from experia import Learner, MemoryType, SimpleHeuristicEvaluator, SQLiteStore
async def main() -> None:
store = SQLiteStore(":memory:")
await store.initialize()
try:
learner = Learner(
store=store,
evaluator=SimpleHeuristicEvaluator(),
)
experience = await learner.record(
task="Deploy web app",
action="Restart Nginx",
result="failed with config syntax error",
context={"attempt": 1},
)
assert experience.task == "Deploy web app"
assert experience.action == "Restart Nginx"
assert experience.result == "failed with config syntax error"
assert experience.context == {"attempt": 1}
persisted = await store.get_experience(experience.id)
assert persisted is not None
assert persisted.model_dump() == experience.model_dump()
await learner.flush()
memories = await store.search_memories(memory_type=MemoryType.LESSON)
assert len(memories) == 1
lesson_memory = memories[0]
assert lesson_memory.type is MemoryType.LESSON
assert lesson_memory.agent_role == "default"
assert lesson_memory.confidence == 0.6
assert lesson_memory.source == f"experience_{experience.id}"
assert "Restart Nginx" in lesson_memory.content
reinforced = await learner.reinforce(lesson_memory.id, success=True)
assert reinforced is not None
assert reinforced.reinforcement_count == 1
assert reinforced.success_count == 1
assert reinforced.confidence == 0.68
finally:
await store.close()
if __name__ == "__main__":
asyncio.run(main())
Run the same checked source with:
python examples/quickstart.py
Learner always requires both store and evaluator; the quickstart uses the
base-package SimpleHeuristicEvaluator. Network-backed calls are kept out of the offline quickstart. The installed
constructor examples below exercise each optional import without making network
requests; the API gate runs each script in an environment containing only its
declared extra.
- LLM evaluation, embeddings, and rules:
experia.experience.llm_evaluator.LLMEvaluator,experia.LiteLLMEmbedder, andexperia.improvement.rules.RuleGeneratorwithexperia[llm](example). - LangChain callbacks/retrieval:
experia.integrations.langchain.callbacks.ExperiaCallbackHandlerandexperia.integrations.langchain.retrievers.ExperiaLearningRetrieverwithexperia[langchain](example). - LangGraph nodes:
experia.integrations.langgraph.nodes.ExperiaContextNodeandexperia.integrations.langgraph.nodes.ExperiaLearningNodewithexperia[langgraph](example).
The exact example-to-extra mapping is machine-readable in
examples/installed-examples.json.
Project Status
Implemented today
Each implemented entry links to an executable example or automated executable test that exercises the installed behavior.
| Capability | Executable evidence |
|---|---|
Core experience → lesson → memory loop, SQLite persistence, background flush(), and confidence reinforcement |
offline quickstart · automated quickstart test |
| Pluggable embedder, semantic retrieval, keyword fallback, de-duplication, and expiry | learner scenarios · store scenarios |
| LLM evaluator, rule generation, and reflection | LLM/rule executable tests · reflection executable test |
| LangChain callback integration | end-to-end callback example/test |
| LangGraph context and learning nodes | node example/test |
Planned (unavailable in the current version)
The following roadmap items are not implemented in version 0.8.0 and are not
used by any quickstart. Existing placeholder imports fail explicitly with
UnavailableFeatureError rather than presenting an operational backend. Each
item's owner/team/unassigned status and readiness are tracked in the
machine-validated roadmap-ownership.yml manifest:
- AutoGen native integration (integration) — readiness
planned, ownershipunassigned; no importable placeholder yet. - CrewAI native integration (integration) — readiness
planned, ownershipunassigned; placeholderexperia.integrations.crewai.CrewAIIntegrationraisesUnavailableFeatureError. - Distributed production mode (Redis-backed queue + workers) (runtime) — readiness
planned, ownershipunassigned; no importable placeholder yet. - Mem0 memory adapter (adapter) — readiness
planned, ownershipunassigned; placeholderexperia.adapters.mem0.Mem0AdapterraisesUnavailableFeatureError. - OpenAI Agents native integration (integration) — readiness
planned, ownershipunassigned; no importable placeholder yet. - PostgreSQL +
pgvectorstore (adapter) — readinessplanned, ownershipunassigned; placeholderexperia.adapters.postgres.PostgresAdapterraisesUnavailableFeatureError. - Zep memory adapter (adapter) — readiness
planned, ownershipunassigned; placeholderexperia.adapters.zep.ZepAdapterraisesUnavailableFeatureError.
Contributions toward these are welcome — see CONTRIBUTING.md.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for experia 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| experia-0.8.1.tar.gz | 1.2 MB | With provenance | Details for experia-0.8.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| experia-0.8.1-py3-none-any.whl | Python 3 | none | any | Details for experia-0.8.1-py3-none-any.whl |
Total release size: 1.2 MB
Release files / experia-0.8.1.tar.gz
| Download URL | experia-0.8.1.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e479b1a85a2f72642614617409300354674d744482046e10aa1d5e60e5046e6d
|
|
BLAKE2b-256 checksum How to use checksums |
956d11ce9b268990e0eed00d3fe62f46c41793e4d1876c86e66acd6b0feda43c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / experia-0.8.1-py3-none-any.whl
| Download URL | experia-0.8.1-py3-none-any.whl |
|---|---|
| Size | 74.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86b0316d400c74e174c7d96253717a20d482f6d2d7cb1b9cf3f4d76fd6a6c74b
|
|
BLAKE2b-256 checksum How to use checksums |
8627407d1af3b8d8b9ad7e51bdb653932f1ea8a8639371b1f552b25c64e97d69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logSecurity for experia 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for experia-0.8.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.