Skip to main content

Ezop SDK - The story of every AI agent

Project description

Ezop Python SDK

Ezop tracks the lifecycle of your AI agents — registrations, versions, and runs — so you have full observability across every deployment.

Installation

pip install ezop

Configuration

Set your API key before using the SDK:

export EZOP_API_KEY=your-ezop-api-key-here
export EZOP_API_URL=https://api.ezop.ai   # optional, this is the default

Quick start

from ezop import Agent

# Register your agent at startup (safe to call on every deploy — idempotent)
agent = Agent.init(
    name="customer-support-bot",
    owner="growth-team",
    version="v0.3",
    runtime="langchain",
    description="Handles tier-1 customer support tickets",
    default_permissions=["read:tickets"],
    permissions=["read:tickets", "write:replies"],
    changelog="Switched to new retrieval pipeline",
)

# Track a run
agent.start_run()

try:
    result = your_agent_logic(user_input)
    agent.end_run(
        status="completed",
        total_tokens=result.usage.total_tokens,
        total_cost=result.cost,
        metadata={"user_id": user_id},
    )
except Exception as e:
    agent.end_run(status="failed", metadata={"error": str(e)})
    raise

API reference

Agent.init()

Registers the agent and its current version with the Ezop platform. On subsequent calls with the same name + owner, the agent record is updated in place — safe to call on every startup.

Parameter Required Description
name yes Agent name
owner yes Team or user that owns the agent
version yes Version string for this deployment (e.g. "v0.3")
runtime yes Runtime framework (e.g. "langchain", "langchain", "python")
description no Human-readable description of the agent
default_permissions no Default permission scopes for the agent
permissions no Permission scopes for this specific version
changelog no Release notes for this version

agent.start_run()

Creates a new run record with status running. Call this at the start of each agent invocation.

agent.end_run()

Closes the current run. Only provided fields are written.

Parameter Default Description
status "completed" Final run status ("completed", "failed", etc.)
total_tokens None Total tokens consumed
total_cost None Total cost in USD
metadata None Arbitrary JSON metadata

Logging

The SDK uses Python's standard logging module under the ezop namespace. To enable logs in your application:

import logging
logging.getLogger("ezop").setLevel(logging.DEBUG)

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

ezop-0.0.2.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

ezop-0.0.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file ezop-0.0.2.tar.gz.

File metadata

  • Download URL: ezop-0.0.2.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for ezop-0.0.2.tar.gz
Algorithm Hash digest
SHA256 da83ed15198eca3e9d05dd9ae77700053d2a48520380ecd87b4b40c5653ea6a8
MD5 27e6b58eec5de1493f5450a62e2c19f6
BLAKE2b-256 fbaa329879a90dcde2b15353048259b524bc0e2c47847fb29d1338a0c2054e23

See more details on using hashes here.

File details

Details for the file ezop-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ezop-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for ezop-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 29754473a2b9f89f2a090eba3c82ae016c1f7f525d36253aa7548d58a3b64a59
MD5 dc395aaeef7f213b8d586400a7560269
BLAKE2b-256 85560735ba21aec2ac02c3a2adfedb8cf591d96e6edcd91153fd303a949144b5

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