P
Peekr Cloud
DemoAcme Agents

← Traces

agent.run

trace_id: trace_00001i · tenant: soylent

6 spans·6286msok

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: 5.6s, slowest single call: 2.3s. Running them concurrently saves 3.2s — a 2.4× speedup.

Now (sequential)After fix (parallel)

5.6s

~2.3s

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_332
anthropic › messages › create

anthropic.messages.create

claude-opus-4-7708 tok$0.028faithful 0.98user: u_332
Input

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

Output

(answer to: Summarize the Q3 earnings report attache…)

anthropic › messages › create

anthropic.messages.create

claude-opus-4-7644 tok$0.025faithful 0.01user: u_332
Input

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

Output

Refund approved under policy P-204(b), $189.99 returned to card ending 4421 within 3 days…

anthropic › messages › create

anthropic.messages.create

claude-opus-4-7301 tok$0.012faithful 0.96user: u_332
Input

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

Output

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

Tool: search

tool.search

user: u_332
Tool: search

tool.search

user: u_332

Faithfulness · anthropic.messages.create0.25

1 supported · 2 contradicted · 1 unsupported of 4 claims

  • contradicted

    Q3 revenue was $4.2B.

  • contradicted

    YoY growth was 38%.

  • unsupported

    Operating margin expanded to 27%.

  • supported

    Net income grew faster than revenue.