Skip to main content

Official Python SDK for the Prometa Agentic Lifecycle Intelligence Platform

Project description

prometa-sdk (Python)

Official Python SDK for the Prometa Agentic Lifecycle Intelligence Platform.

Wraps OpenTelemetry GenAI semantic conventions with @prometa decorators that automatically emit lifecycle metadata (solution_id, stage, agent) to your Prometa instance via OTLP/JSON.

Install

pip install prometa-sdk

Quick start

import asyncio
from prometa import Prometa

prometa = Prometa(
    endpoint="https://prometa.example.com/api/v2/otlp/v1/traces",
    api_key="prm_live_...",
    solution_id="sol_abc123",
    agent_name="customer-support",
    stage="production",
)

@prometa.workflow(name="handle-ticket")
async def handle_ticket(ticket_id: str) -> str:
    @prometa.agent(name="classifier")
    async def classify() -> str:
        return "billing"

    @prometa.tool(name="kb-search")
    async def kb_search(q: str) -> list[str]:
        return ["doc1", "doc2"]

    category = await classify()
    results = await kb_search(category)
    return f"resolved {ticket_id} via {results}"

asyncio.run(handle_ticket("T-1234"))
prometa.flush()

What gets captured

Each decorated function emits a span with:

  • prometa.kindworkflow | agent | tool | task
  • prometa.solution_id, prometa.stage
  • gen_ai.agent.name, gen_ai.agent.id
  • Parent/child relationships across async/sync calls
  • Errors → span status error plus error.message

Configuration

Param Env var Default
endpoint required
api_key PROMETA_API_KEY none
solution_id none
agent_name "prometa-agent"
stage "development"
flush_interval_seconds 2.0

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

prometa_sdk-0.1.2.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

prometa_sdk-0.1.2-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file prometa_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: prometa_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for prometa_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e8dea661a3ecffb23e3df48de130f3988e7026ce051eb2468a8a911593e72fbe
MD5 1985517e13431c033c4ea4625d12c9e2
BLAKE2b-256 75c4401691a068eef54485b5cb39847862242b23286b848e32240bc3408a6b59

See more details on using hashes here.

Provenance

The following attestation bundles were made for prometa_sdk-0.1.2.tar.gz:

Publisher: sdk-release.yml on caglarsubas/agent-hook-v2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prometa_sdk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: prometa_sdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for prometa_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04e3999b55f82a65ffb48867807c1ed68845d74bf524bb5b70225722c68891ef
MD5 10d980301a9687585c23ecb7783ffe76
BLAKE2b-256 7e7903bd719ab31071829c4a6a5578fe88578ad9d0e7493b5b56e5d18f622a78

See more details on using hashes here.

Provenance

The following attestation bundles were made for prometa_sdk-0.1.2-py3-none-any.whl:

Publisher: sdk-release.yml on caglarsubas/agent-hook-v2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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