flowscript-agents 0.2.1__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flowscript_agents-0.2.3/.github/workflows/test.yml +86 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/PKG-INFO +89 -7
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/README.md +87 -5
- flowscript_agents-0.2.3/docs/brand/logo-512.png +0 -0
- flowscript_agents-0.2.3/docs/brand/social-preview.png +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/examples/CLAUDE.md.example +2 -1
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/__init__.py +1 -1
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/mcp.py +16 -5
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/pyproject.toml +2 -2
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/.gitignore +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/AUDIT_TRAIL_DESIGN.md +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/docs/adapters.md +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/docs/api-reference.md +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/docs/audit-trail.md +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/docs/flowscript-demo.png +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/docs/lifecycle.md +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/examples/langgraph_live_test.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/examples/temporal_e2e_test.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/audit.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/camel_ai.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/crewai.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/__init__.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/_utils.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/consolidate.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/extract.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/index.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/providers.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/search.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/google_adk.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/haystack.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/langgraph.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/llamaindex.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/memory.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/openai_agents.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/pydantic_ai.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/query.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/smolagents.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/types.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/unified.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/scripts/validate_dedup_threshold.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/conftest.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_audit.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_camel_ai.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_consolidation.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_crewai.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_embeddings.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_google_adk.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_haystack.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_langgraph.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_llamaindex.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_mcp.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_memory.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_openai_agents.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_pydantic_ai.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_smolagents.py +0 -0
- {flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/tests/test_temporal.py +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test-core:
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, windows-latest]
|
|
15
|
+
python-version: ['3.11', '3.12']
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
pip install -e ".[dev]"
|
|
26
|
+
|
|
27
|
+
- name: Run core tests
|
|
28
|
+
run: |
|
|
29
|
+
pytest tests/test_memory.py tests/test_audit.py tests/test_consolidation.py tests/test_embeddings.py tests/test_mcp.py -v --tb=short
|
|
30
|
+
|
|
31
|
+
test-mcp-smoke:
|
|
32
|
+
strategy:
|
|
33
|
+
matrix:
|
|
34
|
+
os: [ubuntu-latest, windows-latest]
|
|
35
|
+
runs-on: ${{ matrix.os }}
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- uses: actions/setup-python@v5
|
|
39
|
+
with:
|
|
40
|
+
python-version: '3.11'
|
|
41
|
+
|
|
42
|
+
- name: Install from PyPI (simulates real user)
|
|
43
|
+
run: pip install flowscript-agents
|
|
44
|
+
|
|
45
|
+
- name: Verify import
|
|
46
|
+
run: python -c "from flowscript_agents import Memory, UnifiedMemory; print('Import OK')"
|
|
47
|
+
|
|
48
|
+
- name: MCP server stdio handshake
|
|
49
|
+
shell: python
|
|
50
|
+
run: |
|
|
51
|
+
import subprocess, json, sys, time
|
|
52
|
+
|
|
53
|
+
proc = subprocess.Popen(
|
|
54
|
+
[sys.executable, '-m', 'flowscript_agents.mcp', '--memory', './test-memory.json'],
|
|
55
|
+
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
|
56
|
+
text=True
|
|
57
|
+
)
|
|
58
|
+
time.sleep(2)
|
|
59
|
+
|
|
60
|
+
# Send initialize
|
|
61
|
+
msg = json.dumps({
|
|
62
|
+
'jsonrpc': '2.0', 'id': 1, 'method': 'initialize',
|
|
63
|
+
'params': {
|
|
64
|
+
'protocolVersion': '2025-03-26',
|
|
65
|
+
'capabilities': {},
|
|
66
|
+
'clientInfo': {'name': 'ci-test', 'version': '1.0'}
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
proc.stdin.write(msg + '\n')
|
|
70
|
+
proc.stdin.flush()
|
|
71
|
+
time.sleep(1)
|
|
72
|
+
|
|
73
|
+
response = proc.stdout.readline()
|
|
74
|
+
assert response, 'No response from MCP server'
|
|
75
|
+
data = json.loads(response)
|
|
76
|
+
assert 'result' in data, f'Bad response: {data}'
|
|
77
|
+
|
|
78
|
+
info = data['result'].get('serverInfo', {})
|
|
79
|
+
print(f"MCP server OK: {info.get('name')} v{info.get('version')}")
|
|
80
|
+
|
|
81
|
+
tools_count = len(data['result'].get('capabilities', {}).get('tools', {}))
|
|
82
|
+
print(f"Platform: {sys.platform}")
|
|
83
|
+
print(f"Python: {sys.version}")
|
|
84
|
+
|
|
85
|
+
proc.terminate()
|
|
86
|
+
print('PASS: MCP stdio handshake works')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flowscript-agents
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: Complete agent memory: reasoning queries + vector search + auto-extraction. Decision intelligence for LangGraph, CrewAI, Google ADK, OpenAI Agents SDK, Pydantic AI, smolagents, LlamaIndex, Haystack, CAMEL-AI
|
|
3
|
+
Version: 0.2.3
|
|
4
|
+
Summary: Complete agent memory: reasoning queries + vector search + auto-extraction. Decision intelligence for LangGraph, CrewAI, Google ADK, OpenAI Agents SDK, Pydantic AI, smolagents, LlamaIndex, Haystack, and CAMEL-AI.
|
|
5
5
|
Project-URL: Homepage, https://flowscript.org
|
|
6
6
|
Project-URL: Repository, https://github.com/phillipclapham/flowscript-agents
|
|
7
7
|
Project-URL: Issues, https://github.com/phillipclapham/flowscript-agents/issues
|
|
@@ -62,9 +62,13 @@ Provides-Extra: smolagents
|
|
|
62
62
|
Requires-Dist: smolagents>=1.0.0; extra == 'smolagents'
|
|
63
63
|
Description-Content-Type: text/markdown
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
<p align="center">
|
|
66
|
+
<img src="docs/brand/logo-512.png" alt="FlowScript" width="120" />
|
|
67
|
+
</p>
|
|
68
|
+
|
|
69
|
+
<h1 align="center">flowscript-agents</h1>
|
|
66
70
|
|
|
67
|
-
|
|
71
|
+
<p align="center"><strong>Agent memory that tracks why you decided, what conflicts, and what's blocked. Not just what was said.</strong></p>
|
|
68
72
|
|
|
69
73
|
[](https://github.com/phillipclapham/flowscript-agents) [](https://pypi.org/project/flowscript-agents/) [](LICENSE) [](https://pypi.org/project/flowscript-agents/)
|
|
70
74
|
|
|
@@ -107,14 +111,51 @@ Five queries that no vector store can answer — `why()`, `tensions()`, `blocked
|
|
|
107
111
|
|
|
108
112
|
---
|
|
109
113
|
|
|
114
|
+
## Why FlowScript
|
|
115
|
+
|
|
116
|
+
Agent memory stores what happened. FlowScript stores why.
|
|
117
|
+
|
|
118
|
+
Most agent infrastructure is converging on authorization — identity, access control, audit trails for *who did what*. That's necessary. But it leaves a gap: your agent can prove it was *allowed* to make a decision, but not *why* it made it. Researchers call this "[strategic blindness](https://arxiv.org/abs/2603.18718)" — memory that tracks content without tracking reasoning.
|
|
119
|
+
|
|
120
|
+
FlowScript sits above your memory store, not instead of it. Google Memory Bank, LangGraph checkpointers, Mem0 — they remember what your agent stored. FlowScript remembers why it decided, what it traded off, and what breaks if you change your mind.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
110
124
|
## Get Started
|
|
111
125
|
|
|
112
126
|
### MCP Server (Claude Code / Cursor — zero code)
|
|
113
127
|
|
|
128
|
+
```bash
|
|
129
|
+
pip install flowscript-agents openai
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The `openai` package is required for extraction, consolidation, and vector search. Without it, `add_memory` stores raw text and `query_tensions` won't find anything.
|
|
133
|
+
|
|
134
|
+
Add to your editor's MCP config:
|
|
135
|
+
|
|
136
|
+
**Claude Code** — add to `.claude/settings.json` in your project (or `~/.claude/settings.json` for global):
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"mcpServers": {
|
|
141
|
+
"flowscript": {
|
|
142
|
+
"command": "flowscript-mcp",
|
|
143
|
+
"args": ["--memory", "./project-memory.json"],
|
|
144
|
+
"env": {
|
|
145
|
+
"OPENAI_API_KEY": "your-key"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Cursor / Windsurf / VS Code** — add to `.mcp.json` in your project root:
|
|
153
|
+
|
|
114
154
|
```json
|
|
115
155
|
{
|
|
116
156
|
"mcpServers": {
|
|
117
157
|
"flowscript": {
|
|
158
|
+
"type": "stdio",
|
|
118
159
|
"command": "flowscript-mcp",
|
|
119
160
|
"args": ["--memory", "./project-memory.json"],
|
|
120
161
|
"env": {
|
|
@@ -125,11 +166,52 @@ Five queries that no vector store can answer — `why()`, `tensions()`, `blocked
|
|
|
125
166
|
}
|
|
126
167
|
```
|
|
127
168
|
|
|
169
|
+
**Fallback:** If `env` passthrough doesn't work in your editor, export the key in your shell before launching:
|
|
128
170
|
```bash
|
|
129
|
-
|
|
171
|
+
export OPENAI_API_KEY=your-key
|
|
130
172
|
```
|
|
131
173
|
|
|
132
|
-
|
|
174
|
+
The server auto-detects your API key and configures the full stack:
|
|
175
|
+
|
|
176
|
+
| Key | What you get |
|
|
177
|
+
|:----|:-------------|
|
|
178
|
+
| `OPENAI_API_KEY` | Vector search (text-embedding-3-small) + typed extraction (gpt-4o-mini) + consolidation |
|
|
179
|
+
| `ANTHROPIC_API_KEY` | Typed extraction + consolidation (no embeddings, keyword search fallback) |
|
|
180
|
+
| Neither | Raw text storage only. Tools work, but no typed extraction and `query_tensions` won't find anything. |
|
|
181
|
+
|
|
182
|
+
**Without an API key, you get a degraded experience.** The server warns on startup and in tool responses.
|
|
183
|
+
|
|
184
|
+
### Embedding Providers
|
|
185
|
+
|
|
186
|
+
The default is OpenAI `text-embedding-3-small`. To use a different provider, pass flags in `args`:
|
|
187
|
+
|
|
188
|
+
```json
|
|
189
|
+
"args": ["--memory", "./project-memory.json", "--embedder", "ollama", "--embedding-model", "nomic-embed-text"]
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
| Flag | What it does | Default |
|
|
193
|
+
|:-----|:-------------|:--------|
|
|
194
|
+
| `--embedder` | Embedding provider: `openai`, `sentence-transformers`, or `ollama` | Auto-detected from API key |
|
|
195
|
+
| `--embedding-model` | Model name (provider-specific) | `text-embedding-3-small` (OpenAI) |
|
|
196
|
+
| `--llm-model` | LLM for extraction and consolidation | `gpt-4o-mini` |
|
|
197
|
+
| `--no-auto` | Disable auto-configuration from API keys | Off |
|
|
198
|
+
|
|
199
|
+
**Local embeddings (free, no API key for embeddings):**
|
|
200
|
+
|
|
201
|
+
| Provider | Install | Example model | Notes |
|
|
202
|
+
|:---------|:--------|:--------------|:------|
|
|
203
|
+
| Ollama | [Install Ollama](https://ollama.com), then `ollama pull nomic-embed-text` | `nomic-embed-text` | Beats text-embedding-3-small. 274MB. |
|
|
204
|
+
| SentenceTransformers | `pip install sentence-transformers` | `BAAI/bge-m3` | Runs on CPU. Downloads on first use. |
|
|
205
|
+
|
|
206
|
+
You still need an LLM API key (`OPENAI_API_KEY` or `ANTHROPIC_API_KEY`) for typed extraction and consolidation, even when using local embeddings.
|
|
207
|
+
|
|
208
|
+
**Using Anthropic instead of OpenAI:**
|
|
209
|
+
|
|
210
|
+
With `ANTHROPIC_API_KEY` set, the server auto-configures extraction and consolidation using Claude Haiku. No vector search (Anthropic has no embedding API), but keyword + temporal search works well. To use a different Anthropic model:
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
"args": ["--memory", "./project-memory.json", "--llm-model", "claude-sonnet-4-6"]
|
|
214
|
+
```
|
|
133
215
|
|
|
134
216
|
**Then add the [CLAUDE.md snippet](examples/CLAUDE.md.example) to your project.** This is what turns tools into a workflow. It tells your agent *when* to record decisions, surface tensions before new choices, and check blockers at session start. Without it, the tools are available but passive. With it, your agent proactively tracks your project's reasoning.
|
|
135
217
|
|
|
@@ -289,7 +371,7 @@ Under the hood: a local semantic graph with typed nodes, typed relationships, an
|
|
|
289
371
|
|
|
290
372
|
| Package | What | Install |
|
|
291
373
|
|:--------|:-----|:--------|
|
|
292
|
-
| [flowscript-agents](https://pypi.org/project/flowscript-agents/) | Python SDK — 9 adapters, unified memory, consolidation, audit trail | `pip install flowscript-agents` |
|
|
374
|
+
| [flowscript-agents](https://pypi.org/project/flowscript-agents/) | Python SDK — 9 adapters, unified memory, consolidation, audit trail | `pip install flowscript-agents openai` |
|
|
293
375
|
| [flowscript-core](https://www.npmjs.com/package/flowscript-core) | TypeScript SDK — Memory class, 15 tools, token budgeting, audit trail | `npm install flowscript-core` |
|
|
294
376
|
| [flowscript.org](https://flowscript.org) | Web editor, D3 visualization, live query panel | Browser |
|
|
295
377
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/brand/logo-512.png" alt="FlowScript" width="120" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">flowscript-agents</h1>
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
<p align="center"><strong>Agent memory that tracks why you decided, what conflicts, and what's blocked. Not just what was said.</strong></p>
|
|
4
8
|
|
|
5
9
|
[](https://github.com/phillipclapham/flowscript-agents) [](https://pypi.org/project/flowscript-agents/) [](LICENSE) [](https://pypi.org/project/flowscript-agents/)
|
|
6
10
|
|
|
@@ -43,14 +47,51 @@ Five queries that no vector store can answer — `why()`, `tensions()`, `blocked
|
|
|
43
47
|
|
|
44
48
|
---
|
|
45
49
|
|
|
50
|
+
## Why FlowScript
|
|
51
|
+
|
|
52
|
+
Agent memory stores what happened. FlowScript stores why.
|
|
53
|
+
|
|
54
|
+
Most agent infrastructure is converging on authorization — identity, access control, audit trails for *who did what*. That's necessary. But it leaves a gap: your agent can prove it was *allowed* to make a decision, but not *why* it made it. Researchers call this "[strategic blindness](https://arxiv.org/abs/2603.18718)" — memory that tracks content without tracking reasoning.
|
|
55
|
+
|
|
56
|
+
FlowScript sits above your memory store, not instead of it. Google Memory Bank, LangGraph checkpointers, Mem0 — they remember what your agent stored. FlowScript remembers why it decided, what it traded off, and what breaks if you change your mind.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
46
60
|
## Get Started
|
|
47
61
|
|
|
48
62
|
### MCP Server (Claude Code / Cursor — zero code)
|
|
49
63
|
|
|
64
|
+
```bash
|
|
65
|
+
pip install flowscript-agents openai
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The `openai` package is required for extraction, consolidation, and vector search. Without it, `add_memory` stores raw text and `query_tensions` won't find anything.
|
|
69
|
+
|
|
70
|
+
Add to your editor's MCP config:
|
|
71
|
+
|
|
72
|
+
**Claude Code** — add to `.claude/settings.json` in your project (or `~/.claude/settings.json` for global):
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"mcpServers": {
|
|
77
|
+
"flowscript": {
|
|
78
|
+
"command": "flowscript-mcp",
|
|
79
|
+
"args": ["--memory", "./project-memory.json"],
|
|
80
|
+
"env": {
|
|
81
|
+
"OPENAI_API_KEY": "your-key"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Cursor / Windsurf / VS Code** — add to `.mcp.json` in your project root:
|
|
89
|
+
|
|
50
90
|
```json
|
|
51
91
|
{
|
|
52
92
|
"mcpServers": {
|
|
53
93
|
"flowscript": {
|
|
94
|
+
"type": "stdio",
|
|
54
95
|
"command": "flowscript-mcp",
|
|
55
96
|
"args": ["--memory", "./project-memory.json"],
|
|
56
97
|
"env": {
|
|
@@ -61,11 +102,52 @@ Five queries that no vector store can answer — `why()`, `tensions()`, `blocked
|
|
|
61
102
|
}
|
|
62
103
|
```
|
|
63
104
|
|
|
105
|
+
**Fallback:** If `env` passthrough doesn't work in your editor, export the key in your shell before launching:
|
|
64
106
|
```bash
|
|
65
|
-
|
|
107
|
+
export OPENAI_API_KEY=your-key
|
|
66
108
|
```
|
|
67
109
|
|
|
68
|
-
|
|
110
|
+
The server auto-detects your API key and configures the full stack:
|
|
111
|
+
|
|
112
|
+
| Key | What you get |
|
|
113
|
+
|:----|:-------------|
|
|
114
|
+
| `OPENAI_API_KEY` | Vector search (text-embedding-3-small) + typed extraction (gpt-4o-mini) + consolidation |
|
|
115
|
+
| `ANTHROPIC_API_KEY` | Typed extraction + consolidation (no embeddings, keyword search fallback) |
|
|
116
|
+
| Neither | Raw text storage only. Tools work, but no typed extraction and `query_tensions` won't find anything. |
|
|
117
|
+
|
|
118
|
+
**Without an API key, you get a degraded experience.** The server warns on startup and in tool responses.
|
|
119
|
+
|
|
120
|
+
### Embedding Providers
|
|
121
|
+
|
|
122
|
+
The default is OpenAI `text-embedding-3-small`. To use a different provider, pass flags in `args`:
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
"args": ["--memory", "./project-memory.json", "--embedder", "ollama", "--embedding-model", "nomic-embed-text"]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
| Flag | What it does | Default |
|
|
129
|
+
|:-----|:-------------|:--------|
|
|
130
|
+
| `--embedder` | Embedding provider: `openai`, `sentence-transformers`, or `ollama` | Auto-detected from API key |
|
|
131
|
+
| `--embedding-model` | Model name (provider-specific) | `text-embedding-3-small` (OpenAI) |
|
|
132
|
+
| `--llm-model` | LLM for extraction and consolidation | `gpt-4o-mini` |
|
|
133
|
+
| `--no-auto` | Disable auto-configuration from API keys | Off |
|
|
134
|
+
|
|
135
|
+
**Local embeddings (free, no API key for embeddings):**
|
|
136
|
+
|
|
137
|
+
| Provider | Install | Example model | Notes |
|
|
138
|
+
|:---------|:--------|:--------------|:------|
|
|
139
|
+
| Ollama | [Install Ollama](https://ollama.com), then `ollama pull nomic-embed-text` | `nomic-embed-text` | Beats text-embedding-3-small. 274MB. |
|
|
140
|
+
| SentenceTransformers | `pip install sentence-transformers` | `BAAI/bge-m3` | Runs on CPU. Downloads on first use. |
|
|
141
|
+
|
|
142
|
+
You still need an LLM API key (`OPENAI_API_KEY` or `ANTHROPIC_API_KEY`) for typed extraction and consolidation, even when using local embeddings.
|
|
143
|
+
|
|
144
|
+
**Using Anthropic instead of OpenAI:**
|
|
145
|
+
|
|
146
|
+
With `ANTHROPIC_API_KEY` set, the server auto-configures extraction and consolidation using Claude Haiku. No vector search (Anthropic has no embedding API), but keyword + temporal search works well. To use a different Anthropic model:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
"args": ["--memory", "./project-memory.json", "--llm-model", "claude-sonnet-4-6"]
|
|
150
|
+
```
|
|
69
151
|
|
|
70
152
|
**Then add the [CLAUDE.md snippet](examples/CLAUDE.md.example) to your project.** This is what turns tools into a workflow. It tells your agent *when* to record decisions, surface tensions before new choices, and check blockers at session start. Without it, the tools are available but passive. With it, your agent proactively tracks your project's reasoning.
|
|
71
153
|
|
|
@@ -225,7 +307,7 @@ Under the hood: a local semantic graph with typed nodes, typed relationships, an
|
|
|
225
307
|
|
|
226
308
|
| Package | What | Install |
|
|
227
309
|
|:--------|:-----|:--------|
|
|
228
|
-
| [flowscript-agents](https://pypi.org/project/flowscript-agents/) | Python SDK — 9 adapters, unified memory, consolidation, audit trail | `pip install flowscript-agents` |
|
|
310
|
+
| [flowscript-agents](https://pypi.org/project/flowscript-agents/) | Python SDK — 9 adapters, unified memory, consolidation, audit trail | `pip install flowscript-agents openai` |
|
|
229
311
|
| [flowscript-core](https://www.npmjs.com/package/flowscript-core) | TypeScript SDK — Memory class, 15 tools, token budgeting, audit trail | `npm install flowscript-core` |
|
|
230
312
|
| [flowscript.org](https://flowscript.org) | Web editor, D3 visualization, live query panel | Browser |
|
|
231
313
|
|
|
Binary file
|
|
Binary file
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
#
|
|
3
3
|
# Paste the section below into your project's CLAUDE.md to enable
|
|
4
4
|
# proactive reasoning memory. FlowScript MCP tools are available
|
|
5
|
-
# when the server is configured
|
|
5
|
+
# when the server is configured in your editor's MCP settings
|
|
6
|
+
# (.claude/settings.json for Claude Code, .mcp.json for Cursor/Windsurf).
|
|
6
7
|
|
|
7
8
|
## Reasoning Memory (FlowScript)
|
|
8
9
|
|
|
@@ -3,7 +3,7 @@ FlowScript Agents — Complete agent memory: reasoning + vector + auto-extractio
|
|
|
3
3
|
|
|
4
4
|
Decision intelligence memory for AI agent frameworks. Drop-in provider for
|
|
5
5
|
LangGraph, CrewAI, Google ADK, OpenAI Agents SDK, Pydantic AI, smolagents,
|
|
6
|
-
LlamaIndex, Haystack, CAMEL-AI
|
|
6
|
+
LlamaIndex, Haystack, and CAMEL-AI.
|
|
7
7
|
|
|
8
8
|
What Mem0 does, plus what Mem0 can't: typed semantic queries (why, tensions,
|
|
9
9
|
blocked, alternatives, whatIf) over agent reasoning with temporal intelligence.
|
|
@@ -13,19 +13,30 @@ Full config:
|
|
|
13
13
|
python -m flowscript_agents.mcp --memory ./agent.json \\
|
|
14
14
|
--embedder openai --llm-model gpt-4o-mini
|
|
15
15
|
|
|
16
|
-
Configure in your
|
|
16
|
+
Configure in your editor's MCP settings:
|
|
17
|
+
|
|
18
|
+
Claude Code — .claude/settings.json (project or ~/.claude/settings.json global):
|
|
17
19
|
{
|
|
18
20
|
"mcpServers": {
|
|
19
21
|
"flowscript": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"args": ["-m", "flowscript_agents.mcp", "--memory", "./agent-memory.json"],
|
|
22
|
+
"command": "flowscript-mcp",
|
|
23
|
+
"args": ["--memory", "./agent-memory.json"],
|
|
23
24
|
"env": { "OPENAI_API_KEY": "sk-..." }
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
Cursor / Windsurf / VS Code — .mcp.json in project root:
|
|
30
|
+
{
|
|
31
|
+
"mcpServers": {
|
|
32
|
+
"flowscript": {
|
|
33
|
+
"type": "stdio",
|
|
34
|
+
"command": "flowscript-mcp",
|
|
35
|
+
"args": ["--memory", "./agent-memory.json"],
|
|
36
|
+
"env": { "OPENAI_API_KEY": "sk-..." }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
29
40
|
|
|
30
41
|
When OPENAI_API_KEY is set, the server auto-configures:
|
|
31
42
|
- OpenAI embeddings (text-embedding-3-small) for vector search
|
|
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "flowscript-agents"
|
|
7
|
-
version = "0.2.
|
|
8
|
-
description = "Complete agent memory: reasoning queries + vector search + auto-extraction. Decision intelligence for LangGraph, CrewAI, Google ADK, OpenAI Agents SDK, Pydantic AI, smolagents, LlamaIndex, Haystack, CAMEL-AI
|
|
7
|
+
version = "0.2.3"
|
|
8
|
+
description = "Complete agent memory: reasoning queries + vector search + auto-extraction. Decision intelligence for LangGraph, CrewAI, Google ADK, OpenAI Agents SDK, Pydantic AI, smolagents, LlamaIndex, Haystack, and CAMEL-AI."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/consolidate.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowscript_agents-0.2.1 → flowscript_agents-0.2.3}/flowscript_agents/embeddings/providers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|