Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sample-apps/cognitive-consistency/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEEPSEEK_API_KEY=your_key_here
20 changes: 20 additions & 0 deletions sample-apps/cognitive-consistency/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info

# Virtual environments
.venv/

# Secrets
.env

# Data files (auto-generated)
data/memory.db
data/chroma/

# Node
node_modules/
1 change: 1 addition & 0 deletions sample-apps/cognitive-consistency/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
59 changes: 59 additions & 0 deletions sample-apps/cognitive-consistency/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Shared Agent Memory MCP Server

A MCP server that gives AI agents persistent, shared memory. When Agent A researches something, Agent B can recall that decision without repeating work.

## Project Structure

```
├── nitrostack-server/ # Deployable MCP server (TypeScript / NitroStack)
│ ├── src/
│ │ ├── index.ts
│ │ ├── app.module.ts
│ │ └── modules/memory/
│ │ ├── memory.tools.ts # 7 MCP tools
│ │ ├── memory.service.ts # Business logic
│ │ └── sqlite.service.ts # SQLite storage
│ ├── test.ts
│ ├── package.json
│ └── tsconfig.json
└── python-prototype/ # Original Python prototype + dashboard
├── backend/ # Python MCP server
├── agents/ # Demo agents (research, coding, testing)
└── dashboard/ # React timeline UI
```

## MCP Tools

| Tool | Description |
|------|-------------|
| `remember` | Store a memory (fact, decision, event, or result) |
| `recall` | Search memories by keyword |
| `get_task_memory` | Get all memories for a task, grouped by type |
| `get_decisions` | Get decisions for a project/task |
| `get_agent_history` | Get everything an agent has done |
| `store_result` | Store the final output of a completed task |
| `handoff_task` | Record agent-to-agent handoff |

## Quick Start (NitroStack Server)

```bash
cd nitrostack-server
npm install
npm run dev
```

## Testing

```bash
cd nitrostack-server
npx tsx test.ts
```

## Deployment

```bash
cd nitrostack-server
npx tsc
node dist/index.js
```
36 changes: 36 additions & 0 deletions sample-apps/cognitive-consistency/nitrostack-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
node_modules/
dist/
data/
.env

# Added by nitrostack pack
src/widgets/node_modules/
src/widgets/.next/
src/widgets/out/
.env.local
.env.*.local
.idea/
.vscode/
*.swp
*.swo
*~
.DS_Store
Thumbs.db
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pids/
*.pid
*.seed
*.pid.lock
coverage/
.nyc_output/
uploads/
*.tsbuildinfo
.npm/
.eslintcache
*.pem
*.key
tokens.json
.git/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
Empty file.
6 changes: 6 additions & 0 deletions sample-apps/cognitive-consistency/nitrostack-server/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def main():
print("Hello from nitrostack-server!")


if __name__ == "__main__":
main()
Loading