# Python SDK reference

Every discovered public declaration and client signature in the local python SDK source.

Source: https://docs.minds.sh/docs/developers/reference/python



This reference lists **265 source declarations** from **21 files**. It preserves signatures and types rather than assuming identical APIs across languages. See [SDK compatibility](/docs/developers/compatibility) before using a method against a deployed instance.

## akasha/**init**.py [#akashainitpy]

### `__all__` [#__all__]

```python
__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 [#akashaclientpy]

### `AkashaClient` [#akashaclient]

```python
class AkashaClient()
```

Source: `minds-python-sdk/akasha/client.py:26`.

Source documentation:

```text
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__` [#akashaclient__init__]

```python
def __init__(self, base_url: str, api_key: str, timeout: float=30.0, max_retries: int=3, verify_ssl: bool=True) -> None
```

Source: `minds-python-sdk/akasha/client.py:49`.

### `AkashaClient.control_plane` [#akashaclientcontrol_plane]

```python
def control_plane(self) -> ControlPlaneClient
```

Source: `minds-python-sdk/akasha/client.py:82`.

Source documentation:

```text
Access Control Plane APIs.

Provides access to tenant management, backups, and monitoring.

Returns:
    ControlPlaneClient instance.
```

### `AkashaClient.runtime` [#akashaclientruntime]

```python
def runtime(self, instance_url: str) -> RuntimeClient
```

Source: `minds-python-sdk/akasha/client.py:95`.

Source documentation:

```text
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` [#akashaclientrequest]

```python
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:

