P
Peekr Cloud
DemoAcme Agents

← Traces

agent.plan

trace_id: trace_000029 · tenant: acme

4 spans·6019msok

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.9s, slowest single call: 2.1s. Running them concurrently saves 3.8s — a 2.8× speedup.

Now (sequential)After fix (parallel)

5.9s

~2.1s

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 › plan

agent.plan

user: u_060
anthropic › messages › create

anthropic.messages.create

claude-opus-4-72.0k tok$0.077faithful 0.98user: u_060
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-74.0k tok$0.155faithful 0.30user: u_060
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-71.8k tok$0.070faithful 0.91user: u_060
Input

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

Output

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

Faithfulness · anthropic.messages.create0.50

2 supported · 1 contradicted · 1 unsupported of 4 claims

  • supported

    Policy P-204(b) applies to this request.

  • contradicted

    The refund amount is $189.99.

  • unsupported

    The card on file ends in 4421.

  • supported

    Refunds settle within 3 business days.

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.