Welly-code commited on
Commit
79482f4
Β·
verified Β·
1 Parent(s): 40f8d6e

Fix model card: proper library metadata, add CLI docs, add Gradio demo

Browse files
Files changed (1) hide show
  1. README.md +112 -31
README.md CHANGED
@@ -1,10 +1,23 @@
1
- # Stackme
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- **Your context brain for every AI.**
4
 
5
- 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, anyone.
6
 
7
- No server. No subscription. No data leaves your machine.
 
 
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... | Q3 goal: 10K customers..."
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: 25-40, $50-100K income
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 responds with full context awareness.
52
  ```
53
 
 
 
54
  ## Architecture
55
 
56
  ```
57
  ~/.stackme/
58
- β”œβ”€β”€ memory.sqlite ← all memories, encrypted
59
- β”œβ”€β”€ vectors.faiss ← semantic index
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
- ## Chrome Extension
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
- The Stackme Chrome Extension intercepts your prompts on ChatGPT, Claude, and Copilot β€” injects your context automatically.
 
71
 
72
- Install: [Chrome Web Store] (coming soon)
 
73
 
74
- ## Why Stackme?
 
75
 
76
- | | Without Stackme | With Stackme |
77
- |---|---|---|
78
- | First query | AI knows nothing about you | AI knows your full context |
79
- | Repeat queries | Start from zero every time | Context compounds automatically |
80
- | Team context | Siloed in each conversation | Shared memory across team |
81
- | Your data | Lost after the session | Stored permanently, locally |
82
 
83
- ## Supported AI Platforms
84
 
85
- - ChatGPT (chat.openai.com)
86
- - Claude (claude.ai)
87
- - Copilot (copilot.microsoft.com)
88
- - Gemini (gemini.google.com)
89
- - Ollama (local)
90
- - Any AI via API
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.