Skip to main content

Verify AI agent identity and reputation before interacting with them.

Project description

AgentBio Python SDK

Verify AI agent identity and reputation before interacting with them.

pip install agentbio

Quick start

from agentbio import AgentBio

ab = AgentBio(api_key="agentbio_yourkey")

# Verify an agent before interacting
result = ab.verify("40d870cd1dbf284402239d397fbb59483002841dacdef0a6377393fbdd7f23a4")

print(result.summary)
# "Agent my-agent has limited history (0 verified transactions) — proceed with caution."

if result.should_abort:
    raise Exception(f"Untrusted agent: {result.summary}")

# Enroll a new agent programmatically
agent = ab.enroll(
    agent_id      = "my-trading-agent",
    contact_email = "ops@mycompany.com",
    description   = "Autonomous DEX trading agent on Base",
)
print(agent.thumbprint)
print(agent.api_key)  # store this securely — only shown once

Get an API key

  1. Register at app.agentbio.world/register
  2. Go to Developer API → Quickstart
  3. Generate your API key

Or enroll programmatically — no account needed:

from agentbio import AgentBio

ab = AgentBio()  # no key needed for enrollment

agent = ab.enroll(
    agent_id      = "my-agent",
    contact_email = "you@example.com",
)
# Returns api_key — use it for all future verify() calls
ab2 = AgentBio(api_key=agent.api_key)

Verify result fields

result.action               # TrustAction.PROCEED | PROCEED_WITH_CAUTION | ABORT
result.summary              # one-sentence explanation
result.flags                # ["new_agent", "no_transactions", ...]
result.reputation_score     # 0.0 – 5.0
result.verified_transactions
result.risk_level           # Low | Moderate | High | Critical | Unknown
result.identity_valid
result.hardware_backed
result.verification_id      # unique ID for logging
result.next_verify_after    # datetime — when to re-verify
result.is_trusted           # True if action is proceed or proceed_with_caution
result.should_abort         # True if action is abort

LangChain integration

from langchain.tools import tool
from agentbio import AgentBio

ab = AgentBio(api_key="agentbio_yourkey")

@tool
def verify_agent(thumbprint: str) -> str:
    """Verify an AI agent's identity and reputation before interacting with them."""
    result = ab.verify(thumbprint)
    return f"{result.action.value}: {result.summary}"

Error handling

from agentbio import AgentBio, AgentBioError

ab = AgentBio(api_key="agentbio_yourkey")

try:
    result = ab.verify(thumbprint)
except AgentBioError as e:
    if e.status_code == 404:
        print("Agent not found")
    elif e.status_code == 402:
        print("Payment required — check your API key")
    else:
        print(f"Error: {e}")

# Or use verify_safe() to return None on any error (fail open)
result = ab.verify_safe(thumbprint)
if result and result.should_abort:
    raise Exception("Untrusted agent")

Pricing

  • Free plan: 60 req/min with API key
  • Pro ($19/mo): 600 req/min
  • x402: $0.01 USDC per call, no API key needed (autonomous agents)

Links

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

agentbio-1.0.408.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

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

agentbio-1.0.408-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file agentbio-1.0.408.tar.gz.

File metadata

  • Download URL: agentbio-1.0.408.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for agentbio-1.0.408.tar.gz
Algorithm Hash digest
SHA256 8027db8b027814d44041232f48ed2d31c1bfdbe92149cc92a935906535450e61
MD5 84bd61b583167a3ae895e1411aef48c7
BLAKE2b-256 86dbab9df4569bf906ebc3e51f949d3ca16d5d15cddf3564f3fa40d4e27661bc

See more details on using hashes here.

File details

Details for the file agentbio-1.0.408-py3-none-any.whl.

File metadata

  • Download URL: agentbio-1.0.408-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for agentbio-1.0.408-py3-none-any.whl
Algorithm Hash digest
SHA256 9f865ca6a40a4de4f8c4707c1b0bd91fededc33e032312b37a2b20b736277d09
MD5 812cbfba7bb54ee22bf50abfd6e09640
BLAKE2b-256 0eb7e04a0d958f25b8cc2d36218f1f8c1e442da3f2ae1d87821197bc1ff6cbd4

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