Metadata-Version: 2.4
Name: yutha
Version: 0.1.0a1
Summary: Python SDK for the Yutha agent-coordination control plane.
Project-URL: Homepage, https://yutha.ai
Project-URL: Repository, https://github.com/abhinavg6/yutha
Project-URL: Documentation, https://yutha.ai/developer/python-sdk/
Project-URL: Issues, https://github.com/abhinavg6/yutha/issues
Author: The Yutha Authors
License: Apache-2.0
Keywords: agents,control-plane,grpc,yutha
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: cryptography>=42
Requires-Dist: grpcio<2.0,>=1.66
Requires-Dist: protobuf<7.0,>=6.30
Requires-Dist: pydantic<3.0,>=2.5
Provides-Extra: crewai
Requires-Dist: crewai<1.0,>=0.70; extra == 'crewai'
Provides-Extra: dev
Requires-Dist: crewai<1.0,>=0.70; extra == 'dev'
Requires-Dist: grpcio-tools<2.0,>=1.66; extra == 'dev'
Requires-Dist: langgraph<0.4,>=0.2; extra == 'dev'
Requires-Dist: mypy-protobuf>=3.5; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: types-grpcio>=1.0; extra == 'dev'
Provides-Extra: langgraph
Requires-Dist: langgraph<0.4,>=0.2; extra == 'langgraph'
Description-Content-Type: text/markdown

# yutha

Async Python client for **[Yutha](https://yutha.ai)** — open-source infrastructure
for groups of AI agents. Identity, capability, accountability, and norms — built
once, framework-agnostic.

> **Status — early-stage pre-release.** Currently
> [`v0.1.0-alpha.1`](https://github.com/abhinavg6/yutha/releases/tag/v0.1.0-alpha.1).
> Solid enough to play with end-to-end, intentionally pre-1.0. Wire formats and
> API surfaces may shift before 1.0; pin tightly if you build on it.

The Python SDK gives you signed agent identities, capability-gated message
sending, structured envelopes, and access to the append-only receipt log of
the Yutha control plane. Adapters for [LangGraph](https://github.com/langchain-ai/langgraph)
and [CrewAI](https://www.crewai.com/) ship as optional extras, so the same
SDK works regardless of how you build the agents above it.

---

## Install

```bash
pip install yutha                    # core SDK only
pip install 'yutha[langgraph]'       # + LangGraph adapter
pip install 'yutha[crewai]'          # + CrewAI adapter
```

Python 3.11+ required. The core install pulls in `grpcio`, `protobuf`,
`cryptography`, and `pydantic`; the framework extras pull in their
respective dependencies (LangChain core, CrewAI, etc.).

## Quickstart

A 60-second tour of what the SDK looks like — signing keys, passports,
and the client surface. Full end-to-end with a live control plane is in
the [LangGraph guide](https://yutha.ai/developer/langgraph/).

```python
import yutha

# An agent's cryptographic identity.
signing_key = yutha.SigningKey.generate()

# Its signed passport — the artifact that lets it join a swarm.
passport = yutha.Passport(
    spec_version="1.0.0",
    agent_id=yutha.AgentId.new(),
    swarm_id=yutha.SwarmId.new(),
    agent_public_key=signing_key.public_key(),
    owner="example.com/my-agent",
    framework="langgraph",
    framework_version="0.2.0",
    accepted_constitution_version="1.0.0",
    tier=yutha.PassportTier.MINIMAL,
    issued_at=yutha.Timestamp.now(),
    expires_at=yutha.Timestamp(wall_clock="2099-01-01T00:00:00Z", monotonic_ns=2**62),
).sign(signing_key)

# Connect to a running control plane and register.
async with yutha.YuthaClient.connect(
    "127.0.0.1:50051",
    agent_id=passport.agent_id,
    swarm_id=passport.swarm_id,
    signing_key=signing_key,
) as client:
    await client.admission.register(passport)
    # ... send envelopes, issue capabilities, query receipts ...
```

## What's next

- **[15-minute LangGraph walkthrough](https://yutha.ai/developer/langgraph/)** —
  build a five-agent workflow with capability gating and a full audit trail.
- **[CrewAI walkthrough](https://yutha.ai/developer/crewai/)** —
  the same SDK with CrewAI idioms.
- **[Worked examples](https://yutha.ai/examples/)** — three runnable end-to-end
  demos covering customer support, code review with security boundaries,
  and AP / invoice processing.
- **[Concepts](https://yutha.ai/concepts/primitives/)** — passports,
  envelopes, capabilities, receipts, and the Cedar-based constitution
  layer in fifteen minutes.

## How it fits together

```
    ┌──────────────────────────────────────────┐
    │  yutha.YuthaClient                       │
    │  ─────────────────                       │
    │   .admission  →  AdmissionService stub   │
    │   .capability →  CapabilityService stub  │
    │   .envelope   →  EnvelopeService stub    │
    │   .receipt    →  ReceiptService stub     │
    │   .constitution → ConstitutionService    │
    └─────────────────┬────────────────────────┘
                      │
    ┌─────────────────▼─────────────────┐
    │  yutha.auth.BearerSession         │  ← mints + refreshes
    │  (Ed25519 over canonical bytes)   │     AgentBearerToken
    └─────────────────┬─────────────────┘
                      │
    ┌─────────────────▼───────────────┐
    │  yutha._proto.*  (grpcio stubs) │
    └─────────────────────────────────┘
```

The client is a thin async wrapper over five gRPC services. Bearer tokens
are short-lived, Ed25519-signed over the request's canonical bytes; the
session handles minting and refresh transparently.

## License

Apache 2.0. See [LICENSE](https://github.com/abhinavg6/yutha/blob/main/LICENSE).

## Contributing

Contributor setup, codegen, and the integration-test workflow are documented
in the [repository's CONTRIBUTING guide](https://github.com/abhinavg6/yutha/blob/main/docs/community/CONTRIBUTING.md).
