P
Peekr Cloud
DemoAcme Agents

← Traces

agent.run

trace_id: trace_00002r · tenant: soylent

7 spans·7417msok

Root cause: sequential execution of "messages.create"

3 "anthropic.messages.create" spans ran one after another — each started only after the previous one finished. Total: 6.4s, slowest single call: 2.4s. Running them concurrently saves 4.1s — a 2.7× speedup.

Now (sequential)After fix (parallel)

6.4s

~2.4s

Fix: run calls in parallel

fix.py
from concurrent.futures import ThreadPoolExecutor

# Before — sequential, each call blocks the next:
for item in items:
    result = process(item)

# After — all calls run concurrently:
with ThreadPoolExecutor(max_workers=8) as pool:
    results = list(pool.map(process, items))

# Cost unchanged. Output unchanged. Time = slowest single call.

Waterfall

agent › run

agent.run

user: u_863
anthropic › messages › create

anthropic.messages.create

claude-opus-4-7499 tok$0.019faithful 0.17user: u_863
Input

Summarize the Q3 earnings report attached. Focus on revenue, margin, and guidance.

Output

Q3 revenue hit $4.2B, a 38% YoY jump, with operating margin expanding to 27%…

anthropic › messages › create

anthropic.messages.create

claude-opus-4-7557 tok$0.022faithful 0.52user: u_863
Input

Given the customer ticket below, draft a refund response that follows policy P-204.

Output

(answer to: Given the customer ticket below, draft a…)

anthropic › messages › create

anthropic.messages.create

claude-opus-4-7492 tok$0.019faithful 0.98user: u_863
Input

Translate the user manual section to Japanese, preserving the table structure.

Output

(answer to: Translate the user manual section to Jap…)

Tool: code_exec

tool.code_exec

user: u_863
Tool: web_fetch

tool.web_fetch

user: u_863
Tool: web_fetch

tool.web_fetch

user: u_863

Faithfulness · anthropic.messages.create0.33

1 supported · 2 contradicted · 0 unsupported of 3 claims

  • contradicted

    Globex Logistics is the lowest-cost vendor for SKU 88-A.

  • contradicted

    The quoted unit price is $14.20.

  • supported

    Delivery date is 2026-06-28.