```text
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` [#akashaclientclose]

```python
def close(self) -> None
```

Source: `minds-python-sdk/akasha/client.py:199`.

Source documentation:

```text
Close the HTTP client and release resources.
```

## akasha/control\_plane/**init**.py [#akashacontrol_planeinitpy]

### `ControlPlaneClient` [#controlplaneclient]

```python
class ControlPlaneClient()
```

Source: `minds-python-sdk/akasha/control_plane/__init__.py:12`.

Source documentation:

```text
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__` [#controlplaneclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/control_plane/__init__.py:22`.

### `ControlPlaneClient.tenants` [#controlplaneclienttenants]

```python
def tenants(self) -> TenantClient
```

Source: `minds-python-sdk/akasha/control_plane/__init__.py:29`.

Source documentation:

```text
Access tenant management APIs.
```

### `ControlPlaneClient.backups` [#controlplaneclientbackups]

```python
def backups(self) -> BackupClient
```

Source: `minds-python-sdk/akasha/control_plane/__init__.py:36`.

Source documentation:

```text
Access backup management APIs.
```

### `ControlPlaneClient.monitoring` [#controlplaneclientmonitoring]

```python
def monitoring(self) -> MonitoringClient
```

Source: `minds-python-sdk/akasha/control_plane/__init__.py:43`.

Source documentation:

```text
Access monitoring and metrics APIs.
```

### `__all__` [#__all__-1]

```python
__all__ = ['ControlPlaneClient', 'TenantClient', 'BackupClient', 'MonitoringClient']
```

Source: `minds-python-sdk/akasha/control_plane/__init__.py:50`.

## akasha/control\_plane/backup.py [#akashacontrol_planebackuppy]

### `BackupClient` [#backupclient]

```python
class BackupClient()
```

Source: `minds-python-sdk/akasha/control_plane/backup.py:19`.

Source documentation:

```text
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__` [#backupclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/control_plane/backup.py:31`.

### `BackupClient.create` [#backupclientcreate]

```python
def create(self, tenant_id: str, name: Optional[str]=None, include_services: Optional[list[ServiceType]]=None, retention_days: int=30) -> Backup
```

Source: `minds-python-sdk/akasha/control_plane/backup.py:37`.

Source documentation:

```text
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` [#backupclientget]

```python
def get(self, tenant_id: str, backup_id: str) -> Backup
```

Source: `minds-python-sdk/akasha/control_plane/backup.py:80`.

Source documentation:

```text
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` [#backupclientlist]

```python
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:

```text
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` [#backupclientdelete]

```python
def delete(self, tenant_id: str, backup_id: str) -> None
```

Source: `minds-python-sdk/akasha/control_plane/backup.py:134`.

Source documentation:

```text
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` [#backupclientrestore]

```python
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:

```text
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 [#akashacontrol_planemonitoringpy]

### `MonitoringClient` [#monitoringclient]

```python
class MonitoringClient()
```

Source: `minds-python-sdk/akasha/control_plane/monitoring.py:13`.

Source documentation:

```text
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__` [#monitoringclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/control_plane/monitoring.py:26`.

### `MonitoringClient.get_health` [#monitoringclientget_health]

```python
def get_health(self, tenant_id: str) -> InstanceHealth
```

Source: `minds-python-sdk/akasha/control_plane/monitoring.py:29`.

Source documentation:

```text
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` [#monitoringclientget_usage]

```python
def get_usage(self, tenant_id: str, start_time: Optional[datetime]=None, end_time: Optional[datetime]=None) -> UsageMetrics
```

Source: `minds-python-sdk/akasha/control_plane/monitoring.py:52`.

Source documentation:

```text
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` [#monitoringclientget_metrics]

```python
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:

```text
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` [#monitoringclientget_services_status]

```python
def get_services_status(self, instance_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/control_plane/monitoring.py:132`.

Source documentation:

```text
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` [#monitoringclientget_alerts]

```python
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:

```text
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 [#akashacontrol_planetenantpy]

### `TenantClient` [#tenantclient]

```python
class TenantClient()
```

Source: `minds-python-sdk/akasha/control_plane/tenant.py:19`.

Source documentation:

```text
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__` [#tenantclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/control_plane/tenant.py:32`.

### `TenantClient.create` [#tenantclientcreate]

```python
def create(self, name: str, plan: TenantPlan=TenantPlan.FREE, region: str='us-east-1', services: Optional[TenantServices]=None, metadata: Optional[dict[str, Any]]=None) -> Tenant
```

Source: `minds-python-sdk/akasha/control_plane/tenant.py:36`.

Source documentation:

```text
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` [#tenantclientget]

```python
def get(self, tenant_id: str) -> Tenant
```

Source: `minds-python-sdk/akasha/control_plane/tenant.py:81`.

Source documentation:

```text
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` [#tenantclientlist]

```python
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:

```text
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` [#tenantclientupdate]

```python
def update(self, tenant_id: str, name: Optional[str]=None, plan: Optional[TenantPlan]=None, services: Optional[TenantServices]=None, metadata: Optional[dict[str, Any]]=None) -> Tenant
```

Source: `minds-python-sdk/akasha/control_plane/tenant.py:137`.

Source documentation:

```text
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` [#tenantclientdelete]

```python
def delete(self, tenant_id: str) -> None
```

Source: `minds-python-sdk/akasha/control_plane/tenant.py:179`.

Source documentation:

```text
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` [#tenantclientenable_services]

```python
def enable_services(self, tenant_id: str, services: list[str]) -> Tenant
```

Source: `minds-python-sdk/akasha/control_plane/tenant.py:197`.

Source documentation:

```text
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` [#tenantclientdisable_services]

```python
def disable_services(self, tenant_id: str, services: list[str]) -> Tenant
```

Source: `minds-python-sdk/akasha/control_plane/tenant.py:219`.

Source documentation:

```text
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` [#tenantclientget_status]

```python
def get_status(self, tenant_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/control_plane/tenant.py:241`.

Source documentation:

```text
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 [#akashaexceptionspy]

### `AkashaError` [#akashaerror]

```python
class AkashaError(Exception)
```

Source: `minds-python-sdk/akasha/exceptions.py:10`.

Source documentation:

```text
Base exception for all Akasha SDK errors.
```

### `AkashaError.__init__` [#akashaerror__init__]

```python
def __init__(self, message: str, status_code: Optional[int]=None, response_body: Optional[dict[str, Any]]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:13`.

### `AuthenticationError` [#authenticationerror]

```python
class AuthenticationError(AkashaError)
```

Source: `minds-python-sdk/akasha/exceptions.py:30`.

Source documentation:

```text
Raised when authentication fails (401 Unauthorized).
```

### `AuthenticationError.__init__` [#authenticationerror__init__]

```python
def __init__(self, message: str='Authentication failed. Check your API key.', response_body: Optional[dict[str, Any]]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:33`.

### `AuthorizationError` [#authorizationerror]

```python
class AuthorizationError(AkashaError)
```

Source: `minds-python-sdk/akasha/exceptions.py:41`.

Source documentation:

```text
Raised when authorization fails (403 Forbidden).
```

### `AuthorizationError.__init__` [#authorizationerror__init__]

```python
def __init__(self, message: str='Access denied. Insufficient permissions.', response_body: Optional[dict[str, Any]]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:44`.

### `NotFoundError` [#notfounderror]

```python
class NotFoundError(AkashaError)
```

Source: `minds-python-sdk/akasha/exceptions.py:52`.

Source documentation:

```text
Raised when a resource is not found (404 Not Found).
```

### `NotFoundError.__init__` [#notfounderror__init__]

```python
def __init__(self, resource: str='Resource', resource_id: Optional[str]=None, response_body: Optional[dict[str, Any]]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:55`.

### `ValidationError` [#validationerror]

```python
class ValidationError(AkashaError)
```

Source: `minds-python-sdk/akasha/exceptions.py:68`.

Source documentation:

```text
Raised when request validation fails (400 Bad Request).
```

### `ValidationError.__init__` [#validationerror__init__]

```python
def __init__(self, message: str='Invalid request parameters.', errors: Optional[list[dict[str, Any]]]=None, response_body: Optional[dict[str, Any]]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:71`.

### `ConflictError` [#conflicterror]

```python
class ConflictError(AkashaError)
```

Source: `minds-python-sdk/akasha/exceptions.py:81`.

Source documentation:

```text
Raised when there's a conflict (409 Conflict).
```

### `ConflictError.__init__` [#conflicterror__init__]

```python
def __init__(self, message: str='Resource conflict.', response_body: Optional[dict[str, Any]]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:84`.

### `RateLimitError` [#ratelimiterror]

```python
class RateLimitError(AkashaError)
```

Source: `minds-python-sdk/akasha/exceptions.py:92`.

Source documentation:

```text
Raised when rate limit is exceeded (429 Too Many Requests).
```

### `RateLimitError.__init__` [#ratelimiterror__init__]

```python
def __init__(self, message: str='Rate limit exceeded. Please retry later.', retry_after: Optional[int]=None, response_body: Optional[dict[str, Any]]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:95`.

### `ServerError` [#servererror]

```python
class ServerError(AkashaError)
```

Source: `minds-python-sdk/akasha/exceptions.py:105`.

Source documentation:

```text
Raised when a server error occurs (5xx).
```

### `ServerError.__init__` [#servererror__init__]

```python
def __init__(self, message: str='Internal server error.', status_code: int=500, response_body: Optional[dict[str, Any]]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:108`.

### `ConnectionError` [#connectionerror]

```python
class ConnectionError(AkashaError)
```

Source: `minds-python-sdk/akasha/exceptions.py:117`.

Source documentation:

```text
Raised when unable to connect to the Akasha API.
```

### `ConnectionError.__init__` [#connectionerror__init__]

```python
def __init__(self, message: str='Unable to connect to Akasha API.', original_error: Optional[Exception]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:120`.

### `TimeoutError` [#timeouterror]

```python
class TimeoutError(AkashaError)
```

Source: `minds-python-sdk/akasha/exceptions.py:129`.

Source documentation:

```text
Raised when a request times out.
```

### `TimeoutError.__init__` [#timeouterror__init__]

```python
def __init__(self, message: str='Request timed out.', timeout_seconds: Optional[float]=None) -> None
```

Source: `minds-python-sdk/akasha/exceptions.py:132`.

## akasha/runtime/**init**.py [#akasharuntimeinitpy]

### `RuntimeClient` [#runtimeclient]

```python
class RuntimeClient()
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:34`.

Source documentation:

```text
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__` [#runtimeclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:65`.

### `RuntimeClient.core` [#runtimeclientcore]

```python
def core(self) -> CoreClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:81`.

Source documentation:

```text
Access core storage operations (keyspaces, transactions, maintenance).
```

### `RuntimeClient.kv` [#runtimeclientkv]

```python
def kv(self) -> KVClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:88`.

Source documentation:

```text
Access key-value store operations.
```

### `RuntimeClient.graph` [#runtimeclientgraph]

```python
def graph(self) -> GraphClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:95`.

Source documentation:

```text
Access graph database operations.
```

### `RuntimeClient.vector` [#runtimeclientvector]

```python
def vector(self) -> VectorClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:102`.

Source documentation:

```text
Access vector search operations.
```

### `RuntimeClient.analytics` [#runtimeclientanalytics]

```python
def analytics(self) -> AnalyticsClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:109`.

Source documentation:

```text
Access SQL analytics operations.
```

### `RuntimeClient.memory` [#runtimeclientmemory]

```python
def memory(self) -> MemoryClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:116`.

Source documentation:

```text
Access multi-modal memory operations.
```

### `RuntimeClient.ml` [#runtimeclientml]

```python
def ml(self) -> MLClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:123`.

Source documentation:

```text
Access machine learning operations.
```

### `RuntimeClient.snn` [#runtimeclientsnn]

```python
def snn(self) -> SNNClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:130`.

Source documentation:

```text
Access spiking neural network operations.
```

### `RuntimeClient.neurosymbolic` [#runtimeclientneurosymbolic]

```python
def neurosymbolic(self) -> NeurosymbolicClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:137`.

Source documentation:

```text
Access neurosymbolic reasoning operations.
```

### `RuntimeClient.continual` [#runtimeclientcontinual]

```python
def continual(self) -> ContinualClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:144`.

Source documentation:

```text
Access continual learning operations.
```

### `RuntimeClient.mhn` [#runtimeclientmhn]

```python
def mhn(self) -> MHNClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:151`.

Source documentation:

```text
Access Modern Hopfield Network operations.
```

### `RuntimeClient.brain` [#runtimeclientbrain]

```python
def brain(self) -> CognitiveBrainClient
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:158`.

Source documentation:

```text
Access MCP cognitive brain operations (remember, recall, forget, reflect, introspect).
```

### `RuntimeClient.close` [#runtimeclientclose]

```python
def close(self) -> None
```

Source: `minds-python-sdk/akasha/runtime/__init__.py:164`.

Source documentation:

```text
Close the HTTP client.
```

### `__all__` [#__all__-2]

```python
__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 [#akasharuntimeanalyticspy]

### `AnalyticsClient` [#analyticsclient]

```python
class AnalyticsClient()
```

Source: `minds-python-sdk/akasha/runtime/analytics.py:10`.

Source documentation:

```text
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__` [#analyticsclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/analytics.py:22`.

### `AnalyticsClient.sql` [#analyticsclientsql]

```python
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:

```text
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` [#analyticsclientregister_csv_source]

```python
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:

```text
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` [#analyticsclientregister_parquet_source]

```python
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:

```text
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` [#analyticsclientregister_core_source]

```python
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:

```text
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` [#analyticsclientset_options]

```python
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:

```text
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` [#analyticsclientclear_cache]

```python
def clear_cache(self) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/analytics.py:192`.

Source documentation:

```text
Clear the analytics query cache.

Returns:
    Cache clear result.
```

### `AnalyticsClient.get_cache_stats` [#analyticsclientget_cache_stats]

```python
def get_cache_stats(self) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/analytics.py:203`.

Source documentation:

```text
Get analytics cache statistics.

Returns:
    Cache statistics including hit rate, size, etc.
```

## akasha/runtime/cognitive.py [#akasharuntimecognitivepy]

### `CognitiveBrainClient` [#cognitivebrainclient]

```python
class CognitiveBrainClient()
```

Source: `minds-python-sdk/akasha/runtime/cognitive.py:17`.

Source documentation:

```text
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__` [#cognitivebrainclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/cognitive.py:34`.

### `CognitiveBrainClient.remember` [#cognitivebrainclientremember]

```python
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:

```text
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` [#cognitivebrainclientrecall]

```python
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:

```text
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` [#cognitivebrainclientforget]

```python
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:

```text
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` [#cognitivebrainclientreflect]

```python
def reflect(self, topic: Optional[str]=None) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/cognitive.py:165`.

Source documentation:

```text
Generate reflections on stored memories.

Args:
    topic: Optional topic to focus reflection on.

Returns:
    Dict with insights, patterns, connections, and recommendations.
```

### `CognitiveBrainClient.introspect` [#cognitivebrainclientintrospect]

```python
def introspect(self, aspect: Optional[str]=None) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/cognitive.py:183`.

Source documentation:

```text
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` [#cognitivebrainclientcall_tool]

```python
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:

```text
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` [#cognitivebrainclientlist_tools]

```python
def list_tools(self) -> list[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/cognitive.py:216`.

Source documentation:

```text
List available MCP tools.

Returns:
    List of tool descriptions with name, description, and tier.
```

## akasha/runtime/continual.py [#akasharuntimecontinualpy]

### `ContinualClient` [#continualclient]

```python
class ContinualClient()
```

Source: `minds-python-sdk/akasha/runtime/continual.py:10`.

Source documentation:

```text
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__` [#continualclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/continual.py:23`.

### `ContinualClient.create_checkpoint` [#continualclientcreate_checkpoint]

```python
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:

```text
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` [#continualclientget_checkpoint_status]

```python
def get_checkpoint_status(self, checkpoint_id: Optional[str]=None) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/continual.py:64`.

Source documentation:

```text
Get checkpoint status.

Args:
    checkpoint_id: Specific checkpoint (latest if not specified).

Returns:
    Checkpoint status and metadata.
```

### `ContinualClient.recover` [#continualclientrecover]

```python
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:

```text
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` [#continualclientregister_component]

```python
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:

```text
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` [#continualclientunregister_component]

```python
def unregister_component(self, name: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/continual.py:154`.

Source documentation:

```text
Unregister a component.

Args:
    name: Component name.

Returns:
    True if unregistered, False if not found.
```

### `ContinualClient.list_components` [#continualclientlist_components]

```python
def list_components(self) -> list[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/continual.py:170`.

Source documentation:

```text
List all registered components.

Returns:
    List of component info.
```

## akasha/runtime/core.py [#akasharuntimecorepy]

### `CoreClient` [#coreclient]

```python
class CoreClient()
```

Source: `minds-python-sdk/akasha/runtime/core.py:12`.

Source documentation:

```text
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__` [#coreclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/core.py:25`.

### `CoreClient.get_stats` [#coreclientget_stats]

```python
def get_stats(self) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:33`.

Source documentation:

```text
Get engine statistics.
```

### `CoreClient.list_keyspaces` [#coreclientlist_keyspaces]

```python
def list_keyspaces(self) -> list[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/core.py:39`.

Source documentation:

```text
List all keyspaces.
```

### `CoreClient.create_keyspace` [#coreclientcreate_keyspace]

```python
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:

```text
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` [#coreclientget_keyspace]

```python
def get_keyspace(self, name: str) -> Optional[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/core.py:70`.

Source documentation:

```text
Get keyspace info.
```

### `CoreClient.delete_keyspace` [#coreclientdelete_keyspace]

```python
def delete_keyspace(self, name: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/core.py:78`.

Source documentation:

```text
Delete a keyspace.
```

### `CoreClient.store` [#coreclientstore]

```python
def store(self, keyspace: str, item: dict[str, Any]) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:90`.

Source documentation:

```text
Store an item in a keyspace.

Args:
    keyspace: Target keyspace.
    item: Item to store (must have 'id' field).

Returns:
    Stored item info.
```

### `CoreClient.get` [#coreclientget]

```python
def get(self, keyspace: str, item_id: str) -> Optional[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/core.py:105`.

Source documentation:

```text
Get an item by ID.
```

### `CoreClient.delete` [#coreclientdelete]

```python
def delete(self, keyspace: str, item_id: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/core.py:113`.

Source documentation:

```text
Delete an item.
```

### `CoreClient.query` [#coreclientquery]

```python
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:

```text
Query items in a keyspace.

Args:
    keyspace: Target keyspace.
    query: Query filter.
    limit: Maximum results.
    offset: Result offset.

Returns:
    Matching items.
```

### `CoreClient.text_search` [#coreclienttext_search]

```python
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:

```text
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` [#coreclientbegin_transaction]

```python
def begin_transaction(self) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:178`.

Source documentation:

```text
Begin a new transaction.
```

### `CoreClient.commit_transaction` [#coreclientcommit_transaction]

```python
def commit_transaction(self, tx_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:184`.

Source documentation:

```text
Commit a transaction.
```

### `CoreClient.abort_transaction` [#coreclientabort_transaction]

```python
def abort_transaction(self, tx_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:190`.

Source documentation:

```text
Abort a transaction.
```

### `CoreClient.list_dataspaces` [#coreclientlist_dataspaces]

```python
def list_dataspaces(self) -> list[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/core.py:200`.

Source documentation:

```text
List all dataspaces.
```

### `CoreClient.switch_namespace` [#coreclientswitch_namespace]

```python
def switch_namespace(self, namespace: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:206`.

Source documentation:

```text
Switch to a different namespace.
```

### `CoreClient.analyze` [#coreclientanalyze]

```python
def analyze(self, keyspace: Optional[str]=None) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:219`.

Source documentation:

```text
Analyze storage for optimization hints.

Args:
    keyspace: Specific keyspace (all if not specified).

Returns:
    Analysis results.
```

### `CoreClient.compact` [#coreclientcompact]

```python
def compact(self, keyspace: Optional[str]=None) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:236`.

Source documentation:

```text
Compact storage to reclaim space.

Args:
    keyspace: Specific keyspace (all if not specified).

Returns:
    Compaction results.
```

### `CoreClient.reindex` [#coreclientreindex]

```python
def reindex(self, keyspace: Optional[str]=None) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:253`.

Source documentation:

```text
Rebuild indexes.

Args:
    keyspace: Specific keyspace (all if not specified).

Returns:
    Reindex results.
```

### `CoreClient.clear_cache` [#coreclientclear_cache]

```python
def clear_cache(self) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:270`.

Source documentation:

```text
Clear all caches.
```

### `CoreClient.create_backup` [#coreclientcreate_backup]

```python
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:

```text
Create a backup.

Args:
    name: Backup name.
    keyspaces: Keyspaces to backup (all if not specified).

Returns:
    Backup info.
```

### `CoreClient.list_backups` [#coreclientlist_backups]

```python
def list_backups(self) -> list[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/core.py:305`.

Source documentation:

```text
List all backups.
```

### `CoreClient.restore_backup` [#coreclientrestore_backup]

```python
def restore_backup(self, backup_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:311`.

Source documentation:

```text
Restore from a backup.
```

### `CoreClient.delete_backup` [#coreclientdelete_backup]

```python
def delete_backup(self, backup_id: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/core.py:320`.

Source documentation:

```text
Delete a backup.
```

### `CoreClient.create_replication_link` [#coreclientcreate_replication_link]

```python
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:

```text
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` [#coreclientstop_replication]

```python
def stop_replication(self, link_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:360`.

Source documentation:

```text
Stop a replication link.
```

### `CoreClient.get_replication_status` [#coreclientget_replication_status]

```python
def get_replication_status(self, link_id: Optional[str]=None) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/core.py:369`.

Source documentation:

```text
Get replication status.
```

## akasha/runtime/graph.py [#akasharuntimegraphpy]

### `GraphClient` [#graphclient]

```python
class GraphClient()
```

Source: `minds-python-sdk/akasha/runtime/graph.py:12`.

Source documentation:

```text
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__` [#graphclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/graph.py:24`.

### `GraphClient.create_node` [#graphclientcreate_node]

```python
def create_node(self, labels: list[str], properties: Optional[dict[str, Any]]=None, node_id: Optional[str]=None) -> GraphNode
```

Source: `minds-python-sdk/akasha/runtime/graph.py:28`.

Source documentation:

```text
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` [#graphclientget_node]

```python
def get_node(self, node_id: str) -> Optional[GraphNode]
```

Source: `minds-python-sdk/akasha/runtime/graph.py:63`.

Source documentation:

```text
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` [#graphclientupdate_node]

```python
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) -> GraphNode
```

Source: `minds-python-sdk/akasha/runtime/graph.py:83`.

Source documentation:

```text
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` [#graphclientdelete_node]

```python
def delete_node(self, node_id: str, detach: bool=False) -> bool
```

Source: `minds-python-sdk/akasha/runtime/graph.py:122`.

Source documentation:

```text
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` [#graphclientcreate_edge]

```python
def create_edge(self, source_id: str, target_id: str, edge_type: str, properties: Optional[dict[str, Any]]=None, edge_id: Optional[str]=None) -> GraphEdge
```

Source: `minds-python-sdk/akasha/runtime/graph.py:145`.

Source documentation:

```text
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` [#graphclientget_edge]

```python
def get_edge(self, edge_id: str) -> Optional[GraphEdge]
```

Source: `minds-python-sdk/akasha/runtime/graph.py:188`.

Source documentation:

```text
Get an edge by ID.

Args:
    edge_id: The edge's unique identifier.

Returns:
    GraphEdge if found, None otherwise.
```

### `GraphClient.delete_edge` [#graphclientdelete_edge]

```python
def delete_edge(self, edge_id: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/graph.py:205`.

Source documentation:

```text
Delete an edge.

Args:
    edge_id: The edge's unique identifier.

Returns:
    True if deleted, False if not found.
```

### `GraphClient.get_neighbors` [#graphclientget_neighbors]

```python
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:

```text
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` [#graphclientget_edges]

```python
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:

```text
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` [#graphclientquery]

```python
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:

```text
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` [#graphclientshortest_path]

```python
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:

```text
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 [#akasharuntimekvpy]

### `KVClient` [#kvclient]

```python
class KVClient()
```

Source: `minds-python-sdk/akasha/runtime/kv.py:12`.

Source documentation:

```text
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__` [#kvclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/kv.py:25`.

### `KVClient.get` [#kvclientget]

```python
def get(self, key: str, namespace: str='default') -> Optional[Any]
```

Source: `minds-python-sdk/akasha/runtime/kv.py:29`.

Source documentation:

```text
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` [#kvclientset]

```python
def set(self, key: str, value: Any, namespace: str='default', ttl_seconds: Optional[int]=None) -> None
```

Source: `minds-python-sdk/akasha/runtime/kv.py:55`.

Source documentation:

```text
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` [#kvclientdelete]

```python
def delete(self, key: str, namespace: str='default') -> bool
```

Source: `minds-python-sdk/akasha/runtime/kv.py:82`.

Source documentation:

```text
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` [#kvclientexists]

```python
def exists(self, key: str, namespace: str='default') -> bool
```

Source: `minds-python-sdk/akasha/runtime/kv.py:105`.

Source documentation:

```text
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` [#kvclientlist_keys]

```python
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:

```text
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` [#kvclientbatch_get]

```python
def batch_get(self, keys: list[str], namespace: str='default') -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/kv.py:160`.

Source documentation:

```text
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` [#kvclientbatch_set]

```python
def batch_set(self, items: dict[str, Any], namespace: str='default', ttl_seconds: Optional[int]=None) -> None
```

Source: `minds-python-sdk/akasha/runtime/kv.py:183`.

Source documentation:

```text
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` [#kvclientbatch_delete]

```python
def batch_delete(self, keys: list[str], namespace: str='default') -> int
```

Source: `minds-python-sdk/akasha/runtime/kv.py:210`.

Source documentation:

```text
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` [#kvclientincrement]

```python
def increment(self, key: str, delta: int=1, namespace: str='default') -> int
```

Source: `minds-python-sdk/akasha/runtime/kv.py:231`.

Source documentation:

```text
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 [#akasharuntimememorypy]

### `EpisodicMemoryClient` [#episodicmemoryclient]

```python
class EpisodicMemoryClient()
```

Source: `minds-python-sdk/akasha/runtime/memory.py:21`.

Source documentation:

```text
Client for episodic memory operations (temporal events).
```

### `EpisodicMemoryClient.__init__` [#episodicmemoryclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/memory.py:24`.

### `EpisodicMemoryClient.insert` [#episodicmemoryclientinsert]

```python
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:

```text
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` [#episodicmemoryclientget]

```python
def get(self, event_id: str) -> Optional[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/memory.py:64`.

Source documentation:

```text
Get an episodic event by ID.
```

### `EpisodicMemoryClient.update` [#episodicmemoryclientupdate]

```python
def update(self, event_id: str, content: dict[str, Any]) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/memory.py:72`.

Source documentation:

```text
Update an episodic event.
```

### `EpisodicMemoryClient.delete` [#episodicmemoryclientdelete]

```python
def delete(self, event_id: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/memory.py:78`.

Source documentation:

```text
Delete an episodic event.
```

### `EpisodicMemoryClient.search` [#episodicmemoryclientsearch]

```python
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:

```text
Search episodic events.
```

### `EpisodicMemoryClient.range` [#episodicmemoryclientrange]

```python
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:

```text
Get events in a time range.
```

### `ProceduralMemoryClient` [#proceduralmemoryclient]

```python
class ProceduralMemoryClient()
```

Source: `minds-python-sdk/akasha/runtime/memory.py:133`.

Source documentation:

```text
Client for procedural memory operations (workflows).
```

### `ProceduralMemoryClient.__init__` [#proceduralmemoryclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/memory.py:136`.

### `ProceduralMemoryClient.store` [#proceduralmemoryclientstore]

```python
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:

```text
Store a procedure/workflow.
```

### `ProceduralMemoryClient.list` [#proceduralmemoryclientlist]

```python
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:

```text
List all procedures.
```

### `ProceduralMemoryClient.get` [#proceduralmemoryclientget]

```python
def get(self, procedure_id: str) -> Optional[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/memory.py:170`.

Source documentation:

```text
Get a procedure by ID.
```

### `ProceduralMemoryClient.update` [#proceduralmemoryclientupdate]

```python
def update(self, procedure_id: str, updates: dict[str, Any]) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/memory.py:178`.

Source documentation:

```text
Update a procedure.
```

### `ProceduralMemoryClient.delete` [#proceduralmemoryclientdelete]

```python
def delete(self, procedure_id: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/memory.py:187`.

Source documentation:

```text
Delete a procedure.
```

### `ProceduralMemoryClient.search` [#proceduralmemoryclientsearch]

```python
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:

```text
Search procedures.
```

### `ResourceMemoryClient` [#resourcememoryclient]

```python
class ResourceMemoryClient()
```

Source: `minds-python-sdk/akasha/runtime/memory.py:213`.

Source documentation:

```text
Client for resource memory operations (documents/blobs).
```

### `ResourceMemoryClient.__init__` [#resourcememoryclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/memory.py:216`.

### `ResourceMemoryClient.store` [#resourcememoryclientstore]

```python
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:

```text
Store a resource (document/blob).
```

### `ResourceMemoryClient.list` [#resourcememoryclientlist]

```python
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:

```text
List resources.
```

### `ResourceMemoryClient.get` [#resourcememoryclientget]

```python
def get(self, resource_id: str) -> Optional[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/memory.py:262`.

Source documentation:

```text
Get resource metadata by ID.
```

### `ResourceMemoryClient.get_data` [#resourcememoryclientget_data]

```python
def get_data(self, resource_id: str) -> Optional[bytes]
```

Source: `minds-python-sdk/akasha/runtime/memory.py:270`.

Source documentation:

```text
Get resource binary data.
```

### `ResourceMemoryClient.exists` [#resourcememoryclientexists]

```python
def exists(self, resource_id: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/memory.py:279`.

Source documentation:

```text
Check if resource data exists.
```

### `ResourceMemoryClient.get_size` [#resourcememoryclientget_size]

```python
def get_size(self, resource_id: str) -> int
```

Source: `minds-python-sdk/akasha/runtime/memory.py:285`.

Source documentation:

```text
Get resource data size in bytes.
```

### `VaultMemoryClient` [#vaultmemoryclient]

```python
class VaultMemoryClient()
```

Source: `minds-python-sdk/akasha/runtime/memory.py:292`.

Source documentation:

```text
Client for vault memory operations (secure knowledge storage).
```

### `VaultMemoryClient.__init__` [#vaultmemoryclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/memory.py:295`.

### `VaultMemoryClient.store` [#vaultmemoryclientstore]

```python
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:

```text
Store a value in the vault.
```

### `VaultMemoryClient.get` [#vaultmemoryclientget]

```python
def get(self, key: str) -> Optional[Any]
```

Source: `minds-python-sdk/akasha/runtime/memory.py:322`.

Source documentation:

```text
Get a value from the vault.
```

### `VaultMemoryClient.delete` [#vaultmemoryclientdelete]

```python
def delete(self, key: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/memory.py:330`.

Source documentation:

```text
Delete a value from the vault.
```

### `VaultMemoryClient.search` [#vaultmemoryclientsearch]

```python
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:

```text
Search vault entries (returns metadata, not values).
```

### `CognitiveMemoryClient` [#cognitivememoryclient]

```python
class CognitiveMemoryClient()
```

Source: `minds-python-sdk/akasha/runtime/memory.py:359`.

Source documentation:

```text
Client for cognitive memory operations (thoughts, decisions, interactions).
```

### `CognitiveMemoryClient.__init__` [#cognitivememoryclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/memory.py:362`.

### `CognitiveMemoryClient.log_thought` [#cognitivememoryclientlog_thought]

```python
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:

```text
Log a cognitive thought.
```

### `CognitiveMemoryClient.log_decision` [#cognitivememoryclientlog_decision]

```python
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:

```text
Log a decision.
```

### `CognitiveMemoryClient.log_interaction` [#cognitivememoryclientlog_interaction]

```python
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:

```text
Log an interaction.
```

### `CognitiveMemoryClient.start_session` [#cognitivememoryclientstart_session]

```python
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:

```text
Start a new cognitive session.
```

### `CognitiveMemoryClient.query` [#cognitivememoryclientquery]

```python
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:

```text
Query cognitive logs.
```

### `MemoryClient` [#memoryclient]

```python
class MemoryClient()
```

Source: `minds-python-sdk/akasha/runtime/memory.py:467`.

Source documentation:

```text
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 retrieval
```

### `MemoryClient.__init__` [#memoryclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/memory.py:480`.

### `MemoryClient.episodic` [#memoryclientepisodic]

```python
def episodic(self) -> EpisodicMemoryClient
```

Source: `minds-python-sdk/akasha/runtime/memory.py:489`.

Source documentation:

```text
Access episodic memory (temporal events).
```

### `MemoryClient.procedural` [#memoryclientprocedural]

```python
def procedural(self) -> ProceduralMemoryClient
```

Source: `minds-python-sdk/akasha/runtime/memory.py:496`.

Source documentation:

```text
Access procedural memory (workflows).
```

### `MemoryClient.resources` [#memoryclientresources]

```python
def resources(self) -> ResourceMemoryClient
```

Source: `minds-python-sdk/akasha/runtime/memory.py:503`.

Source documentation:

```text
Access resource memory (documents/blobs).
```

### `MemoryClient.vault` [#memoryclientvault]

```python
def vault(self) -> VaultMemoryClient
```

Source: `minds-python-sdk/akasha/runtime/memory.py:510`.

Source documentation:

```text
Access vault (secure storage).
```

### `MemoryClient.cognitive` [#memoryclientcognitive]

```python
def cognitive(self) -> CognitiveMemoryClient
```

Source: `minds-python-sdk/akasha/runtime/memory.py:517`.

Source documentation:

```text
Access cognitive logs (thoughts/decisions/interactions).
```

### `MemoryClient.hybrid_retrieval` [#memoryclienthybrid_retrieval]

```python
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:

```text
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 [#akasharuntimemhnpy]

### `MHNClient` [#mhnclient]

```python
class MHNClient()
```

Source: `minds-python-sdk/akasha/runtime/mhn.py:10`.

Source documentation:

```text
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__` [#mhnclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/mhn.py:24`.

### `MHNClient.create` [#mhnclientcreate]

```python
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:

```text
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` [#mhnclientstore]

```python
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:

```text
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` [#mhnclientretrieve]

```python
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:

```text
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` [#mhnclientdelete_pattern]

```python
def delete_pattern(self, network_id: str, key: str) -> bool
```

Source: `minds-python-sdk/akasha/runtime/mhn.py:155`.

Source documentation:

```text
Delete a pattern by key.

Args:
    network_id: ID of the network.
    key: Pattern key to delete.

Returns:
    True if deleted.
```

### `MHNClient.get_stats` [#mhnclientget_stats]

```python
def get_stats(self, network_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/mhn.py:173`.

Source documentation:

```text
Get network statistics.

Args:
    network_id: ID of the network.

Returns:
    Statistics including pattern count, capacity usage, etc.
```

### `MHNClient.clear` [#mhnclientclear]

```python
def clear(self, network_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/mhn.py:190`.

Source documentation:

```text
Clear all patterns from a network.

Args:
    network_id: ID of the network.

Returns:
    Clear confirmation.
```

## akasha/runtime/ml.py [#akasharuntimemlpy]

### `MLClient` [#mlclient]

```python
class MLClient()
```

Source: `minds-python-sdk/akasha/runtime/ml.py:10`.

Source documentation:

```text
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__` [#mlclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/ml.py:23`.

### `MLClient.load_model` [#mlclientload_model]

```python
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:

```text
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` [#mlclientunload_model]

```python
def unload_model(self, model_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/ml.py:61`.

Source documentation:

```text
Unload a model from the ML runtime.

Args:
    model_id: Model identifier.

Returns:
    Unload confirmation.
```

### `MLClient.list_models` [#mlclientlist_models]

```python
def list_models(self) -> list[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/ml.py:76`.

Source documentation:

```text
List all loaded models.

Returns:
    List of model info objects.
```

### `MLClient.get_metrics` [#mlclientget_metrics]

```python
def get_metrics(self, model_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/ml.py:87`.

Source documentation:

```text
Get model metrics (latency, throughput, etc.).

Args:
    model_id: Model identifier.

Returns:
    Model metrics.
```

### `MLClient.embed` [#mlclientembed]

```python
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:

```text
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` [#mlclientcreate_vector_index]

```python
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:

```text
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` [#mlclientadd_to_vector_index]

```python
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:

```text
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` [#mlclientsearch_vector_index]

```python
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:

```text
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` [#mlclientsave_vector_index]

```python
def save_vector_index(self, index_name: str, path: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/ml.py:229`.

Source documentation:

```text
Save a vector index to disk.

Args:
    index_name: Index name.
    path: Save path.

Returns:
    Save result.
```

### `MLClient.list_vector_indices` [#mlclientlist_vector_indices]

```python
def list_vector_indices(self) -> list[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/ml.py:245`.

Source documentation:

```text
List all vector indices.

Returns:
    List of index info.
```

## akasha/runtime/neurosymbolic.py [#akasharuntimeneurosymbolicpy]

### `NeurosymbolicClient` [#neurosymbolicclient]

```python
class NeurosymbolicClient()
```

Source: `minds-python-sdk/akasha/runtime/neurosymbolic.py:10`.

Source documentation:

```text
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__` [#neurosymbolicclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/neurosymbolic.py:25`.

### `NeurosymbolicClient.retrieve` [#neurosymbolicclientretrieve]

```python
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:

```text
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` [#neurosymbolicclientfind_paths]

```python
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:

```text
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` [#neurosymbolicclientstart_prefetch]

```python
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:

```text
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` [#neurosymbolicclientstop_prefetch]

```python
def stop_prefetch(self, job_id: Optional[str]=None) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/neurosymbolic.py:147`.

Source documentation:

```text
Stop prefetch job(s).

Args:
    job_id: Specific job to stop (all if not specified).

Returns:
    Stop confirmation.
```

### `NeurosymbolicClient.get_cache_stats` [#neurosymbolicclientget_cache_stats]

```python
def get_cache_stats(self) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/neurosymbolic.py:164`.

Source documentation:

```text
Get neurosymbolic cache statistics.

Returns:
    Cache stats including hit rate, size, etc.
```

## akasha/runtime/snn.py [#akasharuntimesnnpy]

### `SNNClient` [#snnclient]

```python
class SNNClient()
```

Source: `minds-python-sdk/akasha/runtime/snn.py:10`.

Source documentation:

```text
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__` [#snnclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/snn.py:30`.

### `SNNClient.build` [#snnclientbuild]

```python
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:

```text
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` [#snnclientcompile]

```python
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:

```text
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` [#snnclientstep]

```python
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:

```text
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` [#snnclienttrain_bptt]

```python
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:

```text
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` [#snnclientget_state]

```python
def get_state(self, network_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/snn.py:180`.

Source documentation:

```text
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` [#snnclientreset_state]

```python
def reset_state(self, network_id: str) -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/snn.py:197`.

Source documentation:

```text
Reset a network's state to initial values.

Args:
    network_id: ID of the network.

Returns:
    Reset confirmation.
```

## akasha/runtime/vector.py [#akasharuntimevectorpy]

### `VectorClient` [#vectorclient]

```python
class VectorClient()
```

Source: `minds-python-sdk/akasha/runtime/vector.py:12`.

Source documentation:

```text
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__` [#vectorclient__init__]

```python
def __init__(self, http_client: httpx.Client) -> None
```

Source: `minds-python-sdk/akasha/runtime/vector.py:25`.

### `VectorClient.upsert` [#vectorclientupsert]

```python
def upsert(self, id: str, vector: list[float], metadata: Optional[dict[str, Any]]=None, namespace: str='default') -> None
```

Source: `minds-python-sdk/akasha/runtime/vector.py:29`.

Source documentation:

```text
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` [#vectorclientbatch_upsert]

```python
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:

```text
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` [#vectorclientget]

```python
def get(self, id: str, namespace: str='default') -> Optional[dict[str, Any]]
```

Source: `minds-python-sdk/akasha/runtime/vector.py:89`.

Source documentation:

```text
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` [#vectorclientdelete]

```python
def delete(self, id: str, namespace: str='default') -> bool
```

Source: `minds-python-sdk/akasha/runtime/vector.py:114`.

Source documentation:

```text
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` [#vectorclientbatch_delete]

```python
def batch_delete(self, ids: list[str], namespace: str='default') -> int
```

Source: `minds-python-sdk/akasha/runtime/vector.py:137`.

Source documentation:

```text
Delete multiple vectors.

Args:
    ids: List of vector IDs to delete.
    namespace: Vector namespace (default: "default").

Returns:
    Number of vectors deleted.
```

### `VectorClient.search` [#vectorclientsearch]

```python
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:

```text
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` [#vectorclientsearch_by_id]

```python
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:

```text
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` [#vectorclientupdate_metadata]

```python
def update_metadata(self, id: str, metadata: dict[str, Any], namespace: str='default', merge: bool=True) -> None
```

Source: `minds-python-sdk/akasha/runtime/vector.py:240`.

Source documentation:

```text
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` [#vectorclientcount]

```python
def count(self, namespace: str='default', filter: Optional[dict[str, Any]]=None) -> int
```

Source: `minds-python-sdk/akasha/runtime/vector.py:267`.

Source documentation:

```text
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` [#vectorclientdescribe_index]

```python
def describe_index(self, namespace: str='default') -> dict[str, Any]
```

Source: `minds-python-sdk/akasha/runtime/vector.py:294`.

Source documentation:

```text
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 [#akashatypespy]

### `AkashaConfig` [#akashaconfig]

```python
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:

```text
Configuration for the Akasha client.
```

### `TenantPlan` [#tenantplan]

```python
class TenantPlan(str, Enum)
```

Source: `minds-python-sdk/akasha/types.py:34`.

Source documentation:

```text
Tenant subscription plans.
```

### `TenantStatus` [#tenantstatus]

```python
class TenantStatus(str, Enum)
```

Source: `minds-python-sdk/akasha/types.py:43`.

Source documentation:

```text
Tenant status states.
```

### `BackupStatus` [#backupstatus]

```python
class BackupStatus(str, Enum)
```

Source: `minds-python-sdk/akasha/types.py:53`.

Source documentation:

```text
Backup status states.
```

### `HealthStatus` [#healthstatus]

```python
class HealthStatus(str, Enum)
```

Source: `minds-python-sdk/akasha/types.py:62`.

Source documentation:

```text
Health check status.
```

### `ServiceType` [#servicetype]

```python
class ServiceType(str, Enum)
```

Source: `minds-python-sdk/akasha/types.py:70`.

Source documentation:

```text
Akasha service types.
```

### `TenantCapacity` [#tenantcapacity]

```python
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:

```text
Tenant resource capacity limits.
```

### `TenantServices` [#tenantservices]

```python
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:

```text
Tenant enabled services.
```

### `Tenant` [#tenant]

```python
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:

```text
Tenant model.
```

### `CreateTenantRequest` [#createtenantrequest]

```python
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:

```text
Request to create a new tenant.
```

### `UpdateTenantRequest` [#updatetenantrequest]

```python
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:

```text
Request to update a tenant.
```

### `Backup` [#backup]

```python
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:

```text
Backup model.
```

### `CreateBackupRequest` [#createbackuprequest]

```python
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:

```text
Request to create a new backup.
```

### `RestoreBackupRequest` [#restorebackuprequest]

```python
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:

```text
Request to restore from a backup.
```

### `UsageMetrics` [#usagemetrics]

```python
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:

```text
Usage metrics for a tenant.
```

### `ServiceStatus` [#servicestatus]

```python
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:

```text
Status of an individual service.
```

### `InstanceHealth` [#instancehealth]

```python
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:

```text
Health status of an Akasha instance.
```

### `KeyValue` [#keyvalue]

```python
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:

```text
Key-value pair.
```

### `GraphNode` [#graphnode]

```python
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:

```text
Graph node.
```

### `GraphEdge` [#graphedge]

```python
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:

```text
Graph edge.
```

### `VectorSearchResult` [#vectorsearchresult]

```python
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:

```text
Vector search result.
```

### `VectorSearchRequest` [#vectorsearchrequest]

```python
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:

```text
Vector search request.
```
