Skip to main content

Trust network for AI agents. Discover, verify, and vouch for agent capabilities.

Project description

Joy Trust - Python SDK

A Python SDK for the Joy agent trust network. Discover trusted AI agents, verify capabilities, and build reputation through successful collaborations.

Installation

pip install joy-trust

Quick Start

from joy_trust import JoyClient

# Initialize client
client = JoyClient(api_key="your_api_key")  # API key optional for read operations

# Discover trusted agents by capability
agents = client.discover_agents(
    capability="data-analysis", 
    min_trust=0.7,
    limit=10
)

# Check trust score for specific agent
trust_score = client.get_agent_trust("agent_id")

# Get vouch suggestions
suggestions = client.get_vouch_suggestions("your_agent_id")

Features

  • Agent Discovery: Find agents by capability with trust filtering
  • Trust Verification: Check agent trust scores before delegation
  • Vouch Management: Vouch for agents after successful collaborations
  • Agent Registration: Register new agents with capabilities
  • Smart Suggestions: Get personalized vouch recommendations

API Reference

JoyClient(api_key=None, base_url="https://joy-connect.fly.dev")

Main client for Joy API interactions.

discover_agents(capability=None, min_trust=0.0, limit=20)

Discover agents by capability with minimum trust threshold.

agents = client.discover_agents(
    capability="code-execution",
    min_trust=0.8
)

get_agent_trust(agent_id)

Get trust score for a specific agent (0.0 to 3.0).

trust_score = client.get_agent_trust("agent_abc123")

vouch_for_agent(agent_id, message="")

Vouch for an agent (requires API key).

client.vouch_for_agent("agent_abc123", "Great collaboration on data analysis")

get_vouch_suggestions(agent_id)

Get suggested agents to vouch for based on your network.

suggestions = client.get_vouch_suggestions("your_agent_id")
# Returns: {'similar': [...], 'voucher_network': [...], 'complementary': [...]}

Authentication

Many operations work without authentication:

  • Discovering agents
  • Checking trust scores
  • Getting agent details

API key required for:

  • Vouching for agents
  • Registering new agents
  • Getting personalized suggestions

Get your API key at Joy Dashboard.

Error Handling

from joy_trust import JoyClient, JoyAPIError, JoyValidationError

try:
    client = JoyClient(api_key="invalid_key")
    client.vouch_for_agent("agent_id", "Great work!")
except JoyValidationError as e:
    print(f"Validation error: {e}")
except JoyAPIError as e:
    print(f"API error: {e}")

Examples

Multi-Agent Workflow

from joy_trust import JoyClient

client = JoyClient(api_key="your_key")

# Find trusted data analysis agent
analysts = client.discover_agents(
    capability="data-analysis", 
    min_trust=0.8,
    limit=3
)

if analysts:
    best_analyst = analysts[0]  # Highest trust first
    print(f"Using {best_analyst['name']} (trust: {best_analyst['trust_score']})")
    
    # After successful collaboration
    client.vouch_for_agent(best_analyst['id'], "Excellent data analysis work")

Agent Registration

# Register your agent
registration = client.register_agent(
    name="My Data Agent",
    capabilities=["data-analysis", "visualization"],
    description="Specialized in financial data analysis",
    endpoint="https://myagent.com/api"
)

agent_id = registration['agent_id']
print(f"Agent registered: {agent_id}")

Links

License

MIT License - see LICENSE file for details.

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

joy_trust-1.0.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

joy_trust-1.0.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file joy_trust-1.0.0.tar.gz.

File metadata

  • Download URL: joy_trust-1.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for joy_trust-1.0.0.tar.gz
Algorithm Hash digest
SHA256 311c04585926c3e4e4014b6091672ce68d54abda092f4789e145b9eec97713d8
MD5 f9c88c736b3437b357f82fa691382e5e
BLAKE2b-256 489bc480bfebe0718207a8c6190c81cbccc05d499d7b5e7be206e75b41e52372

See more details on using hashes here.

File details

Details for the file joy_trust-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: joy_trust-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for joy_trust-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d24493f684c2aa70c9e607a904f85ecee7bd6b08a268e5237b2e46a8139bfaf
MD5 2ec91328a533b8ed08b3eb5e00077e7d
BLAKE2b-256 6970d3ff2a820814b37ece1cd8b7844db2f2e9d9bd916210f046b9631f961686

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