Fix model card: proper library metadata, add CLI docs, add Gradio demo
Browse files
README.md
CHANGED
|
@@ -1,10 +1,23 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
---
|
| 10 |
|
|
@@ -14,6 +27,14 @@ No server. No subscription. No data leaves your machine.
|
|
| 14 |
pip install stackme
|
| 15 |
```
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
## Quick Start
|
| 18 |
|
| 19 |
```python
|
|
@@ -26,13 +47,19 @@ ctx.add_fact("I run a fintech B2B SaaS, launched March 2024")
|
|
| 26 |
ctx.add_fact("Q3 goal: 10K paying customers")
|
| 27 |
ctx.add_fact("Users are 25-40, income $50-100K")
|
| 28 |
|
|
|
|
|
|
|
|
|
|
| 29 |
# Ask any AI β Stackme retrieves your context first
|
| 30 |
context = ctx.get_relevant("What pricing should we use?")
|
| 31 |
-
# β "I run a fintech B2B SaaS...
|
| 32 |
|
| 33 |
# Your AI gets the full picture every time.
|
|
|
|
| 34 |
```
|
| 35 |
|
|
|
|
|
|
|
| 36 |
## How It Works
|
| 37 |
|
| 38 |
```
|
|
@@ -41,22 +68,19 @@ You: "What pricing should we use?"
|
|
| 41 |
Stackme retrieves:
|
| 42 |
- I run a fintech B2B SaaS
|
| 43 |
- Q3 goal: 10K paying customers
|
| 44 |
-
- Users
|
| 45 |
-
|
| 46 |
-
Enriched prompt sent to ChatGPT:
|
| 47 |
-
"Context: I run a fintech B2B SaaS...
|
| 48 |
-
Q3 goal: 10K customers...
|
| 49 |
-
User: What pricing should we use?"
|
| 50 |
|
| 51 |
-
ChatGPT
|
| 52 |
```
|
| 53 |
|
|
|
|
|
|
|
| 54 |
## Architecture
|
| 55 |
|
| 56 |
```
|
| 57 |
~/.stackme/
|
| 58 |
-
βββ memory.sqlite β all memories
|
| 59 |
-
βββ vectors.faiss
|
| 60 |
βββ facts.graph β structured knowledge graph
|
| 61 |
```
|
| 62 |
|
|
@@ -65,34 +89,91 @@ ChatGPT responds with full context awareness.
|
|
| 65 |
- **Long-Term Memory** β permanent, SQLite + vector search
|
| 66 |
- **Knowledge Graph** β structured facts, extracted from your prompts
|
| 67 |
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
-
|
|
|
|
| 71 |
|
| 72 |
-
|
|
|
|
| 73 |
|
| 74 |
-
#
|
|
|
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
| Your data | Lost after the session | Stored permanently, locally |
|
| 82 |
|
| 83 |
-
##
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
## Privacy
|
| 93 |
|
| 94 |
Everything stays on your machine. Your memories are yours. We never see, store, or transmit your data. No account required.
|
| 95 |
|
|
|
|
|
|
|
| 96 |
## License
|
| 97 |
|
| 98 |
Apache 2.0 β free for commercial and personal use.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: stackme
|
| 4 |
+
tags:
|
| 5 |
+
- memory
|
| 6 |
+
- context
|
| 7 |
+
- llm
|
| 8 |
+
- rag
|
| 9 |
+
- agentic
|
| 10 |
+
- local-ai
|
| 11 |
+
- open-source
|
| 12 |
+
---
|
| 13 |
|
| 14 |
+
# π§ Stackme
|
| 15 |
|
| 16 |
+
**The context layer for every AI.**
|
| 17 |
|
| 18 |
+
Stackme is a free, open-source memory layer for AI. It stores what matters about you, retrieves relevant context before every query, and injects it into any AI β ChatGPT, Claude, Copilot, Gemini, Ollama, or any AI via API.
|
| 19 |
+
|
| 20 |
+
**No server. No subscription. No data leaves your machine.**
|
| 21 |
|
| 22 |
---
|
| 23 |
|
|
|
|
| 27 |
pip install stackme
|
| 28 |
```
|
| 29 |
|
| 30 |
+
Or install from source:
|
| 31 |
+
|
| 32 |
+
```bash
|
| 33 |
+
pip install git+https://github.com/my-ai-stack/stackme
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
## Quick Start
|
| 39 |
|
| 40 |
```python
|
|
|
|
| 47 |
ctx.add_fact("Q3 goal: 10K paying customers")
|
| 48 |
ctx.add_fact("Users are 25-40, income $50-100K")
|
| 49 |
|
| 50 |
+
# Add a user message β facts are auto-extracted
|
| 51 |
+
ctx.add_user_message("I'm building a B2B SaaS, targeting fintech companies")
|
| 52 |
+
|
| 53 |
# Ask any AI β Stackme retrieves your context first
|
| 54 |
context = ctx.get_relevant("What pricing should we use?")
|
| 55 |
+
# β "## Facts\n- I run a fintech B2B SaaS...\n- Q3 goal: 10K paying customers..."
|
| 56 |
|
| 57 |
# Your AI gets the full picture every time.
|
| 58 |
+
print(context)
|
| 59 |
```
|
| 60 |
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
## How It Works
|
| 64 |
|
| 65 |
```
|
|
|
|
| 68 |
Stackme retrieves:
|
| 69 |
- I run a fintech B2B SaaS
|
| 70 |
- Q3 goal: 10K paying customers
|
| 71 |
+
- Users are 25-40, income $50-100K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
+
Enriched prompt β ChatGPT / Claude / any AI
|
| 74 |
```
|
| 75 |
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
## Architecture
|
| 79 |
|
| 80 |
```
|
| 81 |
~/.stackme/
|
| 82 |
+
βββ memory.sqlite β all memories
|
| 83 |
+
βββ vectors.faiss β semantic index
|
| 84 |
βββ facts.graph β structured knowledge graph
|
| 85 |
```
|
| 86 |
|
|
|
|
| 89 |
- **Long-Term Memory** β permanent, SQLite + vector search
|
| 90 |
- **Knowledge Graph** β structured facts, extracted from your prompts
|
| 91 |
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
## CLI
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
# Add facts
|
| 98 |
+
stackme add-fact "I run a fintech startup"
|
| 99 |
+
stackme add "I'm building a B2B SaaS" # also auto-extracts facts
|
| 100 |
+
|
| 101 |
+
# Retrieve context
|
| 102 |
+
stackme get "what pricing?"
|
| 103 |
+
|
| 104 |
+
# Search all memories
|
| 105 |
+
stackme search "fintech"
|
| 106 |
+
|
| 107 |
+
# List all facts
|
| 108 |
+
stackme facts
|
| 109 |
|
| 110 |
+
# Knowledge graph
|
| 111 |
+
stackme graph
|
| 112 |
|
| 113 |
+
# Session history
|
| 114 |
+
stackme history --last 10
|
| 115 |
|
| 116 |
+
# Export all data
|
| 117 |
+
stackme export
|
| 118 |
|
| 119 |
+
# Stats
|
| 120 |
+
stackme count
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
---
|
|
|
|
| 124 |
|
| 125 |
+
## API Reference
|
| 126 |
|
| 127 |
+
### `Context`
|
| 128 |
+
|
| 129 |
+
Main class. All data stored locally in `~/.stackme/`.
|
| 130 |
+
|
| 131 |
+
```python
|
| 132 |
+
ctx = Context(user_id="default") # multi-user support
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
### Adding Memories
|
| 136 |
+
|
| 137 |
+
```python
|
| 138 |
+
ctx.add_fact("I run a fintech startup") # structured fact
|
| 139 |
+
ctx.add_prompt("User asked about pricing") # user prompt
|
| 140 |
+
ctx.add_context("AI responded with...") # AI response
|
| 141 |
+
ctx.add_user_message("I'm building a B2B SaaS") # both + auto-extract
|
| 142 |
+
ctx.add_ai_message("Here's my recommendation...")
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
### Retrieving
|
| 146 |
+
|
| 147 |
+
```python
|
| 148 |
+
ctx.get_relevant("pricing strategy?", top_k=5) # β formatted string
|
| 149 |
+
ctx.search("fintech", top_k=10) # β list of strings
|
| 150 |
+
ctx.get_facts() # β all facts
|
| 151 |
+
ctx.get_graph(subject="User") # β GraphFact list
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
### Session
|
| 155 |
+
|
| 156 |
+
```python
|
| 157 |
+
ctx.get_session_history(last_n=20) # in-memory conversation
|
| 158 |
+
ctx.clear_session() # wipe session only
|
| 159 |
+
```
|
| 160 |
+
|
| 161 |
+
### Utilities
|
| 162 |
+
|
| 163 |
+
```python
|
| 164 |
+
ctx.export() # full JSON backup
|
| 165 |
+
ctx.count() # total items
|
| 166 |
+
ctx.clear_all() # β οΈ wipe everything
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
---
|
| 170 |
|
| 171 |
## Privacy
|
| 172 |
|
| 173 |
Everything stays on your machine. Your memories are yours. We never see, store, or transmit your data. No account required.
|
| 174 |
|
| 175 |
+
---
|
| 176 |
+
|
| 177 |
## License
|
| 178 |
|
| 179 |
Apache 2.0 β free for commercial and personal use.
|