Planned
LangChain
Capture chains, tools, and LLM calls automatically.
Integrations
There is no SDK yet. Your agent posts runs and spans over HTTPS, so it works with the frameworks and tools you already run.
Works today
Copy this helper into your agent. It times a call, describes it as a span, and posts the run. Swap the model call for any framework or provider.
import time, uuid, requests
AOM_KEY = "aom_live_..."
def record_run(agent_name, spans, status="completed"):
"""Post one run with its spans. Run totals are summed from the spans."""
return requests.post(
"https://agentopsmonitor.com/api/ingest",
headers={"Authorization": f"Bearer {AOM_KEY}"},
json={"external_id": str(uuid.uuid4()), "agent_name": agent_name,
"status": status, "spans": spans},
timeout=10,
)
# Wrap any call your agent makes: time it, then describe it as a span.
started = time.monotonic()
reply = client.chat.completions.create(model="gpt-4o", messages=messages)
usage = reply.usage
spans = [{
"span_type": "llm", "provider": "openai", "model": "gpt-4o",
"tokens_in": usage.prompt_tokens, "tokens_out": usage.completion_tokens,
# Example prices per token; use your provider's current ones.
"cost_usd": usage.prompt_tokens * 2.5e-6 + usage.completion_tokens * 1e-5,
"duration_ms": int((time.monotonic() - started) * 1000),
}]
record_run("support-bot", spans)Record any tool call as a span by naming it in tool_name, whatever the provider:
stripe.refunds.createslack.postMessagevectorstore.queryemail.sendpostgres.queryyour.tool.nameUntil these ship, the recipe above works with each of them.
Planned
LangChain
Capture chains, tools, and LLM calls automatically.
Planned
CrewAI
Trace agent crews across tasks and tools.
Planned
OpenAI SDK
Stream chat completions, token usage, and tool calls.
Planned
Anthropic
Stream Claude messages, tokens, and tool calls.