Python client for GigaEvo Memory Module — persistent storage for CARL artifacts
Project description
gigaevo-memory
Python client for the GigaEvo Memory Module — persistent storage for CARL artifacts (steps, chains, agents, memory cards).
CARL (mmar-carl) is a required dependency and is installed automatically.
Installation
pip install gigaevo-memory
Quick Start
from mmar_carl import (
ContextSearchConfig,
ReasoningChain,
LLMStepDescription,
ReasoningContext
)
from gigaevo_memory import MemoryClient
# Define a reasoning chain with RAG-like context queries
steps = [
LLMStepDescription(
number=1,
title="Initial Data Assessment",
aim="Assess the quality and completeness of input data",
reasoning_questions="What data patterns and anomalies are present?",
step_context_queries=["data quality indicators", "missing values", "data consistency"],
stage_action="Evaluate data reliability and identify potential issues",
example_reasoning="High-quality data enables more reliable analysis and predictions"
),
LLMStepDescription(
number=2,
title="Pattern Recognition",
aim="Identify significant patterns and trends in the data",
reasoning_questions="What trends and correlations emerge from the analysis?",
dependencies=[1], # Depends on data quality assessment
step_context_queries=["growth trends", "performance indicators", "correlation patterns"],
stage_action="Analyze temporal patterns and statistical relationships",
example_reasoning="Pattern recognition helps identify underlying business drivers and opportunities"
)
]
chain = ReasoningChain(
steps=steps,
max_workers=3,
metadata={},
search_config=ContextSearchConfig(strategy="substring"),
)
client = MemoryClient(base_url="http://localhost:8000")
# Save a chain (accepts ReasoningChain or dict)
ref = client.save_chain(chain=chain, name="my_chain", tags=["finance"])
# Get chain as ReasoningChain (full DAG validation)
chain = client.get_chain(ref.entity_id, channel="stable")
# Get chain as raw dict
chain_dict = client.get_chain_dict(ref.entity_id)
# Search (q matches name and when_to_use; use tags for faceted filter)
hits = client.search(q="my_chain", entity_type="chain")
# Search by tag (e.g. "finance")
hits = client.search(tags=["finance"])
hits = client.search(entity_type="chain", tags=["finance"])
# Full-text + tag: name/when_to_use contains "triage" and tagged "finance"
hits = client.search(q="triage", entity_type="chain", tags=["finance"])
# Multiple tags (entity must have all)
hits = client.search(tags=["finance", "triage"], entity_type="chain")
# Watch for changes — callback fires when a new version is published
sub = client.watch_chain(
ref.entity_id,
callback=lambda new_chain: print(f"Chain updated: {new_chain}"),
)
Cache Policies
from gigaevo_memory import MemoryClient, CachePolicy
# TTL-based (default: 5 minutes)
client = MemoryClient(base_url="http://localhost:8000", cache_policy=CachePolicy.TTL, cache_ttl=300)
# Freshness check (conditional GET with ETag)
client = MemoryClient(base_url="http://localhost:8000", cache_policy=CachePolicy.FRESHNESS_CHECK)
# SSE push (reactive invalidation)
client = MemoryClient(base_url="http://localhost:8000", cache_policy=CachePolicy.SSE_PUSH)
Development
make client-install # Install the client package + dev tools into the workspace .venv
make client-test # Run tests
make client-lint # Lint
make client-build # Build sdist + wheel
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gigaevo_memory-0.2.0.tar.gz
(19.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gigaevo_memory-0.2.0.tar.gz.
File metadata
- Download URL: gigaevo_memory-0.2.0.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46424486b6c58e50bbf361916ef7ab455249867312af7ae6e938130bd7247a80
|
|
| MD5 |
2c91f74228d0074be522180dad10bb7e
|
|
| BLAKE2b-256 |
82d954a31b4337a8e9da6569e159ef955a85ae94c6e61ecfed37c1db84c96caf
|
File details
Details for the file gigaevo_memory-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gigaevo_memory-0.2.0-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13b4039053be5a99f4ad8d3b135386c7a0e65de548611fba2907155720f73623
|
|
| MD5 |
4fbb10fff3e8e3208a3406ebb62655d0
|
|
| BLAKE2b-256 |
a42b248c7fbafa2b94e01d38d01c02745ffd3b3aad2a9e90c4c932f9f0cbba3e
|