No API key. No Docker. No Neo4j. No Microsoft 365. No Azure. Runs entirely on your Windows laptop.
What this platform includes:
- Governance Knowledge Layer — policies, standards, AI model approvals, GDPR rules, audit trail
- Product Knowledge Layer — user stories, architecture artifacts, product decisions, backlog
- Multi-Agent Process Layer — 10 agents orchestrated for meeting transcript events
- Focused Retrieval — agents receive only the relevant knowledge slice, not the full graph
- Targeted Update — REST X.0 → REST Y.0 candidate update without full re-ingestion
- Human Approval / Pull Requests — no knowledge becomes active without human sign-off
- Token Reduction — ~85–95% fewer tokens vs. traditional RAG (illustrative estimates)
- FastAPI Backend — 15 REST endpoints for Microsoft Copilot / Power Automate integration
- Microsoft 365 Stubs — Teams, SharePoint, Graph API integration path (safe stubs)
- Python 3.11 or 3.12 — download from python.org
- During install: tick "Add Python to PATH"
- Git (optional — or just unzip the project folder)
cd C:\path\to\aegis-knowledge-memory-poc
python -m venv venv
venv\Scripts\activate
You should see (venv) at the start of your prompt.
python -m pip install --upgrade pip
pip install -r requirements.txt
This installs: streamlit, fastapi, uvicorn, python-dotenv, pyyaml, jsonschema, httpx, pydantic, pytest, pytest-asyncio. All optional dependencies (anthropic, openai, neo4j, azure SDK) are commented out — uncomment as needed.
copy .env.example .env
Default config works for demo with no changes:
LLM_PROVIDER=mock— deterministic demo outputs, no API key neededNEO4J_ENABLED=false— JSON file storage, no Docker needed
To use Ollama (free local LLM) instead of mock — see Optional section below.
python src\main.py --stage ingest
Expected output: 7 documents ingested (6 .md + 1 .docx), ingestion manifest created.
Supported formats: .md, .txt, .docx (no library needed), .pdf (needs PyMuPDF for full text).
python src\main.py --stage extract
Expected output: extracted_claims.json, extracted_decisions.json, extracted_entities.json created in data\processed\.
python src\main.py --stage conflicts
Expected output: 5 conflicts detected — includes 2 canonical demo conflicts:
CONF-2025-GDPR-001(HIGH) — AWS S3 us-east-1 vs GDPR EU data residencyCONF-2025-MQ-002(MEDIUM) — REST push superseded by IBM MQ pull-based
python src\main.py --stage validate
Expected output: ~13 items queued — claims, decisions, and conflicts.
python src\main.py --stage artifacts
Expected output: ART-ADR-001.md and ART-ARCHSUM-001.md saved to data\processed\artifacts\.
streamlit run app\streamlit_app.py
Browser opens at: http://localhost:8501
You should see 8 tabs across the top:
| Tab | What it shows |
|---|---|
| 🔍 Validation Queue | Pending claims and decisions — approve / reject / escalate |
| ⚡ Conflict Registry | Detected contradictions, severity rated, grouped |
| ✅ Approved Knowledge | Validated items + Ask the Knowledge Base (LLM-powered) |
| 🔄 Pipeline Status | Stage results, LLM provider, Neo4j status |
| 🕸️ Knowledge Graph | Live interactive graph — documents, claims, entities, conflicts |
| 📤 Upload | Upload files or paste a folder path — runs full pipeline automatically |
| 🔗 M365 Integration | Future enterprise integration design (no credentials required for demo) |
| ⚙️ Product Process Layer | Two-layer demo: focused retrieval, REST X.0 → Y.0, agent simulation, PRs |
- In the browser, click ⚙️ Product Process Layer
- Click Simulate Event sub-tab
- Click Simulate Meeting Event
- Watch topic detection, focused retrieval (1 of 9 rules), and candidate update creation
- Click Approve in the Human Validation section
- Check Governance Updates and Pull Requests sub-tabs
- Click Token Reduction sub-tab to see the comparison
To reset the demo to its initial state, click Reset Demo Data in the Simulate Event sub-tab.
uvicorn src.api:app --reload --port 8000
Docs at: http://localhost:8000/docs
Key endpoints:
GET /health— health checkGET /api/status— platform status, LLM provider, M365 enabledPOST /api/events/meeting-transcript— full multi-agent eventGET /api/knowledge/context?topic=REST+API+standard— focused retrievalPOST /api/governance/check— governance check for an artifactGET /api/token-estimate— RAG vs. AEGIS token comparison
python -m pytest tests\ -v
Expected: 152 tests pass — no API key or Docker required.
Tests cover: chunking, extraction, conflict detection, focused retrieval, targeted update, agents (all 10), orchestrator, FastAPI endpoints, M365 stubs, token estimator, demo hardening.
After approving at least one item in the Validation Queue:
- Click ✅ Approved Knowledge
- Scroll down to Ask the Knowledge Base
- Click a suggested question or type your own
- Click Ask
The LLM answers using only the human-approved claims and decisions — not raw documents. Every point is cited back to a specific claim or decision ID.
In mock mode the answer uses approved knowledge structure. For real language model answers, set up Ollama (see below) — free, runs locally.
- Click 📤 Upload
- Either:
- Drag and drop
.md,.txt,.docx, or.pdffiles onto the uploader, or - Paste an absolute folder path (e.g.
C:\Users\you\Documents\ArchitectureDocs) and click Scan
- Drag and drop
- Click Process & Add to Queue
AEGIS will ingest, extract claims and decisions, detect conflicts, and add everything to the Validation Queue automatically. No size limit (up to 1 GB per file).
To connect to a real Microsoft 365 tenant:
- Register an app in Azure Portal → Entra ID → App registrations
- Grant API permissions:
Sites.Read.All,Files.Read.All,User.Read.All,OnlineMeetings.Read.All - Create a client secret under Certificates & secrets
- Add to
.env:AZURE_TENANT_ID=your-tenant-id AZURE_CLIENT_ID=your-app-client-id AZURE_CLIENT_SECRET=your-secret-value - Restart the dashboard and click 🔗 M365 Integration
- Click Test Connection — AEGIS will verify the credentials against the Graph API
- Browse SharePoint sites, select files, click Fetch & Ingest
No M365 access is needed for the local demo. The M365 tab also shows the full integration architecture design when not connected.
Ollama runs a language model on your laptop. No cloud, no cost.
rem Download from https://ollama.com/download and install
ollama pull llama3.2:latest
ollama serve
In .env, change:
LLM_PROVIDER=ollama
OLLAMA_MODEL=llama3.2:latest
Restart the dashboard. The Ask feature will now use llama3.2 running locally.
The Pipeline Status tab will show: Ollama (llama3.2:latest) — local, free, no API key.
To re-extract claims and decisions with the real model:
python src\main.py --stage extract
python src\main.py --stage conflicts
python src\main.py --stage validate
AWS Bedrock lets you call Claude models using your existing AWS credentials — no Anthropic API key needed.
One-time setup in AWS Console:
- Go to AWS Console → Amazon Bedrock → Model access
- Click Manage model access → Request access for "Anthropic Claude 3.5 Sonnet v2"
- Access is granted within minutes (no extra cost until you use it)
Install boto3:
pip install boto3
Configure credentials (choose one method):
Option A — environment variables (easiest for demos):
set AWS_ACCESS_KEY_ID=AKIA...
set AWS_SECRET_ACCESS_KEY=your-secret-key
set AWS_DEFAULT_REGION=us-east-1
Option B — AWS CLI (persists across sessions):
aws configure
Set the provider in .env:
LLM_PROVIDER=bedrock
BEDROCK_AWS_REGION=us-east-1
BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0
Re-run the pipeline with the real model:
python src\main.py --stage extract
python src\main.py --stage conflicts
python src\main.py --stage artifacts
The dashboard will show: AWS Bedrock (anthropic.claude-3-5-sonnet-20241022-v2:0 / us-east-1) in the Pipeline Status tab.
If credentials are missing or the call fails, AEGIS automatically falls back to mock mode — the demo keeps running.
set LLM_PROVIDER=anthropic
set ANTHROPIC_API_KEY=sk-ant-your-key-here
python src\main.py --stage extract
python src\main.py --stage conflicts
python src\main.py --stage artifacts
Install Docker Desktop from docker.com, then:
docker-compose up neo4j -d
In .env, set:
NEO4J_ENABLED=true
GRAPH_BACKEND=neo4j
Neo4j Browser: http://localhost:7474
User: neo4j | Password: password
pip install fastapi uvicorn
uvicorn src.api:app --reload --port 8000
API docs: http://localhost:8000/docs
Key endpoints:
POST /knowledge/ask— ask a natural language question, get a cited answerGET /knowledge/search?q=...— keyword search across approved knowledgeGET /conflicts— list detected conflictsGET /knowledge/approved— list all approved claims and decisions
For Copilot Studio demo:
ngrok http 8000
See docs\MICROSOFT_365_COPILOT_INTEGRATION.md for the full Copilot Studio setup.
| Error | Fix |
|---|---|
python not found |
Re-install Python and tick "Add Python to PATH" |
venv\Scripts\activate fails |
Run Set-ExecutionPolicy RemoteSigned in PowerShell as admin |
| Port 8501 in use | streamlit run app\streamlit_app.py --server.port 8502 |
| Neo4j connection error | Leave NEO4J_ENABLED=false — not needed for demo |
| Validation queue has 0 items | Run --stage conflicts first, then --stage validate |
| Anthropic import error | Anthropic is optional — leave LLM_PROVIDER=mock in .env |
| Port 8000 in use | Change API_PORT=8001 in .env and use --port 8001 |
.docx shows 0 words |
File may be password-protected or corrupted — try a different file |
| Ollama not responding | Run ollama serve in a separate Command Prompt, keep it open |
| Upload shows no results | Check the file has readable text content — scanned PDFs need OCR |
| M365 connection error 401 | Client secret may have expired — generate a new one in Azure Portal |
| Knowledge Graph shows no edges | Run --stage ingest and --stage extract first to populate data |