Skip to main content

Python SDK for the Yutha agent-coordination control plane.

Project description

yutha

Async Python client for Yutha — 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.2. 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, CrewAI, OpenAI Agents, and Microsoft Agent Framework ship as optional extras, so the same SDK works regardless of how you build the agents above it.


Install

pip install yutha                       # core SDK only
pip install 'yutha[langgraph]'          # + LangGraph adapter
pip install 'yutha[crewai]'             # + CrewAI adapter
pip install 'yutha[openai-agents]'      # + OpenAI Agents adapter
pip install 'yutha[maf]'                # + Microsoft Agent Framework 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, OpenAI Agents, Microsoft Agent Framework, 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.

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 — build a five-agent workflow with capability gating and a full audit trail.
  • CrewAI walkthrough — the same SDK with CrewAI idioms.
  • OpenAI Agents research-crew example — end-to-end OpenAI Agents adapter walkthrough (handoff bridging, citation-enforcing constitution, cap-gated function_tools).
  • Microsoft Agent Framework DevOps example — end-to-end MAF adapter walkthrough (SRE countersign, schema-change quarantine, ChatAgent integration).
  • Worked examples — runnable end-to-end demos covering customer support, code review with security boundaries, AP / invoice processing, research-crew citation enforcement, and DevOps incident-response.
  • Concepts — 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.

Contributing

Contributor setup, codegen, and the integration-test workflow are documented in the repository's CONTRIBUTING guide.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yutha-0.1.0a2.tar.gz (101.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yutha-0.1.0a2-py3-none-any.whl (135.1 kB view details)

Uploaded Python 3

File details

Details for the file yutha-0.1.0a2.tar.gz.

File metadata

  • Download URL: yutha-0.1.0a2.tar.gz
  • Upload date:
  • Size: 101.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for yutha-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 af7edf46e13c829277dd98b07103292464fa45fad847fbba3d74b5f705cf3b1b
MD5 871e5e70007613b0a644d1dcf61404d3
BLAKE2b-256 c874f78879df81f34679f289dec0cf5ebf53fe36815555052ee3c8ef0dc1f1ab

See more details on using hashes here.

File details

Details for the file yutha-0.1.0a2-py3-none-any.whl.

File metadata

  • Download URL: yutha-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 135.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for yutha-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 5d7f41d097b1431cb3b875bc2090d9cc3da2a37fe0281454166a5c2331763d4b
MD5 0ec093f377020a379fc6c5a777428469
BLAKE2b-256 7817e828a30d8f49859e01a094dc6cd7da07ee19dac30a82026101cf06e81ac0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page