Skip to main content

SDK for building AI agents on the Unio network

Project description

unio-agent

SDK for building AI agents on the Unio network.

Quick Start (5 lines)

from unio import UnioAgent
import asyncio

async def main():
    agent = await UnioAgent.init(agent_name="my-bot", contact_email="you@example.com")
    services = await agent.find("send email")
    cred = await agent.onboard(services[0].service_id)
    result = await agent.call(services[0].service_id, "send_email", {"to": "user@test.com", "subject": "Hi"})

asyncio.run(main())

LangGraph Example

from unio import UnioAgent, UnioToolkit
from langgraph.prebuilt import create_react_agent

agent = await UnioAgent.init(agent_name="email-bot", contact_email="you@example.com")
toolkit = UnioToolkit(agent)
tools = await toolkit.get_tools_for_service("resend")

llm = ChatOpenAI(model="gpt-4o")
graph = create_react_agent(llm, tools)

Installation

pip install unio-agent

Features

  • Auto-registration — Generates Ed25519 keypair, registers with Unio, stores in OS keychain
  • Trust-level filteringfind() only returns services you can actually access
  • Onboarding with signing — Requests signed with Ed25519, trust/reputation gates enforced
  • Circuit breaker — 3 consecutive failures → OPEN, auto-recovers after 60s
  • Token bucket throttle — Reads manifest limits, self-throttles to avoid 429s
  • Session logging — Fire-and-forget logs to Unio Auth for reputation tracking
  • LangChain integrationUnioToolkit.get_tool() returns @tool-compatible async functions

License

Apache-2.0

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

unio_agent-0.1.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

unio_agent-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file unio_agent-0.1.0.tar.gz.

File metadata

  • Download URL: unio_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for unio_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0838e4eb589c2e4599d9119e244d2e35cec94fe124712f8a94f8980e99d7056f
MD5 75d52eb388a5502603a870a864ef222a
BLAKE2b-256 7b15ad4dad54d16859976697946284f636b24521db5a284bcd8037f620713d31

See more details on using hashes here.

File details

Details for the file unio_agent-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for unio_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfbb71ebb16784f29cdaf15bb4a13dd3476884200f45835326fb63050c4c17a5
MD5 6caebdc720e2197e6878ed9df87d4af2
BLAKE2b-256 20b02d3f8f20b80c3a521d984c533c9a228bc335f276d4165fccf239bf4d39af

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