Python SDK reference
Every discovered public declaration and client signature in the local python SDK source.
This reference lists 265 source declarations from 21 files. It preserves signatures and types rather than assuming identical APIs across languages. See SDK compatibility before using a method against a deployed instance.
akasha/init.py
__all__
__all__ = ['AkashaClient', 'AkashaConfig', 'Tenant', 'TenantPlan', 'TenantStatus', 'Backup', 'BackupStatus', 'HealthStatus', 'UsageMetrics', 'ServiceStatus', 'AkashaError', 'AuthenticationError', 'NotFoundError', 'ValidationError', 'RateLimitError', 'ServerError']Source: minds-python-sdk/akasha/__init__.py:38.
akasha/client.py
AkashaClient
class AkashaClient()Source: minds-python-sdk/akasha/client.py:26.
Source documentation:
Main client for interacting with Akasha APIs.
Provides access to both Control Plane APIs (tenant management, backups,
monitoring) and Runtime APIs (KV, graph, vector operations).
Example:
>>> client = AkashaClient("https://api.akasha.l1fe.ai", api_key="your-key")
>>> # Control Plane operations
>>> tenant = client.control_plane.tenants.get("tenant-123")
>>> # Runtime operations (requires instance endpoint)
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> value = runtime.kv.get("my-key")
Args:
base_url: Base URL of the Akasha Control Plane API.
api_key: API key for authentication.
timeout: Request timeout in seconds.
max_retries: Maximum number of retries for failed requests.
verify_ssl: Whether to verify SSL certificates.AkashaClient.__init__
def __init__(self, base_url: str, api_key: str, timeout: float=30.0, max_retries: int=3, verify_ssl: bool=True) -> NoneSource: minds-python-sdk/akasha/client.py:49.
AkashaClient.control_plane
def control_plane(self) -> ControlPlaneClientSource: minds-python-sdk/akasha/client.py:82.
Source documentation:
Access Control Plane APIs.
Provides access to tenant management, backups, and monitoring.
Returns:
ControlPlaneClient instance.AkashaClient.runtime
def runtime(self, instance_url: str) -> RuntimeClientSource: minds-python-sdk/akasha/client.py:95.
Source documentation:
Get a Runtime client for a specific Akasha instance.
Args:
instance_url: URL of the Akasha instance (e.g., "https://my-instance.akasha.ooo").
Returns:
RuntimeClient for the specified instance.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> value = runtime.kv.get("my-key")AkashaClient.request
def request(self, method: str, path: str, json: Optional[dict[str, Any]]=None, params: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/client.py:123.
Source documentation:
Make a raw HTTP request to the API.
Args:
method: HTTP method (GET, POST, PUT, DELETE, etc.).
path: API path (e.g., "/api/v1/tenants").
json: JSON body for POST/PUT requests.
params: Query parameters.
Returns:
Parsed JSON response.
Raises:
AkashaError: On API errors.AkashaClient.close
def close(self) -> NoneSource: minds-python-sdk/akasha/client.py:199.
Source documentation:
Close the HTTP client and release resources.akasha/control_plane/init.py
ControlPlaneClient
class ControlPlaneClient()Source: minds-python-sdk/akasha/control_plane/__init__.py:12.
Source documentation:
Control Plane client providing access to all control plane APIs.
Attributes:
tenants: Client for tenant management operations.
backups: Client for backup operations.
monitoring: Client for monitoring and metrics.ControlPlaneClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/control_plane/__init__.py:22.
ControlPlaneClient.tenants
def tenants(self) -> TenantClientSource: minds-python-sdk/akasha/control_plane/__init__.py:29.
Source documentation:
Access tenant management APIs.ControlPlaneClient.backups
def backups(self) -> BackupClientSource: minds-python-sdk/akasha/control_plane/__init__.py:36.
Source documentation:
Access backup management APIs.ControlPlaneClient.monitoring
def monitoring(self) -> MonitoringClientSource: minds-python-sdk/akasha/control_plane/__init__.py:43.
Source documentation:
Access monitoring and metrics APIs.__all__
__all__ = ['ControlPlaneClient', 'TenantClient', 'BackupClient', 'MonitoringClient']Source: minds-python-sdk/akasha/control_plane/__init__.py:50.
akasha/control_plane/backup.py
BackupClient
class BackupClient()Source: minds-python-sdk/akasha/control_plane/backup.py:19.
Source documentation:
Client for backup management operations.
Provides methods for creating, listing, and restoring backups.
Example:
>>> backups = client.control_plane.backups
>>> backup = backups.create("tenant-123", name="pre-migration")
>>> all_backups = backups.list("tenant-123")BackupClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/control_plane/backup.py:31.
BackupClient.create
def create(self, tenant_id: str, name: Optional[str]=None, include_services: Optional[list[ServiceType]]=None, retention_days: int=30) -> BackupSource: minds-python-sdk/akasha/control_plane/backup.py:37.
Source documentation:
Create a new backup for a tenant.
Args:
tenant_id: The tenant's unique identifier.
name: Backup name (auto-generated if not provided).
include_services: Services to include (all if not specified).
retention_days: How long to retain the backup (default: 30 days).
Returns:
Created Backup object.
Raises:
NotFoundError: If tenant doesn't exist.
Example:
>>> backup = backups.create(
... "tenant-123",
... name="pre-migration",
... include_services=[ServiceType.KV, ServiceType.GRAPH],
... retention_days=90
... )BackupClient.get
def get(self, tenant_id: str, backup_id: str) -> BackupSource: minds-python-sdk/akasha/control_plane/backup.py:80.
Source documentation:
Get a backup by ID.
Args:
tenant_id: The tenant's unique identifier.
backup_id: The backup's unique identifier.
Returns:
Backup object.
Raises:
NotFoundError: If backup doesn't exist.
Example:
>>> backup = backups.get("tenant-123", "backup-456")BackupClient.list
def list(self, tenant_id: str, page: int=1, page_size: int=20, status: Optional[BackupStatus]=None) -> list[Backup]Source: minds-python-sdk/akasha/control_plane/backup.py:102.
Source documentation:
List all backups for a tenant.
Args:
tenant_id: The tenant's unique identifier.
page: Page number (1-indexed).
page_size: Number of results per page.
status: Filter by backup status.
Returns:
List of Backup objects.
Example:
>>> completed = backups.list("tenant-123", status=BackupStatus.COMPLETED)BackupClient.delete
def delete(self, tenant_id: str, backup_id: str) -> NoneSource: minds-python-sdk/akasha/control_plane/backup.py:134.
Source documentation:
Delete a backup.
Warning: This permanently deletes the backup data.
Args:
tenant_id: The tenant's unique identifier.
backup_id: The backup's unique identifier.
Raises:
NotFoundError: If backup doesn't exist.
Example:
>>> backups.delete("tenant-123", "backup-456")BackupClient.restore
def restore(self, tenant_id: str, backup_id: str, target_tenant_id: Optional[str]=None, services: Optional[list[ServiceType]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/control_plane/backup.py:153.
Source documentation:
Restore from a backup.
Args:
tenant_id: The source tenant's identifier.
backup_id: The backup's unique identifier.
target_tenant_id: Target tenant for restore (same tenant if not provided).
services: Services to restore (all if not specified).
Returns:
Restore operation status.
Raises:
NotFoundError: If backup doesn't exist.
ConflictError: If restore conflicts with existing data.
Example:
>>> # Restore to same tenant
>>> result = backups.restore("tenant-123", "backup-456")
>>> # Restore to different tenant
>>> result = backups.restore(
... "tenant-123",
... "backup-456",
... target_tenant_id="tenant-789"
... )akasha/control_plane/monitoring.py
MonitoringClient
class MonitoringClient()Source: minds-python-sdk/akasha/control_plane/monitoring.py:13.
Source documentation:
Client for monitoring and metrics operations.
Provides methods for retrieving usage metrics, health status,
and other observability data.
Example:
>>> monitoring = client.control_plane.monitoring
>>> health = monitoring.get_health("tenant-123")
>>> usage = monitoring.get_usage("tenant-123")MonitoringClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/control_plane/monitoring.py:26.
MonitoringClient.get_health
def get_health(self, tenant_id: str) -> InstanceHealthSource: minds-python-sdk/akasha/control_plane/monitoring.py:29.
Source documentation:
Get health status for a tenant's instance.
Args:
tenant_id: The tenant's unique identifier.
Returns:
InstanceHealth object with overall and per-service status.
Raises:
NotFoundError: If tenant doesn't exist.
Example:
>>> health = monitoring.get_health("tenant-123")
>>> if health.status == HealthStatus.HEALTHY:
... print("All systems operational")MonitoringClient.get_usage
def get_usage(self, tenant_id: str, start_time: Optional[datetime]=None, end_time: Optional[datetime]=None) -> UsageMetricsSource: minds-python-sdk/akasha/control_plane/monitoring.py:52.
Source documentation:
Get usage metrics for a tenant.
Args:
tenant_id: The tenant's unique identifier.
start_time: Start of the reporting period.
end_time: End of the reporting period.
Returns:
UsageMetrics object with resource consumption data.
Raises:
NotFoundError: If tenant doesn't exist.
Example:
>>> usage = monitoring.get_usage("tenant-123")
>>> print(f"Storage used: {usage.storage_used_bytes / 1e9:.2f} GB")MonitoringClient.get_metrics
def get_metrics(self, tenant_id: str, metric_names: Optional[list[str]]=None, start_time: Optional[datetime]=None, end_time: Optional[datetime]=None, granularity: str='hour') -> dict[str, Any]Source: minds-python-sdk/akasha/control_plane/monitoring.py:87.
Source documentation:
Get detailed metrics for a tenant.
Args:
tenant_id: The tenant's unique identifier.
metric_names: Specific metrics to retrieve (all if not specified).
start_time: Start of the reporting period.
end_time: End of the reporting period.
granularity: Data point granularity ("minute", "hour", "day").
Returns:
Dictionary with metric time series data.
Raises:
NotFoundError: If tenant doesn't exist.
Example:
>>> metrics = monitoring.get_metrics(
... "tenant-123",
... metric_names=["read_ops", "write_ops"],
... granularity="hour"
... )
>>> for point in metrics["read_ops"]:
... print(f"{point['timestamp']}: {point['value']}")MonitoringClient.get_services_status
def get_services_status(self, instance_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/control_plane/monitoring.py:132.
Source documentation:
Get status of all services for an instance.
Args:
instance_id: The instance's unique identifier.
Returns:
Dictionary with per-service status information.
Example:
>>> status = monitoring.get_services_status("instance-123")
>>> for service, info in status["services"].items():
... print(f"{service}: {info['status']}")MonitoringClient.get_alerts
def get_alerts(self, tenant_id: str, severity: Optional[str]=None, active_only: bool=True) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/control_plane/monitoring.py:151.
Source documentation:
Get alerts for a tenant.
Args:
tenant_id: The tenant's unique identifier.
severity: Filter by severity ("critical", "warning", "info").
active_only: Only return active (unresolved) alerts.
Returns:
List of alert objects.
Example:
>>> alerts = monitoring.get_alerts("tenant-123", severity="critical")
>>> for alert in alerts:
... print(f"{alert['name']}: {alert['message']}")akasha/control_plane/tenant.py
TenantClient
class TenantClient()Source: minds-python-sdk/akasha/control_plane/tenant.py:19.
Source documentation:
Client for tenant management operations.
Provides methods for creating, reading, updating, and deleting tenants,
as well as managing tenant services.
Example:
>>> tenants = client.control_plane.tenants
>>> tenant = tenants.create(name="my-tenant", plan=TenantPlan.PRO, region="us-east-1")
>>> all_tenants = tenants.list()TenantClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/control_plane/tenant.py:32.
TenantClient.create
def create(self, name: str, plan: TenantPlan=TenantPlan.FREE, region: str='us-east-1', services: Optional[TenantServices]=None, metadata: Optional[dict[str, Any]]=None) -> TenantSource: minds-python-sdk/akasha/control_plane/tenant.py:36.
Source documentation:
Create a new tenant.
Args:
name: Unique tenant name (1-63 characters).
plan: Subscription plan (free, starter, pro, enterprise).
region: Deployment region (e.g., "us-east-1").
services: Services to enable (defaults based on plan).
metadata: Custom metadata key-value pairs.
Returns:
Created Tenant object.
Raises:
ValidationError: If request validation fails.
ConflictError: If tenant name already exists.
Example:
>>> tenant = tenants.create(
... name="my-app",
... plan=TenantPlan.PRO,
... region="us-east-1",
... metadata={"environment": "production"}
... )TenantClient.get
def get(self, tenant_id: str) -> TenantSource: minds-python-sdk/akasha/control_plane/tenant.py:81.
Source documentation:
Get a tenant by ID.
Args:
tenant_id: The tenant's unique identifier.
Returns:
Tenant object.
Raises:
NotFoundError: If tenant doesn't exist.
Example:
>>> tenant = tenants.get("tenant-abc123")TenantClient.list
def list(self, page: int=1, page_size: int=20, status: Optional[str]=None, plan: Optional[TenantPlan]=None) -> list[Tenant]Source: minds-python-sdk/akasha/control_plane/tenant.py:102.
Source documentation:
List all tenants with optional filtering.
Args:
page: Page number (1-indexed).
page_size: Number of results per page.
status: Filter by status (active, suspended, etc.).
plan: Filter by subscription plan.
Returns:
List of Tenant objects.
Example:
>>> active_tenants = tenants.list(status="active")
>>> pro_tenants = tenants.list(plan=TenantPlan.PRO)TenantClient.update
def update(self, tenant_id: str, name: Optional[str]=None, plan: Optional[TenantPlan]=None, services: Optional[TenantServices]=None, metadata: Optional[dict[str, Any]]=None) -> TenantSource: minds-python-sdk/akasha/control_plane/tenant.py:137.
Source documentation:
Update a tenant.
Args:
tenant_id: The tenant's unique identifier.
name: New tenant name.
plan: New subscription plan.
services: Services to update.
metadata: Metadata to update (merged with existing).
Returns:
Updated Tenant object.
Raises:
NotFoundError: If tenant doesn't exist.
ValidationError: If validation fails.
Example:
>>> updated = tenants.update("tenant-123", plan=TenantPlan.ENTERPRISE)TenantClient.delete
def delete(self, tenant_id: str) -> NoneSource: minds-python-sdk/akasha/control_plane/tenant.py:179.
Source documentation:
Delete a tenant.
Warning: This permanently deletes the tenant and all associated data.
Args:
tenant_id: The tenant's unique identifier.
Raises:
NotFoundError: If tenant doesn't exist.
Example:
>>> tenants.delete("tenant-123")TenantClient.enable_services
def enable_services(self, tenant_id: str, services: list[str]) -> TenantSource: minds-python-sdk/akasha/control_plane/tenant.py:197.
Source documentation:
Enable services for a tenant.
Args:
tenant_id: The tenant's unique identifier.
services: List of service names to enable (e.g., ["graph", "vector"]).
Returns:
Updated Tenant object.
Example:
>>> tenant = tenants.enable_services("tenant-123", ["graph", "analytics"])TenantClient.disable_services
def disable_services(self, tenant_id: str, services: list[str]) -> TenantSource: minds-python-sdk/akasha/control_plane/tenant.py:219.
Source documentation:
Disable services for a tenant.
Args:
tenant_id: The tenant's unique identifier.
services: List of service names to disable.
Returns:
Updated Tenant object.
Example:
>>> tenant = tenants.disable_services("tenant-123", ["ml"])TenantClient.get_status
def get_status(self, tenant_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/control_plane/tenant.py:241.
Source documentation:
Get detailed status for a tenant.
Args:
tenant_id: The tenant's unique identifier.
Returns:
Status information including instance state, services, and resources.
Example:
>>> status = tenants.get_status("tenant-123")
>>> print(status["instance_state"])akasha/exceptions.py
AkashaError
class AkashaError(Exception)Source: minds-python-sdk/akasha/exceptions.py:10.
Source documentation:
Base exception for all Akasha SDK errors.AkashaError.__init__
def __init__(self, message: str, status_code: Optional[int]=None, response_body: Optional[dict[str, Any]]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:13.
AuthenticationError
class AuthenticationError(AkashaError)Source: minds-python-sdk/akasha/exceptions.py:30.
Source documentation:
Raised when authentication fails (401 Unauthorized).AuthenticationError.__init__
def __init__(self, message: str='Authentication failed. Check your API key.', response_body: Optional[dict[str, Any]]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:33.
AuthorizationError
class AuthorizationError(AkashaError)Source: minds-python-sdk/akasha/exceptions.py:41.
Source documentation:
Raised when authorization fails (403 Forbidden).AuthorizationError.__init__
def __init__(self, message: str='Access denied. Insufficient permissions.', response_body: Optional[dict[str, Any]]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:44.
NotFoundError
class NotFoundError(AkashaError)Source: minds-python-sdk/akasha/exceptions.py:52.
Source documentation:
Raised when a resource is not found (404 Not Found).NotFoundError.__init__
def __init__(self, resource: str='Resource', resource_id: Optional[str]=None, response_body: Optional[dict[str, Any]]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:55.
ValidationError
class ValidationError(AkashaError)Source: minds-python-sdk/akasha/exceptions.py:68.
Source documentation:
Raised when request validation fails (400 Bad Request).ValidationError.__init__
def __init__(self, message: str='Invalid request parameters.', errors: Optional[list[dict[str, Any]]]=None, response_body: Optional[dict[str, Any]]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:71.
ConflictError
class ConflictError(AkashaError)Source: minds-python-sdk/akasha/exceptions.py:81.
Source documentation:
Raised when there's a conflict (409 Conflict).ConflictError.__init__
def __init__(self, message: str='Resource conflict.', response_body: Optional[dict[str, Any]]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:84.
RateLimitError
class RateLimitError(AkashaError)Source: minds-python-sdk/akasha/exceptions.py:92.
Source documentation:
Raised when rate limit is exceeded (429 Too Many Requests).RateLimitError.__init__
def __init__(self, message: str='Rate limit exceeded. Please retry later.', retry_after: Optional[int]=None, response_body: Optional[dict[str, Any]]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:95.
ServerError
class ServerError(AkashaError)Source: minds-python-sdk/akasha/exceptions.py:105.
Source documentation:
Raised when a server error occurs (5xx).ServerError.__init__
def __init__(self, message: str='Internal server error.', status_code: int=500, response_body: Optional[dict[str, Any]]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:108.
ConnectionError
class ConnectionError(AkashaError)Source: minds-python-sdk/akasha/exceptions.py:117.
Source documentation:
Raised when unable to connect to the Akasha API.ConnectionError.__init__
def __init__(self, message: str='Unable to connect to Akasha API.', original_error: Optional[Exception]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:120.
TimeoutError
class TimeoutError(AkashaError)Source: minds-python-sdk/akasha/exceptions.py:129.
Source documentation:
Raised when a request times out.TimeoutError.__init__
def __init__(self, message: str='Request timed out.', timeout_seconds: Optional[float]=None) -> NoneSource: minds-python-sdk/akasha/exceptions.py:132.
akasha/runtime/init.py
RuntimeClient
class RuntimeClient()Source: minds-python-sdk/akasha/runtime/__init__.py:34.
Source documentation:
Runtime client providing access to all Akasha instance APIs.
Attributes:
core: Core storage operations (keyspaces, transactions, maintenance)
kv: Key-value store operations
graph: Graph database operations
vector: Vector search operations
analytics: SQL analytics operations
memory: Multi-modal memory operations
ml: Machine learning operations
snn: Spiking neural network operations
neurosymbolic: Neurosymbolic reasoning operations
continual: Continual learning operations
mhn: Modern Hopfield Network operations
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> # Core operations
>>> runtime.core.create_keyspace("users", model="document")
>>> # KV operations
>>> runtime.kv.set("key", "value")
>>> # Analytics
>>> result = runtime.analytics.sql("SELECT * FROM users")
>>> # Memory
>>> runtime.memory.episodic.insert("event", {"data": "..."})
>>> # SNN
>>> runtime.snn.build(architecture)RuntimeClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/__init__.py:65.
RuntimeClient.core
def core(self) -> CoreClientSource: minds-python-sdk/akasha/runtime/__init__.py:81.
Source documentation:
Access core storage operations (keyspaces, transactions, maintenance).RuntimeClient.kv
def kv(self) -> KVClientSource: minds-python-sdk/akasha/runtime/__init__.py:88.
Source documentation:
Access key-value store operations.RuntimeClient.graph
def graph(self) -> GraphClientSource: minds-python-sdk/akasha/runtime/__init__.py:95.
Source documentation:
Access graph database operations.RuntimeClient.vector
def vector(self) -> VectorClientSource: minds-python-sdk/akasha/runtime/__init__.py:102.
Source documentation:
Access vector search operations.RuntimeClient.analytics
def analytics(self) -> AnalyticsClientSource: minds-python-sdk/akasha/runtime/__init__.py:109.
Source documentation:
Access SQL analytics operations.RuntimeClient.memory
def memory(self) -> MemoryClientSource: minds-python-sdk/akasha/runtime/__init__.py:116.
Source documentation:
Access multi-modal memory operations.RuntimeClient.ml
def ml(self) -> MLClientSource: minds-python-sdk/akasha/runtime/__init__.py:123.
Source documentation:
Access machine learning operations.RuntimeClient.snn
def snn(self) -> SNNClientSource: minds-python-sdk/akasha/runtime/__init__.py:130.
Source documentation:
Access spiking neural network operations.RuntimeClient.neurosymbolic
def neurosymbolic(self) -> NeurosymbolicClientSource: minds-python-sdk/akasha/runtime/__init__.py:137.
Source documentation:
Access neurosymbolic reasoning operations.RuntimeClient.continual
def continual(self) -> ContinualClientSource: minds-python-sdk/akasha/runtime/__init__.py:144.
Source documentation:
Access continual learning operations.RuntimeClient.mhn
def mhn(self) -> MHNClientSource: minds-python-sdk/akasha/runtime/__init__.py:151.
Source documentation:
Access Modern Hopfield Network operations.RuntimeClient.brain
def brain(self) -> CognitiveBrainClientSource: minds-python-sdk/akasha/runtime/__init__.py:158.
Source documentation:
Access MCP cognitive brain operations (remember, recall, forget, reflect, introspect).RuntimeClient.close
def close(self) -> NoneSource: minds-python-sdk/akasha/runtime/__init__.py:164.
Source documentation:
Close the HTTP client.__all__
__all__ = ['RuntimeClient', 'CoreClient', 'KVClient', 'GraphClient', 'VectorClient', 'AnalyticsClient', 'MemoryClient', 'MLClient', 'SNNClient', 'NeurosymbolicClient', 'ContinualClient', 'MHNClient', 'CognitiveBrainClient']Source: minds-python-sdk/akasha/runtime/__init__.py:169.
akasha/runtime/analytics.py
AnalyticsClient
class AnalyticsClient()Source: minds-python-sdk/akasha/runtime/analytics.py:10.
Source documentation:
Client for SQL analytics operations.
Provides methods for executing SQL queries, registering data sources,
and managing the analytics cache.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> result = runtime.analytics.sql("SELECT * FROM users WHERE age > 21")AnalyticsClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/analytics.py:22.
AnalyticsClient.sql
def sql(self, query: str, parameters: Optional[dict[str, Any]]=None, timeout_ms: Optional[int]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/analytics.py:26.
Source documentation:
Execute a SQL query.
Args:
query: SQL query string.
parameters: Query parameters for prepared statements.
timeout_ms: Query timeout in milliseconds.
Returns:
Query results with columns and rows.
Example:
>>> result = runtime.analytics.sql(
... "SELECT name, age FROM users WHERE department = $1",
... parameters={"$1": "Engineering"}
... )
>>> for row in result["rows"]:
... print(row)AnalyticsClient.register_csv_source
def register_csv_source(self, name: str, path: str, has_header: bool=True, delimiter: str=',', schema: Optional[dict[str, str]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/analytics.py:61.
Source documentation:
Register a CSV file as a queryable data source.
Args:
name: Table name to use in SQL queries.
path: Path to the CSV file.
has_header: Whether the CSV has a header row.
delimiter: Field delimiter character.
schema: Optional column type overrides.
Returns:
Registration result.
Example:
>>> runtime.analytics.register_csv_source(
... "sales",
... "/data/sales.csv",
... schema={"amount": "DECIMAL", "date": "DATE"}
... )AnalyticsClient.register_parquet_source
def register_parquet_source(self, name: str, path: str, schema: Optional[dict[str, str]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/analytics.py:102.
Source documentation:
Register a Parquet file as a queryable data source.
Args:
name: Table name to use in SQL queries.
path: Path to the Parquet file.
schema: Optional column type overrides.
Returns:
Registration result.
Example:
>>> runtime.analytics.register_parquet_source("events", "/data/events.parquet")AnalyticsClient.register_core_source
def register_core_source(self, name: str, keyspace: str, schema: Optional[dict[str, str]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/analytics.py:130.
Source documentation:
Register an Akasha keyspace as a queryable data source.
Args:
name: Table name to use in SQL queries.
keyspace: Name of the Akasha keyspace.
schema: Optional column type overrides.
Returns:
Registration result.
Example:
>>> runtime.analytics.register_core_source("users", "user_keyspace")
>>> result = runtime.analytics.sql("SELECT * FROM users")AnalyticsClient.set_options
def set_options(self, batch_size: Optional[int]=None, parallel_degree: Optional[int]=None, memory_limit_mb: Optional[int]=None, enable_caching: Optional[bool]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/analytics.py:159.
Source documentation:
Configure analytics engine options.
Args:
batch_size: Processing batch size.
parallel_degree: Degree of parallelism.
memory_limit_mb: Memory limit in MB.
enable_caching: Enable query result caching.
Returns:
Current options after update.AnalyticsClient.clear_cache
def clear_cache(self) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/analytics.py:192.
Source documentation:
Clear the analytics query cache.
Returns:
Cache clear result.AnalyticsClient.get_cache_stats
def get_cache_stats(self) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/analytics.py:203.
Source documentation:
Get analytics cache statistics.
Returns:
Cache statistics including hit rate, size, etc.akasha/runtime/cognitive.py
CognitiveBrainClient
class CognitiveBrainClient()Source: minds-python-sdk/akasha/runtime/cognitive.py:17.
Source documentation:
Client for MCP cognitive tool operations.
Provides a high-level interface to Akasha's cognitive memory tools
via the daemon's MCP HTTP API.
Example:
>>> brain = runtime.brain
>>> # Store a memory
>>> result = brain.remember("User prefers dark mode")
>>> # Recall memories
>>> memories = brain.recall("dark mode preference")
>>> # Forget a memory
>>> brain.forget([result["memory_id"]], reason="User requested removal")CognitiveBrainClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/cognitive.py:34.
CognitiveBrainClient.remember
def remember(self, content: str, *, source: Optional[str]=None, importance: Optional[float]=None, tags: Optional[list[str]]=None, memory_type_hint: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/cognitive.py:38.
Source documentation:
Store a memory with automatic cognitive processing.
The system automatically detects duplicates, checks for contradictions,
infers relationships, and classifies the memory type.
Args:
content: The memory content to store.
source: Where this memory came from (e.g., "user_input", "observation").
importance: Importance hint (0.0 to 1.0).
tags: Tags for categorization.
memory_type_hint: Classification hint ("auto", "episodic", "semantic", "procedural").
Returns:
Dict with stored, memory_id, memory_type, was_duplicate, importance, etc.CognitiveBrainClient.recall
def recall(self, query: str, *, limit: int=10, memory_types: Optional[list[str]]=None, tags: Optional[list[str]]=None, min_importance: Optional[float]=None, time_after: Optional[str]=None, time_before: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/cognitive.py:80.
Source documentation:
Retrieve memories using hybrid search.
Combines semantic similarity, keyword matching, and temporal relevance
for intelligent memory retrieval.
Args:
query: What to remember.
limit: Maximum number of results (1-100).
memory_types: Filter by types ("episodic", "semantic", "procedural").
tags: Filter by tags.
min_importance: Minimum importance threshold (0.0 to 1.0).
time_after: Only memories after this ISO 8601 timestamp.
time_before: Only memories before this ISO 8601 timestamp.
Returns:
Dict with memories list, total_matches, and search_info.CognitiveBrainClient.forget
def forget(self, memory_ids: list[str], reason: str, *, confirm_bulk: Optional[bool]=None, mode: str='soft') -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/cognitive.py:131.
Source documentation:
Remove memories with audit trail.
Args:
memory_ids: IDs of memories to forget.
reason: Why these memories are being forgotten (stored in audit log).
confirm_bulk: Must be True to forget multiple memories at once.
mode: Delete mode - "soft" (recoverable) or "hard" (permanent).
Returns:
Dict with deleted_count, audit_id, skipped list, and warnings.CognitiveBrainClient.reflect
def reflect(self, topic: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/cognitive.py:165.
Source documentation:
Generate reflections on stored memories.
Args:
topic: Optional topic to focus reflection on.
Returns:
Dict with insights, patterns, connections, and recommendations.CognitiveBrainClient.introspect
def introspect(self, aspect: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/cognitive.py:183.
Source documentation:
Get memory system introspection and health.
Args:
aspect: Optional aspect to focus on (e.g., "health", "statistics").
Returns:
Dict with total_memories, by_type counts, health status, etc.CognitiveBrainClient.call_tool
def call_tool(self, tool_name: str, arguments: dict[str, Any]) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/cognitive.py:201.
Source documentation:
Call any MCP tool by name with raw arguments.
Args:
tool_name: Name of the MCP tool to call.
arguments: Tool arguments as a dictionary.
Returns:
Tool execution result.CognitiveBrainClient.list_tools
def list_tools(self) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/cognitive.py:216.
Source documentation:
List available MCP tools.
Returns:
List of tool descriptions with name, description, and tier.akasha/runtime/continual.py
ContinualClient
class ContinualClient()Source: minds-python-sdk/akasha/runtime/continual.py:10.
Source documentation:
Client for continual learning operations.
Provides methods for managing checkpoints, recovery, and component
registration for lifelong learning without catastrophic forgetting.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> checkpoint = runtime.continual.create_checkpoint("daily_backup")
>>> runtime.continual.register_component("user_model", model_state)ContinualClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/continual.py:23.
ContinualClient.create_checkpoint
def create_checkpoint(self, name: Optional[str]=None, components: Optional[list[str]]=None, metadata: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/continual.py:27.
Source documentation:
Create a learning checkpoint.
Saves the current state of registered components for later recovery.
Args:
name: Checkpoint name (auto-generated if not provided).
components: Specific components to checkpoint (all if not specified).
metadata: Additional metadata.
Returns:
Checkpoint info with ID.
Example:
>>> checkpoint = runtime.continual.create_checkpoint(
... name="before_new_task",
... components=["user_model", "embedding_model"]
... )ContinualClient.get_checkpoint_status
def get_checkpoint_status(self, checkpoint_id: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/continual.py:64.
Source documentation:
Get checkpoint status.
Args:
checkpoint_id: Specific checkpoint (latest if not specified).
Returns:
Checkpoint status and metadata.ContinualClient.recover
def recover(self, checkpoint_id: str, components: Optional[list[str]]=None, strategy: str='full') -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/continual.py:81.
Source documentation:
Recover from a checkpoint.
Args:
checkpoint_id: ID of checkpoint to recover from.
components: Specific components to recover (all if not specified).
strategy: Recovery strategy ("full", "selective", "merge").
Returns:
Recovery result.
Example:
>>> result = runtime.continual.recover(
... checkpoint["id"],
... strategy="selective",
... components=["user_model"]
... )ContinualClient.register_component
def register_component(self, name: str, state: dict[str, Any], component_type: str='model', ewc_importance: Optional[float]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/continual.py:116.
Source documentation:
Register a component for continual learning.
Args:
name: Unique component name.
state: Component state (weights, parameters, etc.).
component_type: Type of component ("model", "embeddings", "custom").
ewc_importance: Elastic Weight Consolidation importance weight.
Returns:
Registration confirmation.
Example:
>>> runtime.continual.register_component(
... "sentiment_model",
... {"weights": model.state_dict()},
... ewc_importance=0.5
... )ContinualClient.unregister_component
def unregister_component(self, name: str) -> boolSource: minds-python-sdk/akasha/runtime/continual.py:154.
Source documentation:
Unregister a component.
Args:
name: Component name.
Returns:
True if unregistered, False if not found.ContinualClient.list_components
def list_components(self) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/continual.py:170.
Source documentation:
List all registered components.
Returns:
List of component info.akasha/runtime/core.py
CoreClient
class CoreClient()Source: minds-python-sdk/akasha/runtime/core.py:12.
Source documentation:
Client for core storage operations.
Provides keyspace management, item CRUD, transactions,
namespaces, and maintenance operations.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> runtime.core.create_keyspace("users", model="document")
>>> runtime.core.store("users", {"id": "1", "name": "Alice"})CoreClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/core.py:25.
CoreClient.get_stats
def get_stats(self) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:33.
Source documentation:
Get engine statistics.CoreClient.list_keyspaces
def list_keyspaces(self) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/core.py:39.
Source documentation:
List all keyspaces.CoreClient.create_keyspace
def create_keyspace(self, name: str, model: str='document', config: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:45.
Source documentation:
Create a new keyspace.
Args:
name: Keyspace name.
model: Data model ("document", "kv", "graph", "vector", "timeseries").
config: Keyspace configuration.
Returns:
Created keyspace info.CoreClient.get_keyspace
def get_keyspace(self, name: str) -> Optional[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/core.py:70.
Source documentation:
Get keyspace info.CoreClient.delete_keyspace
def delete_keyspace(self, name: str) -> boolSource: minds-python-sdk/akasha/runtime/core.py:78.
Source documentation:
Delete a keyspace.CoreClient.store
def store(self, keyspace: str, item: dict[str, Any]) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:90.
Source documentation:
Store an item in a keyspace.
Args:
keyspace: Target keyspace.
item: Item to store (must have 'id' field).
Returns:
Stored item info.CoreClient.get
def get(self, keyspace: str, item_id: str) -> Optional[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/core.py:105.
Source documentation:
Get an item by ID.CoreClient.delete
def delete(self, keyspace: str, item_id: str) -> boolSource: minds-python-sdk/akasha/runtime/core.py:113.
Source documentation:
Delete an item.CoreClient.query
def query(self, keyspace: str, query: dict[str, Any], limit: int=100, offset: int=0) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/core.py:121.
Source documentation:
Query items in a keyspace.
Args:
keyspace: Target keyspace.
query: Query filter.
limit: Maximum results.
offset: Result offset.
Returns:
Matching items.CoreClient.text_search
def text_search(self, query: str, keyspaces: Optional[list[str]]=None, limit: int=100) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/core.py:149.
Source documentation:
Full-text search across keyspaces.
Args:
query: Search query.
keyspaces: Keyspaces to search (all if not specified).
limit: Maximum results.
Returns:
Search results.CoreClient.begin_transaction
def begin_transaction(self) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:178.
Source documentation:
Begin a new transaction.CoreClient.commit_transaction
def commit_transaction(self, tx_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:184.
Source documentation:
Commit a transaction.CoreClient.abort_transaction
def abort_transaction(self, tx_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:190.
Source documentation:
Abort a transaction.CoreClient.list_dataspaces
def list_dataspaces(self) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/core.py:200.
Source documentation:
List all dataspaces.CoreClient.switch_namespace
def switch_namespace(self, namespace: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:206.
Source documentation:
Switch to a different namespace.CoreClient.analyze
def analyze(self, keyspace: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:219.
Source documentation:
Analyze storage for optimization hints.
Args:
keyspace: Specific keyspace (all if not specified).
Returns:
Analysis results.CoreClient.compact
def compact(self, keyspace: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:236.
Source documentation:
Compact storage to reclaim space.
Args:
keyspace: Specific keyspace (all if not specified).
Returns:
Compaction results.CoreClient.reindex
def reindex(self, keyspace: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:253.
Source documentation:
Rebuild indexes.
Args:
keyspace: Specific keyspace (all if not specified).
Returns:
Reindex results.CoreClient.clear_cache
def clear_cache(self) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:270.
Source documentation:
Clear all caches.CoreClient.create_backup
def create_backup(self, name: Optional[str]=None, keyspaces: Optional[list[str]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:280.
Source documentation:
Create a backup.
Args:
name: Backup name.
keyspaces: Keyspaces to backup (all if not specified).
Returns:
Backup info.CoreClient.list_backups
def list_backups(self) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/core.py:305.
Source documentation:
List all backups.CoreClient.restore_backup
def restore_backup(self, backup_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:311.
Source documentation:
Restore from a backup.CoreClient.delete_backup
def delete_backup(self, backup_id: str) -> boolSource: minds-python-sdk/akasha/runtime/core.py:320.
Source documentation:
Delete a backup.CoreClient.create_replication_link
def create_replication_link(self, target_url: str, keyspaces: Optional[list[str]]=None, mode: str='async') -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:335.
Source documentation:
Create a replication link to another instance.
Args:
target_url: Target instance URL.
keyspaces: Keyspaces to replicate (all if not specified).
mode: Replication mode ("sync", "async").
Returns:
Link info.CoreClient.stop_replication
def stop_replication(self, link_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:360.
Source documentation:
Stop a replication link.CoreClient.get_replication_status
def get_replication_status(self, link_id: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/core.py:369.
Source documentation:
Get replication status.akasha/runtime/graph.py
GraphClient
class GraphClient()Source: minds-python-sdk/akasha/runtime/graph.py:12.
Source documentation:
Client for graph database operations.
Provides methods for creating, querying, and traversing graph data.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> node = runtime.graph.create_node(labels=["Person"], properties={"name": "Alice"})
>>> runtime.graph.create_edge(node.id, other_id, "KNOWS")GraphClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/graph.py:24.
GraphClient.create_node
def create_node(self, labels: list[str], properties: Optional[dict[str, Any]]=None, node_id: Optional[str]=None) -> GraphNodeSource: minds-python-sdk/akasha/runtime/graph.py:28.
Source documentation:
Create a new graph node.
Args:
labels: List of labels for the node (e.g., ["Person", "User"]).
properties: Node properties as key-value pairs.
node_id: Optional custom ID (auto-generated if not provided).
Returns:
Created GraphNode object.
Example:
>>> node = runtime.graph.create_node(
... labels=["Person"],
... properties={"name": "Alice", "age": 30}
... )GraphClient.get_node
def get_node(self, node_id: str) -> Optional[GraphNode]Source: minds-python-sdk/akasha/runtime/graph.py:63.
Source documentation:
Get a node by ID.
Args:
node_id: The node's unique identifier.
Returns:
GraphNode if found, None otherwise.
Example:
>>> node = runtime.graph.get_node("node-123")GraphClient.update_node
def update_node(self, node_id: str, properties: Optional[dict[str, Any]]=None, add_labels: Optional[list[str]]=None, remove_labels: Optional[list[str]]=None) -> GraphNodeSource: minds-python-sdk/akasha/runtime/graph.py:83.
Source documentation:
Update a node's properties or labels.
Args:
node_id: The node's unique identifier.
properties: Properties to set (merged with existing).
add_labels: Labels to add.
remove_labels: Labels to remove.
Returns:
Updated GraphNode object.
Example:
>>> node = runtime.graph.update_node(
... "node-123",
... properties={"age": 31},
... add_labels=["Premium"]
... )GraphClient.delete_node
def delete_node(self, node_id: str, detach: bool=False) -> boolSource: minds-python-sdk/akasha/runtime/graph.py:122.
Source documentation:
Delete a node.
Args:
node_id: The node's unique identifier.
detach: If True, also delete connected edges (default: False).
Returns:
True if deleted, False if not found.
Example:
>>> deleted = runtime.graph.delete_node("node-123", detach=True)GraphClient.create_edge
def create_edge(self, source_id: str, target_id: str, edge_type: str, properties: Optional[dict[str, Any]]=None, edge_id: Optional[str]=None) -> GraphEdgeSource: minds-python-sdk/akasha/runtime/graph.py:145.
Source documentation:
Create an edge between two nodes.
Args:
source_id: Source node ID.
target_id: Target node ID.
edge_type: Type/label of the edge (e.g., "KNOWS", "OWNS").
properties: Edge properties as key-value pairs.
edge_id: Optional custom ID (auto-generated if not provided).
Returns:
Created GraphEdge object.
Example:
>>> edge = runtime.graph.create_edge(
... "alice-id",
... "bob-id",
... "KNOWS",
... properties={"since": 2020}
... )GraphClient.get_edge
def get_edge(self, edge_id: str) -> Optional[GraphEdge]Source: minds-python-sdk/akasha/runtime/graph.py:188.
Source documentation:
Get an edge by ID.
Args:
edge_id: The edge's unique identifier.
Returns:
GraphEdge if found, None otherwise.GraphClient.delete_edge
def delete_edge(self, edge_id: str) -> boolSource: minds-python-sdk/akasha/runtime/graph.py:205.
Source documentation:
Delete an edge.
Args:
edge_id: The edge's unique identifier.
Returns:
True if deleted, False if not found.GraphClient.get_neighbors
def get_neighbors(self, node_id: str, direction: str='both', edge_types: Optional[list[str]]=None, labels: Optional[list[str]]=None, limit: int=100) -> list[GraphNode]Source: minds-python-sdk/akasha/runtime/graph.py:221.
Source documentation:
Get neighboring nodes.
Args:
node_id: The source node ID.
direction: Edge direction ("outgoing", "incoming", "both").
edge_types: Filter by edge types.
labels: Filter neighbors by labels.
limit: Maximum number of neighbors to return.
Returns:
List of neighboring GraphNode objects.
Example:
>>> friends = runtime.graph.get_neighbors(
... "alice-id",
... direction="outgoing",
... edge_types=["KNOWS"]
... )GraphClient.get_edges
def get_edges(self, node_id: str, direction: str='both', edge_types: Optional[list[str]]=None, limit: int=100) -> list[GraphEdge]Source: minds-python-sdk/akasha/runtime/graph.py:260.
Source documentation:
Get edges connected to a node.
Args:
node_id: The node ID.
direction: Edge direction ("outgoing", "incoming", "both").
edge_types: Filter by edge types.
limit: Maximum number of edges to return.
Returns:
List of GraphEdge objects.GraphClient.query
def query(self, cypher: str, parameters: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/graph.py:288.
Source documentation:
Execute a Cypher query.
Args:
cypher: The Cypher query string.
parameters: Query parameters.
Returns:
Query results with columns and rows.
Example:
>>> result = runtime.graph.query(
... "MATCH (p:Person)-[:KNOWS]->(f) WHERE p.name = $name RETURN f",
... parameters={"name": "Alice"}
... )
>>> for row in result["rows"]:
... print(row)GraphClient.shortest_path
def shortest_path(self, source_id: str, target_id: str, max_depth: int=10, edge_types: Optional[list[str]]=None) -> Optional[list[dict[str, Any]]]Source: minds-python-sdk/akasha/runtime/graph.py:315.
Source documentation:
Find the shortest path between two nodes.
Args:
source_id: Source node ID.
target_id: Target node ID.
max_depth: Maximum path length.
edge_types: Allowed edge types (all if not specified).
Returns:
List of path segments, or None if no path exists.
Example:
>>> path = runtime.graph.shortest_path("alice-id", "charlie-id")
>>> if path:
... print(f"Path length: {len(path)}")akasha/runtime/kv.py
KVClient
class KVClient()Source: minds-python-sdk/akasha/runtime/kv.py:12.
Source documentation:
Client for key-value store operations.
Provides methods for getting, setting, and deleting key-value pairs,
as well as batch operations and transactions.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> runtime.kv.set("user:123", {"name": "Alice", "age": 30})
>>> user = runtime.kv.get("user:123")KVClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/kv.py:25.
KVClient.get
def get(self, key: str, namespace: str='default') -> Optional[Any]Source: minds-python-sdk/akasha/runtime/kv.py:29.
Source documentation:
Get a value by key.
Args:
key: The key to retrieve.
namespace: Key namespace (default: "default").
Returns:
The value if found, None otherwise.
Example:
>>> value = runtime.kv.get("user:123")
>>> if value is not None:
... print(f"Found: {value}")KVClient.set
def set(self, key: str, value: Any, namespace: str='default', ttl_seconds: Optional[int]=None) -> NoneSource: minds-python-sdk/akasha/runtime/kv.py:55.
Source documentation:
Set a key-value pair.
Args:
key: The key to set.
value: The value to store (must be JSON-serializable).
namespace: Key namespace (default: "default").
ttl_seconds: Time-to-live in seconds (None for no expiration).
Example:
>>> runtime.kv.set("user:123", {"name": "Alice"})
>>> runtime.kv.set("session:abc", {"token": "xyz"}, ttl_seconds=3600)KVClient.delete
def delete(self, key: str, namespace: str='default') -> boolSource: minds-python-sdk/akasha/runtime/kv.py:82.
Source documentation:
Delete a key.
Args:
key: The key to delete.
namespace: Key namespace (default: "default").
Returns:
True if the key was deleted, False if it didn't exist.
Example:
>>> deleted = runtime.kv.delete("user:123")KVClient.exists
def exists(self, key: str, namespace: str='default') -> boolSource: minds-python-sdk/akasha/runtime/kv.py:105.
Source documentation:
Check if a key exists.
Args:
key: The key to check.
namespace: Key namespace (default: "default").
Returns:
True if the key exists, False otherwise.
Example:
>>> if runtime.kv.exists("user:123"):
... print("User exists")KVClient.list_keys
def list_keys(self, prefix: Optional[str]=None, namespace: str='default', limit: int=100, cursor: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/kv.py:126.
Source documentation:
List keys matching a prefix.
Args:
prefix: Key prefix filter.
namespace: Key namespace (default: "default").
limit: Maximum number of keys to return.
cursor: Pagination cursor from previous response.
Returns:
Dictionary with 'keys' list and optional 'cursor' for pagination.
Example:
>>> result = runtime.kv.list_keys(prefix="user:")
>>> for key in result["keys"]:
... print(key)KVClient.batch_get
def batch_get(self, keys: list[str], namespace: str='default') -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/kv.py:160.
Source documentation:
Get multiple keys in a single request.
Args:
keys: List of keys to retrieve.
namespace: Key namespace (default: "default").
Returns:
Dictionary mapping keys to their values (missing keys omitted).
Example:
>>> results = runtime.kv.batch_get(["user:1", "user:2", "user:3"])
>>> for key, value in results.items():
... print(f"{key}: {value}")KVClient.batch_set
def batch_set(self, items: dict[str, Any], namespace: str='default', ttl_seconds: Optional[int]=None) -> NoneSource: minds-python-sdk/akasha/runtime/kv.py:183.
Source documentation:
Set multiple key-value pairs in a single request.
Args:
items: Dictionary of key-value pairs to set.
namespace: Key namespace (default: "default").
ttl_seconds: TTL for all keys (None for no expiration).
Example:
>>> runtime.kv.batch_set({
... "user:1": {"name": "Alice"},
... "user:2": {"name": "Bob"},
... })KVClient.batch_delete
def batch_delete(self, keys: list[str], namespace: str='default') -> intSource: minds-python-sdk/akasha/runtime/kv.py:210.
Source documentation:
Delete multiple keys in a single request.
Args:
keys: List of keys to delete.
namespace: Key namespace (default: "default").
Returns:
Number of keys that were deleted.
Example:
>>> deleted_count = runtime.kv.batch_delete(["user:1", "user:2"])KVClient.increment
def increment(self, key: str, delta: int=1, namespace: str='default') -> intSource: minds-python-sdk/akasha/runtime/kv.py:231.
Source documentation:
Atomically increment a numeric value.
Args:
key: The key to increment.
delta: Amount to increment by (can be negative).
namespace: Key namespace (default: "default").
Returns:
The new value after incrementing.
Example:
>>> new_count = runtime.kv.increment("page_views", delta=1)akasha/runtime/memory.py
EpisodicMemoryClient
class EpisodicMemoryClient()Source: minds-python-sdk/akasha/runtime/memory.py:21.
Source documentation:
Client for episodic memory operations (temporal events).EpisodicMemoryClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/memory.py:24.
EpisodicMemoryClient.insert
def insert(self, event_type: str, content: dict[str, Any], timestamp: Optional[datetime]=None, tags: Optional[list[str]]=None, metadata: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:28.
Source documentation:
Insert an episodic event.
Args:
event_type: Type of event (e.g., "user_action", "system_event").
content: Event content/payload.
timestamp: Event timestamp (defaults to now).
tags: Optional tags for filtering.
metadata: Additional metadata.
Returns:
Created event with ID.EpisodicMemoryClient.get
def get(self, event_id: str) -> Optional[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:64.
Source documentation:
Get an episodic event by ID.EpisodicMemoryClient.update
def update(self, event_id: str, content: dict[str, Any]) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:72.
Source documentation:
Update an episodic event.EpisodicMemoryClient.delete
def delete(self, event_id: str) -> boolSource: minds-python-sdk/akasha/runtime/memory.py:78.
Source documentation:
Delete an episodic event.EpisodicMemoryClient.search
def search(self, query: Optional[str]=None, event_types: Optional[list[str]]=None, tags: Optional[list[str]]=None, start_time: Optional[datetime]=None, end_time: Optional[datetime]=None, limit: int=100) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:86.
Source documentation:
Search episodic events.EpisodicMemoryClient.range
def range(self, start_time: datetime, end_time: datetime, event_types: Optional[list[str]]=None, limit: int=1000) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:112.
Source documentation:
Get events in a time range.ProceduralMemoryClient
class ProceduralMemoryClient()Source: minds-python-sdk/akasha/runtime/memory.py:133.
Source documentation:
Client for procedural memory operations (workflows).ProceduralMemoryClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/memory.py:136.
ProceduralMemoryClient.store
def store(self, name: str, steps: list[dict[str, Any]], description: Optional[str]=None, tags: Optional[list[str]]=None, metadata: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:140.
Source documentation:
Store a procedure/workflow.ProceduralMemoryClient.list
def list(self, tags: Optional[list[str]]=None, limit: int=100) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:161.
Source documentation:
List all procedures.ProceduralMemoryClient.get
def get(self, procedure_id: str) -> Optional[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:170.
Source documentation:
Get a procedure by ID.ProceduralMemoryClient.update
def update(self, procedure_id: str, updates: dict[str, Any]) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:178.
Source documentation:
Update a procedure.ProceduralMemoryClient.delete
def delete(self, procedure_id: str) -> boolSource: minds-python-sdk/akasha/runtime/memory.py:187.
Source documentation:
Delete a procedure.ProceduralMemoryClient.search
def search(self, query: Optional[str]=None, tags: Optional[list[str]]=None, limit: int=100) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:195.
Source documentation:
Search procedures.ResourceMemoryClient
class ResourceMemoryClient()Source: minds-python-sdk/akasha/runtime/memory.py:213.
Source documentation:
Client for resource memory operations (documents/blobs).ResourceMemoryClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/memory.py:216.
ResourceMemoryClient.store
def store(self, name: str, resource_type: str, data: bytes, content_type: Optional[str]=None, tags: Optional[list[str]]=None, metadata: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:220.
Source documentation:
Store a resource (document/blob).ResourceMemoryClient.list
def list(self, resource_type: Optional[str]=None, tags: Optional[list[str]]=None, limit: int=100) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:246.
Source documentation:
List resources.ResourceMemoryClient.get
def get(self, resource_id: str) -> Optional[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:262.
Source documentation:
Get resource metadata by ID.ResourceMemoryClient.get_data
def get_data(self, resource_id: str) -> Optional[bytes]Source: minds-python-sdk/akasha/runtime/memory.py:270.
Source documentation:
Get resource binary data.ResourceMemoryClient.exists
def exists(self, resource_id: str) -> boolSource: minds-python-sdk/akasha/runtime/memory.py:279.
Source documentation:
Check if resource data exists.ResourceMemoryClient.get_size
def get_size(self, resource_id: str) -> intSource: minds-python-sdk/akasha/runtime/memory.py:285.
Source documentation:
Get resource data size in bytes.VaultMemoryClient
class VaultMemoryClient()Source: minds-python-sdk/akasha/runtime/memory.py:292.
Source documentation:
Client for vault memory operations (secure knowledge storage).VaultMemoryClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/memory.py:295.
VaultMemoryClient.store
def store(self, key: str, value: Any, sensitivity: str='normal', tags: Optional[list[str]]=None, metadata: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:299.
Source documentation:
Store a value in the vault.VaultMemoryClient.get
def get(self, key: str) -> Optional[Any]Source: minds-python-sdk/akasha/runtime/memory.py:322.
Source documentation:
Get a value from the vault.VaultMemoryClient.delete
def delete(self, key: str) -> boolSource: minds-python-sdk/akasha/runtime/memory.py:330.
Source documentation:
Delete a value from the vault.VaultMemoryClient.search
def search(self, query: Optional[str]=None, tags: Optional[list[str]]=None, sensitivity: Optional[str]=None, limit: int=100) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:338.
Source documentation:
Search vault entries (returns metadata, not values).CognitiveMemoryClient
class CognitiveMemoryClient()Source: minds-python-sdk/akasha/runtime/memory.py:359.
Source documentation:
Client for cognitive memory operations (thoughts, decisions, interactions).CognitiveMemoryClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/memory.py:362.
CognitiveMemoryClient.log_thought
def log_thought(self, content: str, context: Optional[dict[str, Any]]=None, confidence: Optional[float]=None, tags: Optional[list[str]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:366.
Source documentation:
Log a cognitive thought.CognitiveMemoryClient.log_decision
def log_decision(self, decision: str, options: list[str], rationale: str, outcome: Optional[str]=None, confidence: Optional[float]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:386.
Source documentation:
Log a decision.CognitiveMemoryClient.log_interaction
def log_interaction(self, interaction_type: str, input_data: Any, output_data: Any, metadata: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:409.
Source documentation:
Log an interaction.CognitiveMemoryClient.start_session
def start_session(self, session_type: str='default', metadata: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/memory.py:429.
Source documentation:
Start a new cognitive session.CognitiveMemoryClient.query
def query(self, log_type: Optional[str]=None, start_time: Optional[datetime]=None, end_time: Optional[datetime]=None, session_id: Optional[str]=None, limit: int=100) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:443.
Source documentation:
Query cognitive logs.MemoryClient
class MemoryClient()Source: minds-python-sdk/akasha/runtime/memory.py:467.
Source documentation:
Client for all memory system operations.
Provides access to:
- Episodic memory (temporal events)
- Procedural memory (workflows)
- Resource memory (documents/blobs)
- Vault (secure storage)
- Cognitive (thoughts/decisions/interactions)
- Hybrid retrievalMemoryClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/memory.py:480.
MemoryClient.episodic
def episodic(self) -> EpisodicMemoryClientSource: minds-python-sdk/akasha/runtime/memory.py:489.
Source documentation:
Access episodic memory (temporal events).MemoryClient.procedural
def procedural(self) -> ProceduralMemoryClientSource: minds-python-sdk/akasha/runtime/memory.py:496.
Source documentation:
Access procedural memory (workflows).MemoryClient.resources
def resources(self) -> ResourceMemoryClientSource: minds-python-sdk/akasha/runtime/memory.py:503.
Source documentation:
Access resource memory (documents/blobs).MemoryClient.vault
def vault(self) -> VaultMemoryClientSource: minds-python-sdk/akasha/runtime/memory.py:510.
Source documentation:
Access vault (secure storage).MemoryClient.cognitive
def cognitive(self) -> CognitiveMemoryClientSource: minds-python-sdk/akasha/runtime/memory.py:517.
Source documentation:
Access cognitive logs (thoughts/decisions/interactions).MemoryClient.hybrid_retrieval
def hybrid_retrieval(self, query: str, memory_types: Optional[list[str]]=None, top_k: int=10, filters: Optional[dict[str, Any]]=None) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/memory.py:523.
Source documentation:
Perform hybrid retrieval across memory systems.
Combines semantic search, keyword matching, and structured queries
to find relevant information across all memory types.akasha/runtime/mhn.py
MHNClient
class MHNClient()Source: minds-python-sdk/akasha/runtime/mhn.py:10.
Source documentation:
Client for Modern Hopfield Network operations.
Provides content-addressable memory using Modern Hopfield Networks
for pattern completion and associative retrieval.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> network = runtime.mhn.create(dimension=512, capacity=1000)
>>> runtime.mhn.store(network["id"], patterns)
>>> retrieved = runtime.mhn.retrieve(network["id"], partial_pattern)MHNClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/mhn.py:24.
MHNClient.create
def create(self, dimension: int, capacity: int=1000, beta: float=1.0, name: Optional[str]=None, config: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/mhn.py:28.
Source documentation:
Create a new Modern Hopfield Network.
Args:
dimension: Pattern dimension.
capacity: Maximum number of patterns to store.
beta: Inverse temperature parameter (controls sharpness).
name: Optional network name.
config: Additional configuration.
Returns:
Network info with ID.
Example:
>>> network = runtime.mhn.create(
... dimension=768, # e.g., BERT embedding size
... capacity=10000,
... beta=0.5
... )MHNClient.store
def store(self, network_id: str, patterns: list[list[float]], keys: Optional[list[str]]=None, metadata: Optional[list[dict[str, Any]]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/mhn.py:70.
Source documentation:
Store patterns in the network.
Args:
network_id: ID of the network.
patterns: List of patterns to store (each pattern is a float vector).
keys: Optional keys/identifiers for patterns.
metadata: Optional metadata for each pattern.
Returns:
Storage result.
Example:
>>> embeddings = [model.encode(text) for text in documents]
>>> runtime.mhn.store(
... network["id"],
... embeddings,
... keys=[f"doc_{i}" for i in range(len(documents))]
... )MHNClient.retrieve
def retrieve(self, network_id: str, query: list[float], top_k: int=1, iterations: int=1, include_scores: bool=True) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/mhn.py:110.
Source documentation:
Retrieve patterns using associative memory.
The query pattern is iteratively updated through the Hopfield
dynamics to converge to stored patterns.
Args:
network_id: ID of the network.
query: Query pattern (partial or noisy).
top_k: Number of patterns to retrieve.
iterations: Number of Hopfield iterations.
include_scores: Include similarity scores.
Returns:
Retrieved patterns with optional scores and metadata.
Example:
>>> # Retrieve with partial query
>>> results = runtime.mhn.retrieve(
... network["id"],
... partial_embedding,
... top_k=5
... )
>>> for result in results:
... print(f"{result['key']}: {result['score']:.4f}")MHNClient.delete_pattern
def delete_pattern(self, network_id: str, key: str) -> boolSource: minds-python-sdk/akasha/runtime/mhn.py:155.
Source documentation:
Delete a pattern by key.
Args:
network_id: ID of the network.
key: Pattern key to delete.
Returns:
True if deleted.MHNClient.get_stats
def get_stats(self, network_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/mhn.py:173.
Source documentation:
Get network statistics.
Args:
network_id: ID of the network.
Returns:
Statistics including pattern count, capacity usage, etc.MHNClient.clear
def clear(self, network_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/mhn.py:190.
Source documentation:
Clear all patterns from a network.
Args:
network_id: ID of the network.
Returns:
Clear confirmation.akasha/runtime/ml.py
MLClient
class MLClient()Source: minds-python-sdk/akasha/runtime/ml.py:10.
Source documentation:
Client for Machine Learning operations.
Provides methods for model management, embedding generation,
and vector index operations.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> runtime.ml.load_model("sentence-transformers/all-MiniLM-L6-v2")
>>> embeddings = runtime.ml.embed(["Hello world", "Goodbye world"])MLClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/ml.py:23.
MLClient.load_model
def load_model(self, model_id: str, model_type: str='embedding', config: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/ml.py:27.
Source documentation:
Load a model into the ML runtime.
Args:
model_id: Model identifier (path or HuggingFace model ID).
model_type: Type of model ("embedding", "classification", "generation").
config: Model configuration.
Returns:
Load result with model info.
Example:
>>> runtime.ml.load_model(
... "sentence-transformers/all-MiniLM-L6-v2",
... model_type="embedding"
... )MLClient.unload_model
def unload_model(self, model_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/ml.py:61.
Source documentation:
Unload a model from the ML runtime.
Args:
model_id: Model identifier.
Returns:
Unload confirmation.MLClient.list_models
def list_models(self) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/ml.py:76.
Source documentation:
List all loaded models.
Returns:
List of model info objects.MLClient.get_metrics
def get_metrics(self, model_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/ml.py:87.
Source documentation:
Get model metrics (latency, throughput, etc.).
Args:
model_id: Model identifier.
Returns:
Model metrics.MLClient.embed
def embed(self, texts: list[str], model_id: Optional[str]=None, batch_size: int=32) -> list[list[float]]Source: minds-python-sdk/akasha/runtime/ml.py:102.
Source documentation:
Generate embeddings for texts.
Args:
texts: Texts to embed.
model_id: Model to use (default model if not specified).
batch_size: Processing batch size.
Returns:
List of embedding vectors.
Example:
>>> embeddings = runtime.ml.embed([
... "The quick brown fox",
... "jumps over the lazy dog"
... ])MLClient.create_vector_index
def create_vector_index(self, name: str, dimension: int, metric: str='cosine', config: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/ml.py:136.
Source documentation:
Create a vector index.
Args:
name: Index name.
dimension: Vector dimension.
metric: Distance metric ("cosine", "euclidean", "dot").
config: HNSW configuration (ef_construction, M, etc.).
Returns:
Index creation result.MLClient.add_to_vector_index
def add_to_vector_index(self, index_name: str, vectors: list[list[float]], ids: list[str], metadata: Optional[list[dict[str, Any]]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/ml.py:167.
Source documentation:
Add vectors to an index.
Args:
index_name: Index name.
vectors: Vectors to add.
ids: Vector IDs.
metadata: Optional metadata for each vector.
Returns:
Add result.MLClient.search_vector_index
def search_vector_index(self, index_name: str, query: list[float], top_k: int=10, filter: Optional[dict[str, Any]]=None) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/ml.py:198.
Source documentation:
Search a vector index.
Args:
index_name: Index name.
query: Query vector.
top_k: Number of results.
filter: Metadata filter.
Returns:
Search results.MLClient.save_vector_index
def save_vector_index(self, index_name: str, path: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/ml.py:229.
Source documentation:
Save a vector index to disk.
Args:
index_name: Index name.
path: Save path.
Returns:
Save result.MLClient.list_vector_indices
def list_vector_indices(self) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/ml.py:245.
Source documentation:
List all vector indices.
Returns:
List of index info.akasha/runtime/neurosymbolic.py
NeurosymbolicClient
class NeurosymbolicClient()Source: minds-python-sdk/akasha/runtime/neurosymbolic.py:10.
Source documentation:
Client for neurosymbolic reasoning operations.
Combines neural pattern-matching with symbolic knowledge graphs
for hybrid reasoning with reduced hallucinations and improved traceability.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> result = runtime.neurosymbolic.retrieve(
... query="How does photosynthesis work?",
... reasoning_depth=3
... )NeurosymbolicClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/neurosymbolic.py:25.
NeurosymbolicClient.retrieve
def retrieve(self, query: str, context: Optional[dict[str, Any]]=None, reasoning_depth: int=2, include_evidence: bool=True, filters: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/neurosymbolic.py:29.
Source documentation:
Perform neurosymbolic retrieval.
Combines embedding-based semantic search with knowledge graph
traversal to retrieve relevant information with reasoning paths.
Args:
query: Natural language query.
context: Optional context for retrieval.
reasoning_depth: How many hops to traverse in knowledge graph.
include_evidence: Include evidence/provenance in results.
filters: Optional filters for retrieval.
Returns:
Retrieved information with reasoning traces.
Example:
>>> result = runtime.neurosymbolic.retrieve(
... "What are the causes of climate change?",
... reasoning_depth=3,
... include_evidence=True
... )
>>> for item in result["items"]:
... print(f"{item['content']} (confidence: {item['confidence']})")NeurosymbolicClient.find_paths
def find_paths(self, source: str, target: str, max_depth: int=5, path_type: Optional[str]=None, include_weights: bool=True) -> list[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/neurosymbolic.py:76.
Source documentation:
Find reasoning paths between concepts in the knowledge graph.
Args:
source: Source concept/entity.
target: Target concept/entity.
max_depth: Maximum path length.
path_type: Type of paths to find ("causal", "semantic", "all").
include_weights: Include edge weights in results.
Returns:
List of paths with nodes and edges.
Example:
>>> paths = runtime.neurosymbolic.find_paths(
... "carbon_dioxide",
... "global_warming",
... max_depth=4,
... path_type="causal"
... )NeurosymbolicClient.start_prefetch
def start_prefetch(self, topics: list[str], depth: int=2, background: bool=True) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/neurosymbolic.py:118.
Source documentation:
Start prefetching related knowledge for given topics.
Proactively loads knowledge graph nodes and embeddings
to reduce latency for subsequent queries.
Args:
topics: Topics to prefetch.
depth: Prefetch depth in knowledge graph.
background: Run prefetch in background.
Returns:
Prefetch job info.NeurosymbolicClient.stop_prefetch
def stop_prefetch(self, job_id: Optional[str]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/neurosymbolic.py:147.
Source documentation:
Stop prefetch job(s).
Args:
job_id: Specific job to stop (all if not specified).
Returns:
Stop confirmation.NeurosymbolicClient.get_cache_stats
def get_cache_stats(self) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/neurosymbolic.py:164.
Source documentation:
Get neurosymbolic cache statistics.
Returns:
Cache stats including hit rate, size, etc.akasha/runtime/snn.py
SNNClient
class SNNClient()Source: minds-python-sdk/akasha/runtime/snn.py:10.
Source documentation:
Client for Spiking Neural Network operations.
Provides methods for building, compiling, and running spiking neural networks
for temporal data processing.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> network = runtime.snn.build({
... "layers": [
... {"type": "input", "size": 784},
... {"type": "lif", "size": 256},
... {"type": "output", "size": 10}
... ]
... })
>>> runtime.snn.compile(network["id"])
>>> output = runtime.snn.step(network["id"], input_spikes)SNNClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/snn.py:30.
SNNClient.build
def build(self, architecture: dict[str, Any], name: Optional[str]=None, config: Optional[dict[str, Any]]=None) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/snn.py:34.
Source documentation:
Build a new spiking neural network.
Args:
architecture: Network architecture specification including:
- layers: List of layer definitions (input, lif, izh, output)
- connections: Optional explicit connection definitions
name: Optional network name.
config: Network configuration (dt, membrane decay, etc.).
Returns:
Network info with ID.
Example:
>>> network = runtime.snn.build({
... "layers": [
... {"type": "input", "size": 100},
... {"type": "lif", "size": 50, "tau_mem": 20.0},
... {"type": "output", "size": 10}
... ]
... })SNNClient.compile
def compile(self, network_id: str, optimization_level: int=1, target_device: str='cpu') -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/snn.py:72.
Source documentation:
Compile a network for execution.
Args:
network_id: ID of the network to compile.
optimization_level: Optimization level (0=none, 1=standard, 2=aggressive).
target_device: Target device ("cpu", "gpu", "neuromorphic").
Returns:
Compilation result.SNNClient.step
def step(self, network_id: str, input_spikes: list[list[float]], timesteps: int=1, record_state: bool=False) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/snn.py:98.
Source documentation:
Run one or more simulation timesteps.
Args:
network_id: ID of the compiled network.
input_spikes: Input spike trains (batch x input_size).
timesteps: Number of timesteps to simulate.
record_state: Whether to record intermediate states.
Returns:
Output spikes and optionally state history.
Example:
>>> result = runtime.snn.step(
... network["id"],
... [[1, 0, 1, 0, ...] for _ in range(batch_size)],
... timesteps=100
... )
>>> output_spikes = result["output_spikes"]SNNClient.train_bptt
def train_bptt(self, network_id: str, inputs: list[list[list[float]]], targets: list[list[float]], learning_rate: float=0.001, epochs: int=1, surrogate_gradient: str='fast_sigmoid') -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/snn.py:135.
Source documentation:
Train the network using Backpropagation Through Time (BPTT).
Args:
network_id: ID of the network to train.
inputs: Training inputs (samples x timesteps x input_size).
targets: Target outputs (samples x output_size).
learning_rate: Learning rate.
epochs: Number of training epochs.
surrogate_gradient: Surrogate gradient function for non-differentiable spikes.
Returns:
Training results including loss history.
Example:
>>> result = runtime.snn.train_bptt(
... network["id"],
... train_inputs,
... train_targets,
... learning_rate=0.01,
... epochs=10
... )
>>> print(f"Final loss: {result['final_loss']}")SNNClient.get_state
def get_state(self, network_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/snn.py:180.
Source documentation:
Get the current state of a network.
Args:
network_id: ID of the network.
Returns:
Network state including membrane potentials, spike counts, etc.SNNClient.reset_state
def reset_state(self, network_id: str) -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/snn.py:197.
Source documentation:
Reset a network's state to initial values.
Args:
network_id: ID of the network.
Returns:
Reset confirmation.akasha/runtime/vector.py
VectorClient
class VectorClient()Source: minds-python-sdk/akasha/runtime/vector.py:12.
Source documentation:
Client for vector search operations.
Provides methods for storing and searching vector embeddings
using HNSW (Hierarchical Navigable Small World) indexing.
Example:
>>> runtime = client.runtime("https://my-instance.akasha.ooo")
>>> runtime.vector.upsert("doc-1", embedding, metadata={"title": "Hello"})
>>> results = runtime.vector.search(query_embedding, top_k=10)VectorClient.__init__
def __init__(self, http_client: httpx.Client) -> NoneSource: minds-python-sdk/akasha/runtime/vector.py:25.
VectorClient.upsert
def upsert(self, id: str, vector: list[float], metadata: Optional[dict[str, Any]]=None, namespace: str='default') -> NoneSource: minds-python-sdk/akasha/runtime/vector.py:29.
Source documentation:
Insert or update a vector.
Args:
id: Unique identifier for the vector.
vector: The embedding vector.
metadata: Associated metadata for filtering.
namespace: Vector namespace (default: "default").
Example:
>>> embedding = model.encode("Hello, world!")
>>> runtime.vector.upsert(
... "doc-1",
... embedding.tolist(),
... metadata={"title": "Greeting", "category": "general"}
... )VectorClient.batch_upsert
def batch_upsert(self, vectors: list[dict[str, Any]], namespace: str='default') -> dict[str, int]Source: minds-python-sdk/akasha/runtime/vector.py:62.
Source documentation:
Insert or update multiple vectors in a single request.
Args:
vectors: List of vector objects with 'id', 'vector', and optional 'metadata'.
namespace: Vector namespace (default: "default").
Returns:
Dictionary with counts of inserted/updated vectors.
Example:
>>> vectors = [
... {"id": "doc-1", "vector": emb1, "metadata": {"title": "Doc 1"}},
... {"id": "doc-2", "vector": emb2, "metadata": {"title": "Doc 2"}},
... ]
>>> result = runtime.vector.batch_upsert(vectors)VectorClient.get
def get(self, id: str, namespace: str='default') -> Optional[dict[str, Any]]Source: minds-python-sdk/akasha/runtime/vector.py:89.
Source documentation:
Get a vector by ID.
Args:
id: The vector's unique identifier.
namespace: Vector namespace (default: "default").
Returns:
Vector data including vector and metadata, or None if not found.
Example:
>>> data = runtime.vector.get("doc-1")
>>> if data:
... print(f"Dimensions: {len(data['vector'])}")VectorClient.delete
def delete(self, id: str, namespace: str='default') -> boolSource: minds-python-sdk/akasha/runtime/vector.py:114.
Source documentation:
Delete a vector by ID.
Args:
id: The vector's unique identifier.
namespace: Vector namespace (default: "default").
Returns:
True if deleted, False if not found.
Example:
>>> deleted = runtime.vector.delete("doc-1")VectorClient.batch_delete
def batch_delete(self, ids: list[str], namespace: str='default') -> intSource: minds-python-sdk/akasha/runtime/vector.py:137.
Source documentation:
Delete multiple vectors.
Args:
ids: List of vector IDs to delete.
namespace: Vector namespace (default: "default").
Returns:
Number of vectors deleted.VectorClient.search
def search(self, vector: list[float], top_k: int=10, filter: Optional[dict[str, Any]]=None, namespace: str='default', include_vectors: bool=False, include_metadata: bool=True) -> list[VectorSearchResult]Source: minds-python-sdk/akasha/runtime/vector.py:155.
Source documentation:
Search for similar vectors.
Args:
vector: Query vector.
top_k: Number of results to return.
filter: Metadata filter for results.
namespace: Vector namespace (default: "default").
include_vectors: Include vectors in results.
include_metadata: Include metadata in results.
Returns:
List of VectorSearchResult objects sorted by similarity.
Example:
>>> query_embedding = model.encode("machine learning")
>>> results = runtime.vector.search(
... query_embedding.tolist(),
... top_k=5,
... filter={"category": "tech"}
... )
>>> for result in results:
... print(f"{result.id}: {result.score:.4f}")VectorClient.search_by_id
def search_by_id(self, id: str, top_k: int=10, filter: Optional[dict[str, Any]]=None, namespace: str='default', include_vectors: bool=False) -> list[VectorSearchResult]Source: minds-python-sdk/akasha/runtime/vector.py:203.
Source documentation:
Find similar vectors to an existing vector by ID.
Args:
id: ID of the vector to use as query.
top_k: Number of results to return.
filter: Metadata filter for results.
namespace: Vector namespace (default: "default").
include_vectors: Include vectors in results.
Returns:
List of VectorSearchResult objects (excludes the query vector).
Example:
>>> similar = runtime.vector.search_by_id("doc-1", top_k=5)VectorClient.update_metadata
def update_metadata(self, id: str, metadata: dict[str, Any], namespace: str='default', merge: bool=True) -> NoneSource: minds-python-sdk/akasha/runtime/vector.py:240.
Source documentation:
Update metadata for a vector without re-uploading the vector.
Args:
id: The vector's unique identifier.
metadata: New metadata values.
namespace: Vector namespace (default: "default").
merge: If True, merge with existing metadata; if False, replace.
Example:
>>> runtime.vector.update_metadata("doc-1", {"views": 100})VectorClient.count
def count(self, namespace: str='default', filter: Optional[dict[str, Any]]=None) -> intSource: minds-python-sdk/akasha/runtime/vector.py:267.
Source documentation:
Count vectors in a namespace.
Args:
namespace: Vector namespace (default: "default").
filter: Optional metadata filter.
Returns:
Number of vectors matching the criteria.
Example:
>>> total = runtime.vector.count()
>>> tech_docs = runtime.vector.count(filter={"category": "tech"})VectorClient.describe_index
def describe_index(self, namespace: str='default') -> dict[str, Any]Source: minds-python-sdk/akasha/runtime/vector.py:294.
Source documentation:
Get information about the vector index.
Args:
namespace: Vector namespace (default: "default").
Returns:
Index statistics including dimensions, count, and configuration.
Example:
>>> info = runtime.vector.describe_index()
>>> print(f"Dimensions: {info['dimensions']}")
>>> print(f"Total vectors: {info['count']}")akasha/types.py
AkashaConfig
class AkashaConfig(BaseModel)
base_url: str = Field(..., description='Base URL of the Akasha API')
api_key: str = Field(..., description='API key for authentication')
timeout: float = Field(default=30.0, description='Request timeout in seconds')
max_retries: int = Field(default=3, description='Maximum number of retries')
verify_ssl: bool = Field(default=True, description='Verify SSL certificates')Source: minds-python-sdk/akasha/types.py:19.
Source documentation:
Configuration for the Akasha client.TenantPlan
class TenantPlan(str, Enum)Source: minds-python-sdk/akasha/types.py:34.
Source documentation:
Tenant subscription plans.TenantStatus
class TenantStatus(str, Enum)Source: minds-python-sdk/akasha/types.py:43.
Source documentation:
Tenant status states.BackupStatus
class BackupStatus(str, Enum)Source: minds-python-sdk/akasha/types.py:53.
Source documentation:
Backup status states.HealthStatus
class HealthStatus(str, Enum)Source: minds-python-sdk/akasha/types.py:62.
Source documentation:
Health check status.ServiceType
class ServiceType(str, Enum)Source: minds-python-sdk/akasha/types.py:70.
Source documentation:
Akasha service types.TenantCapacity
class TenantCapacity(BaseModel)
storage_gb: int = Field(..., description='Storage capacity in GB')
memory_gb: int = Field(..., description='Memory capacity in GB')
cpu_cores: int = Field(..., description='CPU cores allocated')
max_connections: int = Field(..., description='Maximum concurrent connections')Source: minds-python-sdk/akasha/types.py:88.
Source documentation:
Tenant resource capacity limits.TenantServices
class TenantServices(BaseModel)
kv: bool = Field(default=True, description='Key-value store enabled')
graph: bool = Field(default=False, description='Graph database enabled')
vector: bool = Field(default=False, description='Vector search enabled')
analytics: bool = Field(default=False, description='Analytics engine enabled')
memory: bool = Field(default=False, description='Memory system enabled')
ml: bool = Field(default=False, description='ML inference enabled')Source: minds-python-sdk/akasha/types.py:97.
Source documentation:
Tenant enabled services.Tenant
class Tenant(BaseModel)
id: str = Field(..., description='Tenant unique identifier')
name: str = Field(..., description='Tenant name')
plan: TenantPlan = Field(..., description='Subscription plan')
status: TenantStatus = Field(..., description='Current status')
region: str = Field(..., description='Deployment region')
endpoint: Optional[str] = Field(None, description='Instance endpoint URL')
capacity: TenantCapacity = Field(..., description='Resource capacity')
services: TenantServices = Field(..., description='Enabled services')
created_at: datetime = Field(..., description='Creation timestamp')
updated_at: datetime = Field(..., description='Last update timestamp')
metadata: dict[str, Any] = Field(default_factory=dict, description='Custom metadata')Source: minds-python-sdk/akasha/types.py:108.
Source documentation:
Tenant model.CreateTenantRequest
class CreateTenantRequest(BaseModel)
name: str = Field(..., min_length=1, max_length=63, description='Tenant name')
plan: TenantPlan = Field(default=TenantPlan.FREE, description='Subscription plan')
region: str = Field(default='us-east-1', description='Deployment region')
services: Optional[TenantServices] = Field(None, description='Services to enable')
metadata: dict[str, Any] = Field(default_factory=dict, description='Custom metadata')Source: minds-python-sdk/akasha/types.py:124.
Source documentation:
Request to create a new tenant.UpdateTenantRequest
class UpdateTenantRequest(BaseModel)
name: Optional[str] = Field(None, description='New tenant name')
plan: Optional[TenantPlan] = Field(None, description='New subscription plan')
services: Optional[TenantServices] = Field(None, description='Services to update')
metadata: Optional[dict[str, Any]] = Field(None, description='Metadata to update')Source: minds-python-sdk/akasha/types.py:134.
Source documentation:
Request to update a tenant.Backup
class Backup(BaseModel)
id: str = Field(..., description='Backup unique identifier')
tenant_id: str = Field(..., description='Parent tenant ID')
name: str = Field(..., description='Backup name')
status: BackupStatus = Field(..., description='Current status')
size_bytes: int = Field(..., description='Backup size in bytes')
created_at: datetime = Field(..., description='Creation timestamp')
completed_at: Optional[datetime] = Field(None, description='Completion timestamp')
expires_at: Optional[datetime] = Field(None, description='Expiration timestamp')
metadata: dict[str, Any] = Field(default_factory=dict, description='Custom metadata')Source: minds-python-sdk/akasha/types.py:148.
Source documentation:
Backup model.CreateBackupRequest
class CreateBackupRequest(BaseModel)
name: Optional[str] = Field(None, description='Backup name (auto-generated if not provided)')
include_services: list[ServiceType] = Field(default_factory=list, description='Services to include (all if empty)')
retention_days: int = Field(default=30, description='Retention period in days')Source: minds-python-sdk/akasha/types.py:162.
Source documentation:
Request to create a new backup.RestoreBackupRequest
class RestoreBackupRequest(BaseModel)
target_tenant_id: Optional[str] = Field(None, description='Target tenant ID (same tenant if not provided)')
services: list[ServiceType] = Field(default_factory=list, description='Services to restore (all if empty)')Source: minds-python-sdk/akasha/types.py:173.
Source documentation:
Request to restore from a backup.UsageMetrics
class UsageMetrics(BaseModel)
tenant_id: str = Field(..., description='Tenant ID')
period_start: datetime = Field(..., description='Period start time')
period_end: datetime = Field(..., description='Period end time')
storage_used_bytes: int = Field(..., description='Storage used in bytes')
memory_used_bytes: int = Field(..., description='Memory used in bytes')
cpu_seconds: float = Field(..., description='CPU seconds consumed')
read_operations: int = Field(..., description='Read operations count')
write_operations: int = Field(..., description='Write operations count')
vector_queries: int = Field(..., description='Vector search queries')
graph_queries: int = Field(..., description='Graph queries')
analytics_queries: int = Field(..., description='Analytics queries')Source: minds-python-sdk/akasha/types.py:191.
Source documentation:
Usage metrics for a tenant.ServiceStatus
class ServiceStatus(BaseModel)
service: ServiceType = Field(..., description='Service type')
enabled: bool = Field(..., description='Whether service is enabled')
status: HealthStatus = Field(..., description='Service health status')
latency_ms: Optional[float] = Field(None, description='Average latency in ms')
error_rate: Optional[float] = Field(None, description='Error rate percentage')
last_check: datetime = Field(..., description='Last health check time')Source: minds-python-sdk/akasha/types.py:207.
Source documentation:
Status of an individual service.InstanceHealth
class InstanceHealth(BaseModel)
tenant_id: str = Field(..., description='Tenant ID')
status: HealthStatus = Field(..., description='Overall health status')
services: list[ServiceStatus] = Field(..., description='Individual service status')
uptime_seconds: int = Field(..., description='Uptime in seconds')
version: str = Field(..., description='Akasha version')
last_check: datetime = Field(..., description='Last health check time')Source: minds-python-sdk/akasha/types.py:218.
Source documentation:
Health status of an Akasha instance.KeyValue
class KeyValue(BaseModel)
key: str = Field(..., description='Key')
value: Any = Field(..., description='Value')
ttl_seconds: Optional[int] = Field(None, description='TTL in seconds')
created_at: Optional[datetime] = Field(None, description='Creation timestamp')
updated_at: Optional[datetime] = Field(None, description='Last update timestamp')Source: minds-python-sdk/akasha/types.py:234.
Source documentation:
Key-value pair.GraphNode
class GraphNode(BaseModel)
id: str = Field(..., description='Node ID')
labels: list[str] = Field(default_factory=list, description='Node labels')
properties: dict[str, Any] = Field(default_factory=dict, description='Node properties')Source: minds-python-sdk/akasha/types.py:244.
Source documentation:
Graph node.GraphEdge
class GraphEdge(BaseModel)
id: str = Field(..., description='Edge ID')
source_id: str = Field(..., description='Source node ID')
target_id: str = Field(..., description='Target node ID')
edge_type: str = Field(..., description='Edge type/label')
properties: dict[str, Any] = Field(default_factory=dict, description='Edge properties')Source: minds-python-sdk/akasha/types.py:252.
Source documentation:
Graph edge.VectorSearchResult
class VectorSearchResult(BaseModel)
id: str = Field(..., description='Document ID')
score: float = Field(..., description='Similarity score')
vector: Optional[list[float]] = Field(None, description='Document vector')
metadata: dict[str, Any] = Field(default_factory=dict, description='Document metadata')Source: minds-python-sdk/akasha/types.py:262.
Source documentation:
Vector search result.VectorSearchRequest
class VectorSearchRequest(BaseModel)
vector: list[float] = Field(..., description='Query vector')
top_k: int = Field(default=10, description='Number of results')
filter: Optional[dict[str, Any]] = Field(None, description='Metadata filter')
include_vectors: bool = Field(default=False, description='Include vectors in results')Source: minds-python-sdk/akasha/types.py:271.
Source documentation:
Vector search request.