Metadata-Version: 2.4
Name: mirrorneuron-python-sdk
Version: 1.0.0
Summary: MirrorNeuron Python SDK
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: grpcio>=1.50.0
Requires-Dist: protobuf>=4.21.0
Dynamic: license-file

# MirrorNeuron Python SDK

The core Python toolkit for building and orchestrating MirrorNeuron multi-agent workflows.

## Features
- **Temporal-style Decorators**: Define complex graphs intuitively via `@workflow.defn`, `@workflow.run`, and `@agent.defn`.
- **gRPC Client**: A lightweight, high-performance `Client` wrapper abstracting away direct Protobuf interactions with the underlying Elixir core.
- **Unified Foundation**: Acts as the shared library powering both the `mn-cli` and `mn-api` packages.

## Installation
*Note: This package is installed automatically by the MirrorNeuron `install.sh` script.*

```bash
pip install mirrorneuron-python-sdk
```

## Quick Start

```python
from mn_sdk import agent, workflow, Client

# Define a single agent node
@agent.defn(type="map")
def transform_data(data):
    return data.upper()

# Compose agents into a workflow graph
@workflow.defn(name="DataPipeline")
class DataPipeline:
    @workflow.run
    def execute(self):
        pass # Evaluated to generate manifest.json

# Connect to the core runtime and submit
client = Client(target="localhost:50051")
job_id = client.submit_job(manifest_json="...", payloads={})
print(f"Submitted Job: {job_id}")
```

## Configuration

The SDK remains independently installable and only talks to the core over gRPC.
Env vars override constructor defaults:

- `MN_GRPC_TARGET`: default target if `Client(target=...)` is omitted.
- `MN_GRPC_TIMEOUT_SECONDS`: per-RPC timeout; `0` or `none` disables it.
- `MN_GRPC_AUTH_TOKEN`: optional bearer metadata.
