Skip to content

Commit 089a806

Browse files
committed
Update README and StateManager for Graph Store enhancements
- Revised the README to clarify the Graph Store's functionality, specifying it as a strings-only key-value store with per-run scope. - Modified the StateManager to conditionally include retry policy and store configuration in the request body, improving flexibility in handling graph execution parameters.
1 parent 9ade70b commit 089a806

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

python-sdk/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export EXOSPHERE_API_KEY="your-api-key"
7777
- **Async Support**: Native async/await support for high-performance operations
7878
- **Error Handling**: Built-in retry mechanisms and error recovery
7979
- **Scalability**: Designed for high-volume batch processing and workflows
80-
- **Graph Store (beta)**: Persist key-value pairs across nodes within a single run
80+
- **Graph Store (beta)**: Strings-only key-value store with per-run scope for sharing data across nodes (not durable across separate runs or clusters)
8181

8282
## Architecture
8383

@@ -256,12 +256,15 @@ result = await state_manager.trigger(
256256
```
257257

258258
**Parameters:**
259+
259260
- `graph_name` (str): Name of the graph to execute
260261
- `inputs` (dict[str, str] | None): Key/value inputs for the first node (strings only)
261262
- `store` (dict[str, str] | None): Graph-level key/value store (beta) persisted across nodes
262263

263264
**Returns:**
265+
264266
- `dict`: JSON payload from the state manager
265267

266268
**Raises:**
269+
267270
- `Exception`: If the HTTP request fails

python-sdk/exospherehost/statemanager.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,14 @@ async def upsert_graph(self, graph_name: str, graph_nodes: list[dict[str, Any]],
189189
}
190190
body = {
191191
"secrets": secrets,
192-
"nodes": graph_nodes,
193-
"retry_policy": retry_policy,
194-
"store_config": store_config
192+
"nodes": graph_nodes
195193
}
194+
195+
if retry_policy is not None:
196+
body["retry_policy"] = retry_policy
197+
if store_config is not None:
198+
body["store_config"] = store_config
199+
196200
async with aiohttp.ClientSession() as session:
197201
async with session.put(endpoint, json=body, headers=headers) as response: # type: ignore
198202
if response.status not in [200, 201]:

0 commit comments

Comments
 (0)