flowscript-agents 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,285 @@
1
+ Metadata-Version: 2.4
2
+ Name: flowscript-agents
3
+ Version: 0.1.0
4
+ Summary: FlowScript integrations for AI agent frameworks. Decision intelligence memory for LangGraph, CrewAI, Google ADK, and OpenAI Agents SDK.
5
+ Project-URL: Homepage, https://flowscript.org
6
+ Project-URL: Repository, https://github.com/phillipclapham/flowscript-agents
7
+ Project-URL: Issues, https://github.com/phillipclapham/flowscript-agents/issues
8
+ Project-URL: Documentation, https://flowscript.org
9
+ Author-email: Phillip Clapham <me@phillipclapham.com>
10
+ License-Expression: MIT
11
+ Keywords: agent-memory,ai-agents,crewai,decision-intelligence,flowscript,google-adk,langgraph,llm,openai-agents
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: flowscript-ldp>=0.2.1
23
+ Provides-Extra: all
24
+ Requires-Dist: crewai>=0.80.0; extra == 'all'
25
+ Requires-Dist: google-adk>=1.0.0; extra == 'all'
26
+ Requires-Dist: langgraph-checkpoint>=2.0.0; extra == 'all'
27
+ Requires-Dist: langgraph>=0.2.0; extra == 'all'
28
+ Requires-Dist: openai-agents>=0.1.0; extra == 'all'
29
+ Provides-Extra: crewai
30
+ Requires-Dist: crewai>=0.80.0; extra == 'crewai'
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
33
+ Requires-Dist: pytest>=8.0; extra == 'dev'
34
+ Provides-Extra: google-adk
35
+ Requires-Dist: google-adk>=1.0.0; extra == 'google-adk'
36
+ Provides-Extra: langgraph
37
+ Requires-Dist: langgraph-checkpoint>=2.0.0; extra == 'langgraph'
38
+ Requires-Dist: langgraph>=0.2.0; extra == 'langgraph'
39
+ Provides-Extra: openai-agents
40
+ Requires-Dist: openai-agents>=0.1.0; extra == 'openai-agents'
41
+ Description-Content-Type: text/markdown
42
+
43
+ # flowscript-agents
44
+
45
+ **Drop-in reasoning memory for AI agent frameworks.**
46
+
47
+ [![Tests](https://img.shields.io/badge/tests-96%20passing-brightgreen)](https://github.com/phillipclapham/flowscript-agents) [![PyPI](https://img.shields.io/pypi/v/flowscript-agents)](https://pypi.org/project/flowscript-agents/) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://pypi.org/project/flowscript-agents/)
48
+
49
+ ---
50
+
51
+ ## The Problem
52
+
53
+ Agent memory today is vector search over blobs. Your agent made a decision — why? What's blocking it? What tradeoffs did it weigh? Embeddings can't answer that.
54
+
55
+ **flowscript-agents** replaces flat memory with queryable reasoning for LangGraph, CrewAI, Google ADK, and OpenAI Agents SDK. Same interfaces your framework expects, but now `memory.query.tensions()` actually works.
56
+
57
+ Built on [flowscript-core](https://www.npmjs.com/package/flowscript-core) (TypeScript SDK) and [flowscript-ldp](https://pypi.org/project/flowscript-ldp/) (Python IR + query engine).
58
+
59
+ ---
60
+
61
+ ## Install
62
+
63
+ ```bash
64
+ # Core (framework-agnostic Memory class)
65
+ pip install flowscript-agents
66
+
67
+ # With your framework
68
+ pip install flowscript-agents[langgraph]
69
+ pip install flowscript-agents[crewai]
70
+ pip install flowscript-agents[google-adk]
71
+ pip install flowscript-agents[openai-agents]
72
+
73
+ # Everything
74
+ pip install flowscript-agents[all]
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Quick Start (Framework-Agnostic)
80
+
81
+ The `Memory` class works standalone — no framework required.
82
+
83
+ ```python
84
+ from flowscript_agents import Memory
85
+
86
+ mem = Memory()
87
+
88
+ q = mem.question("Which database for agent sessions?")
89
+ mem.alternative(q, "Redis").decide(rationale="speed critical")
90
+ mem.alternative(q, "SQLite").block(reason="no concurrent writes")
91
+ mem.tension(
92
+ mem.thought("Redis gives sub-ms reads"),
93
+ mem.thought("cluster costs $200/mo"),
94
+ axis="performance vs cost"
95
+ )
96
+
97
+ # Semantic queries — the thing no other memory gives you
98
+ print(mem.query.tensions()) # tradeoffs with named axes
99
+ print(mem.query.blocked()) # blockers + downstream impact
100
+ print(mem.query.alternatives(q.id)) # options + their states
101
+
102
+ # Persist
103
+ mem.save("./agent-memory.json")
104
+
105
+ # Next session
106
+ mem2 = Memory.load_or_create("./agent-memory.json")
107
+ ```
108
+
109
+ ---
110
+
111
+ ## LangGraph
112
+
113
+ Drop-in `BaseStore` implementation. Use as your LangGraph store — every item becomes a queryable FlowScript node.
114
+
115
+ ```python
116
+ from flowscript_agents.langgraph import FlowScriptStore
117
+
118
+ store = FlowScriptStore("./agent-memory.json")
119
+
120
+ # Standard LangGraph store operations
121
+ store.put(("agents", "planner"), "db_decision", {"value": "chose Redis for speed"})
122
+ items = store.search(("agents", "planner"), query="Redis")
123
+
124
+ # FlowScript queries on the same data
125
+ blockers = store.memory.query.blocked()
126
+ tensions = store.memory.query.tensions()
127
+
128
+ # Async support included
129
+ items = await store.aget(("agents",), "key")
130
+ await store.aput(("agents",), "key", {"value": "data"})
131
+ ```
132
+
133
+ **Install:** `pip install flowscript-agents[langgraph]`
134
+
135
+ ---
136
+
137
+ ## CrewAI
138
+
139
+ Duck-typed `StorageBackend` — plug into CrewAI's memory system.
140
+
141
+ ```python
142
+ from flowscript_agents.crewai import FlowScriptStorage
143
+
144
+ storage = FlowScriptStorage("./crew-memory.json")
145
+
146
+ # Standard CrewAI storage operations
147
+ storage.save({"content": "User prefers concise answers", "score": 0.9})
148
+ results = storage.search("user preferences", limit=5)
149
+
150
+ # Scoped storage
151
+ storage.save({"content": "API rate limit hit"}, metadata={"scope": "errors"})
152
+ scoped = storage.search("rate limit", scope="errors")
153
+
154
+ # FlowScript queries
155
+ tensions = storage.memory.query.tensions()
156
+ blockers = storage.memory.query.blocked()
157
+ ```
158
+
159
+ **Install:** `pip install flowscript-agents[crewai]`
160
+
161
+ ---
162
+
163
+ ## Google ADK
164
+
165
+ `BaseMemoryService` implementation for ADK agents.
166
+
167
+ ```python
168
+ from flowscript_agents.google_adk import FlowScriptMemoryService
169
+
170
+ memory_service = FlowScriptMemoryService("./adk-memory.json")
171
+
172
+ # Use with ADK Runner
173
+ # runner = Runner(agent=agent, memory_service=memory_service, ...)
174
+
175
+ # Session events are automatically extracted as FlowScript nodes
176
+ await memory_service.add_session_to_memory(session)
177
+
178
+ # Search enriched with FlowScript query results
179
+ results = await memory_service.search_memory("my-app", "user-1", "database decision")
180
+ # Results include tensions, blockers when search matches reasoning patterns
181
+
182
+ # Direct query access
183
+ tensions = memory_service.memory.query.tensions()
184
+ ```
185
+
186
+ **Install:** `pip install flowscript-agents[google-adk]`
187
+
188
+ ---
189
+
190
+ ## OpenAI Agents SDK
191
+
192
+ Session protocol implementation for the OpenAI Agents SDK.
193
+
194
+ ```python
195
+ from flowscript_agents.openai_agents import FlowScriptSession
196
+
197
+ session = FlowScriptSession("conversation_123", "./openai-memory.json")
198
+
199
+ # Standard session operations
200
+ session.add_items([
201
+ {"role": "user", "content": "Which database should we use?"},
202
+ {"role": "assistant", "content": "I recommend Redis for the speed requirement."}
203
+ ])
204
+ history = session.get_items(limit=10)
205
+
206
+ # FlowScript queries on conversation reasoning
207
+ tensions = session.memory.query.tensions()
208
+ blockers = session.memory.query.blocked()
209
+ ```
210
+
211
+ **Install:** `pip install flowscript-agents[openai-agents]`
212
+
213
+ ---
214
+
215
+ ## What You Get That Vector Memory Doesn't
216
+
217
+ | Capability | Vector stores | flowscript-agents |
218
+ |:-----------|:-------------|:-----------------|
219
+ | "Why did we decide X?" | Dig through logs | `memory.query.why(node_id)` |
220
+ | "What's blocking progress?" | Hope you logged it | `memory.query.blocked()` |
221
+ | "What tradeoffs exist?" | Good luck | `memory.query.tensions()` |
222
+ | "What alternatives were considered?" | Not tracked | `memory.query.alternatives(q_id)` |
223
+ | "What if we remove this?" | Rebuild from scratch | `memory.query.what_if(node_id)` |
224
+ | Human-readable export | JSON blobs | `.fs` files your PM can read |
225
+
226
+ These aren't complementary to embeddings — they're orthogonal. Use both: vector search for "find similar," FlowScript for "understand reasoning."
227
+
228
+ ---
229
+
230
+ ## API Reference
231
+
232
+ ### Memory (core)
233
+
234
+ ```python
235
+ from flowscript_agents import Memory
236
+
237
+ mem = Memory() # new empty
238
+ mem = Memory.load("./memory.json") # from file
239
+ mem = Memory.load_or_create("./mem.json") # zero-friction entry
240
+
241
+ # Build reasoning
242
+ node = mem.thought("content") # also: statement, question, action, insight, completion
243
+ alt = mem.alternative(question, "option") # linked to question
244
+ node.causes(other) # causal relationship
245
+ node.tension_with(other, axis="speed vs cost")
246
+ node.decide(rationale="reason") # state: decided
247
+ node.block(reason="why") # state: blocked
248
+ node.unblock() # remove blocked state
249
+
250
+ # Query
251
+ mem.query.why(node_id) # causal chain
252
+ mem.query.tensions() # all tensions with axes
253
+ mem.query.blocked() # all blockers + impact
254
+ mem.query.alternatives(question_id) # options + states
255
+ mem.query.what_if(node_id) # downstream impact
256
+
257
+ # Persist
258
+ mem.save("./memory.json") # atomic write
259
+ mem.save() # re-save to loaded path
260
+ ```
261
+
262
+ ### Adapters
263
+
264
+ | Framework | Class | Interface |
265
+ |:----------|:------|:----------|
266
+ | LangGraph | `FlowScriptStore` | `BaseStore` (get/put/search/delete + async) |
267
+ | CrewAI | `FlowScriptStorage` | `StorageBackend` (save/search/update/delete + scopes) |
268
+ | Google ADK | `FlowScriptMemoryService` | `BaseMemoryService` (add_session/search_memory) |
269
+ | OpenAI Agents | `FlowScriptSession` | `Session` (get_items/add_items/pop_item/clear) |
270
+
271
+ All adapters expose `.memory` for direct FlowScript query access.
272
+
273
+ ---
274
+
275
+ ## Ecosystem
276
+
277
+ - **[flowscript-core](https://www.npmjs.com/package/flowscript-core)** — TypeScript SDK with `Memory` class, `asTools()` (12 OpenAI-format tools), token budgeting, audit trail
278
+ - **[flowscript-ldp](https://pypi.org/project/flowscript-ldp/)** — Python IR types + query engine (the foundation this package builds on)
279
+ - **[flowscript.org](https://flowscript.org)** — Web editor, D3 visualization, live query panel
280
+
281
+ ---
282
+
283
+ ## License
284
+
285
+ MIT
@@ -0,0 +1,9 @@
1
+ flowscript_agents/__init__.py,sha256=Gf2OIXVuQxLgRRgqu6ZJLjXGVamDBjd7La6jbecpqe0,645
2
+ flowscript_agents/crewai.py,sha256=VGKxE2U0N4kKyOY5Fmkd8PwblAezP_3rslvZ2ZO7V6Q,15061
3
+ flowscript_agents/google_adk.py,sha256=AFyVsn1D628n1Htvno77ZFSMndk8OedICV4sPfHSUjk,8680
4
+ flowscript_agents/langgraph.py,sha256=oqVdOipMDVi3Z-_msgd7gXqswjO985SsmI7NXhWvhX0,9543
5
+ flowscript_agents/memory.py,sha256=w80N5J7joLqEI8cm8KMosM1J2SDCEjtsIjwljGk-Bco,15951
6
+ flowscript_agents/openai_agents.py,sha256=AWVzaIBSKD4WruYdEj2L-Jbf_pp74PWxmtUlxYmB0Hs,5719
7
+ flowscript_agents-0.1.0.dist-info/METADATA,sha256=1-y3yYJ-vn6KYRoBfmN4iHkQmFb9BQgjrbxruh1A0OU,10035
8
+ flowscript_agents-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
9
+ flowscript_agents-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any