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, concepts).
CARL (mmar-carl) is a required dependency and is installed automatically.
Installation
pip install gigaevo-memory
Quick Start
from mmar_carl import (
ContextSearchConfig,
ReasoningChain,
StepDescription,
ReasoningContext
)
from gigaevo_memory import MemoryClient
# Define a reasoning chain with RAG-like context queries
steps = [
StepDescription(
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"
),
StepDescription(
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 in editable mode
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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.1.0-py3-none-any.whl.
File metadata
- Download URL: gigaevo_memory-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07bdefd7c1d46551cc16b90a5ace48ddf6e387b38fa17162972b340619091e32
|
|
| MD5 |
5b216ee07aa278442ef648ae8363f02f
|
|
| BLAKE2b-256 |
a7bb7cde6fc7aec564c16ec60e98272e5874be20236ea7373ff83dd0bbee86ad
|