Skip to main content

AEP-native execution layer for AI agents - spans, costs, budget enforcement

Project description

aceteam-aep

AEP-native execution layer for AI agents. Direct provider SDKs and AEP protocol compliance (spans, costs, budget enforcement).

Installation

pip install aceteam-aep
# Or with all providers:
pip install aceteam-aep[all]

Quick Start

from aceteam_aep import create_client, run_agent_loop, ChatMessage, tool

# Create a client
client = create_client("gpt-4o", api_key="sk-...")

# Define tools
@tool
def calculator(expression: str) -> str:
    """Evaluate a math expression."""
    return str(eval(expression))

# Run agent loop
result = await run_agent_loop(
    client,
    [ChatMessage(role="user", content="What is 2+2?")],
    tools=[calculator],
    system_prompt="You are a helpful assistant.",
)

AEP Compliance

Every execution through run_agent_loop can produce AEP-compliant output:

from aceteam_aep import SpanTracker, CostTracker, BudgetEnforcer

tracker = SpanTracker()
costs = CostTracker(entity="org:my-org")
budget = BudgetEnforcer(total="10.00")

result = await run_agent_loop(
    client, messages,
    span_tracker=tracker,
    cost_tracker=costs,
    budget=budget,
)

# Access AEP data
print(tracker.get_spans())      # Execution trace
print(costs.get_cost_tree())    # Hierarchical costs
print(budget.state.remaining()) # Budget remaining

Streaming

from aceteam_aep import run_agent_loop_stream

async for event in run_agent_loop_stream(client, messages, tools=tools):
    if event.type == "chunk":
        print(event.data["text"], end="")
    elif event.type == "tool_call_start":
        print(f"\nCalling {event.data['name']}...")
    elif event.type == "cost":
        print(f"\nCost: ${event.data['compute_cost']}")

Providers

  • OpenAI (GPT-4o, o1, o3, etc.)
  • Anthropic (Claude Opus, Sonnet, Haiku)
  • Google (Gemini 2.5, 3.0)
  • xAI (Grok)
  • Ollama (local models)
  • OpenAI-compatible (SambaNova, TheAgentic, DeepSeek)

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

aceteam_aep-0.2.0.tar.gz (69.1 kB view details)

Uploaded Source

Built Distribution

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

aceteam_aep-0.2.0-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file aceteam_aep-0.2.0.tar.gz.

File metadata

  • Download URL: aceteam_aep-0.2.0.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aceteam_aep-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7fcf3c0d6f8d92cd832ebae8ba528d5d74dadbfbc18eaee090389ba9b6d8ded7
MD5 30a6d7ec4f04bdfc9c58469af48ebb71
BLAKE2b-256 17ba27453e9f85e0d6d455df025a8debabe9357e0245dc7512a6de78218e8c35

See more details on using hashes here.

File details

Details for the file aceteam_aep-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: aceteam_aep-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 28.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aceteam_aep-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef2f2cd57511c79095c6f0a90864be65cc0c60b2407bcc033e722928df353dd6
MD5 32071fc0e8b9700c9010ee0d3c125db3
BLAKE2b-256 e1d58575d43edcb7decbc8b5412d8838c5beb48c2a60da5a129d3fcc5680fd60

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