Observed since 20 Oct, 20:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
aema
Adaptive Experience Memory Agent — reliability-aware experiential memory with trust scoring.
GenAI OJT Capstone Project — Group G146
Adaptive AI Agent with Persistent Experience Memory is an Agentic AI project exploring how an AI agent can retain, evaluate, and reuse operational problem-solving experience across repeated task executions.
While foundational Large Language Models (LLMs) solve individual tasks with high proficiency, multi-step agentic workflows reveal two critical vulnerabilities:
Our architecture solves this externally without fine-tuning or modifying base LLM weights. We introduce an external experience-memory intelligence layer that distills generalizable lessons ({Trigger, Strategy, Pitfall}), verifies empirical reliability using an evidence-based Trust Score ($S \in [0.0, 1.0]$), and dynamically augments prompts with verified strategies and negative constraints.
Under what conditions does persistent experience memory improve future task performance, and can reliability-aware memory selection reduce the harm caused by misleading or outdated experiences?
The agent operates across a closed-loop cognitive lifecycle:
Task Input
↓
Retrieve Relevant Experiences (Composite Ranking: 0.70*Similarity + 0.30*Trust)
↓
Execute Task (Prompt augmented with positive Strategy + negative Pitfall)
↓
Evaluate Outcome (Deterministic scalar reward R ∈ [0.0, 1.0])
↓
Reflect & Extract Lesson (Structured 3-tuple: {Trigger, Strategy, Pitfall})
↓
Update Trust Score (Exponential Moving Average & Quarantine if S < 0.35)
↓
Persist to Vector Store (Supabase PostgreSQL + pgvector HNSW index)
↓
Reuse in Future Tasks
The system learns continuously from task execution without altering the underlying LLM. In this cognitive loop, experiences are not only retrieved based on semantic relevance; their empirical reliability is continuously scored and updated based on observed usefulness over time.
Standard RAG architectures retrieve static document passages for factual question answering. However, autonomous agents require Experience-RAG: remembering how to solve problems, which tools to invoke, and what mistakes to avoid.
Key design principles:
We analyzed prior agent memory architectures to ground our research methodology:
Our architecture directly addresses the limitation identified in ExpeL by establishing an evidence-grounded Trust Score ($S$) and bilateral prompt augmentation (positive strategies + negative pitfalls).
ThreeMemoryCore.tsx) rendering memory nodes clustered by domain and color-coded by trust score ($S \ge 0.70$ emerald, $0.35 \le S < 0.70$ amber, $S < 0.35$ crimson).research, coding, reasoning, and general domains./dashboard)/api/v1/health and /health endpoints with automated pytest verification.React 18 Dashboard ──(HTTP / Bearer JWT)──► FastAPI Gateway (/api/v1)
│
▼
LangGraph StateGraph
┌────────────┴────────────┐
▼ ▼
LiteLLM Gateway Experience Engine
(Groq / Gemini / Ollama) (PostgreSQL 15 + pgvector)
│ │
▼ ▼
External Tools HNSW Vector Index
(DuckDuckGo / Reader) (Composite Retrieval RPC)
Evaluation and observability operate across the execution pipeline via LangSmith and immutable PostgreSQL audit ledgers (trust_history).
| Layer | Technologies |
|---|---|
| Frontend / Client | React 18, Vite, TypeScript, Tailwind CSS, Three.js, Lucide Icons |
| Authentication | Supabase Auth (GoTrue), JWT, Session Persistence |
| Backend API Gateway | Python 3.9+, FastAPI, Uvicorn, Pydantic v2 |
| Agent Orchestration | LangGraph, LangChain Core (5-Node StateGraph Engine) |
| Model Gateway (BYOK) | LiteLLM (Groq Llama-3.3, Google Gemini Flash, Local Ollama) |
| Database & Vector Store | PostgreSQL 15 (Supabase), pgvector (HNSW Indexing) |
| Telemetry & Observability | LangSmith Distributed Tracing, PostgreSQL Audit Tables, Loguru |
| Testing & CI/CD | pytest, pytest-asyncio, HTTPX, GitHub Actions |
git clone https://github.com/Sumit-ai-dev/Adaptive-Agent-Memory-OJT-G146.git
cd Adaptive-Agent-Memory-OJT-G146
Navigate to the frontend directory and install dependencies:
cd frontend
npm install
Configure environment variables:
cp .env.example .env
Edit .env with your Supabase credentials (or use the built-in mock fallback for instant offline preview):
VITE_SUPABASE_URL=https://your-project-ref.supabase.co
VITE_SUPABASE_ANON_KEY=your-supabase-publishable-key
VITE_API_URL=http://localhost:8000
VITE_ENABLE_MOCK_FALLBACK=true
Launch the development server:
npm run dev
Open http://localhost:5173 in your browser.
Verify type-checking and production build:
npx tsc --noEmit
npm run build
In a separate terminal, navigate to the backend directory:
cd backend
(Recommended) Create and activate a Python virtual environment:
python3 -m venv venv
source venv/bin/activate
Install backend dependencies:
pip install -r requirements.txt
Start the FastAPI development server:
uvicorn app.main:app --reload --port 8000
Interactive API documentation (Swagger UI) is available at http://localhost:8000/docs.
From the repository root (return to root if currently in backend/):
# Return to the repository root if you are in the backend directory
cd ..
# Run the automated pytest suite:
python3 -m pytest tests/test_health.py -v
Expected output:
tests/test_health.py::test_health_check_api_v1 PASSED
tests/test_health.py::test_health_check_root_alias PASSED
tests/test_health.py::test_root_endpoint PASSED
============================== 3 passed in 0.22s ===============================
This project is licensed under the MIT License — see the LICENSE file for details.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
clickEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | click>=8.1.0 | runtime |
ddgsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | ddgs>=9.0.0 | runtime |
duckduckgo-searchEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | duckduckgo-search>=8.0.0 | runtime |
fastapiEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | fastapi>=0.115.0 | runtime |
httpxEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | httpx>=0.27.0 | runtime |
langgraphEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | langgraph>=0.2.0 | runtime |
numpyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | numpy>=1.26.0 | runtime |
openaiEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | openai>=1.40.0 | runtime |
pydantic-settingsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pydantic-settings>=2.5.0 | runtime |
pydanticEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pydantic>=2.10.0 | runtime |
python-dotenvEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | python-dotenv>=1.0.0 | runtime |
richEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | rich>=13.0.0 | runtime |
scipyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | scipy>=1.11.0 | runtime |
sentence-transformersEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | sentence-transformers>=3.0.0 | runtime |
typing-extensionsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | typing-extensions>=4.12.0 | runtime |
uvicornEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | uvicorn>=0.30.0 | runtime |
mypyEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | mypy>=1.0; extra == "dev" | runtime |
pre-commitEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pre-commit>=3.0; extra == "dev" | runtime |
pytest-asyncioEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pytest-asyncio>=0.24.0; extra == "dev" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pytest>=8.0.0; extra == "dev" | runtime |
ruffEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | ruff>=0.1.0; extra == "dev" | runtime |
bdist_wheel · 21.13 KB · Python py3
sdist · 18.26 KB · Python source
Shared repository data · GitHub
Observed since 20 Oct, 20:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:48c8abb04147cc4bf0501ae1531cf0c325f0311d288664073bdf58bcd3357d16