Choose from three integration patterns. Direct SDK calls, webhook caching, or managed agents.
PromptLayer fits into your stack at three levels of sophistication:
promptlayer_client.run
– zero-setup SDK sugarpromptlayer_client.run
(quickest path)When every millisecond of developer time counts, call promptlayer_client.run()
directly from your application code.
Under the hood
💡 Tip – If latency is critical, enqueue the log to a background worker and let your request return immediately.
Eliminate the extra round‑trip by replicating prompts into your own cache or database.
PromptLayer keeps that cache fresh through webhook events—no polling required.
Read more here about webhooks here.
Tip: Most teams push the track_to_promptlayer onto a Redis or SQS queue so as to not block on the logging of a request.
Read the full guide: PromptLayer Webhooks ↗
For complex workflows requiring orchestration, use PromptLayer’s managed agent infrastructure.
PromptLayer handles all orchestration, parallelization, and model provider communication.
Because execution is server-side, you inherit centralized tracing, cost analytics, and secure sandboxed tool-nodes without extra ops.
Learn more: Agents documentation ↗
Requirement | promptlayer_client.run | Webhook Cache | Managed Agent |
---|---|---|---|
⏱️ extreme latency reqs | ❌ | ✅ | ✅ |
🛠 Single LLM call | ✅ | ✅ | ➖ |
🌩 Complex plans / tools | ➖ | ➖ | ✅ |
👥 Non-eng prompt editors | ✅ | ✅ | ✅ |
🧰 Zero ops overhead | ✅ | ➖ | ✅ |
✉️ Need a hand? Ping us in Discord or email hello@promptlayer.com—happy to chat architecture!
Choose from three integration patterns. Direct SDK calls, webhook caching, or managed agents.
PromptLayer fits into your stack at three levels of sophistication:
promptlayer_client.run
– zero-setup SDK sugarpromptlayer_client.run
(quickest path)When every millisecond of developer time counts, call promptlayer_client.run()
directly from your application code.
Under the hood
💡 Tip – If latency is critical, enqueue the log to a background worker and let your request return immediately.
Eliminate the extra round‑trip by replicating prompts into your own cache or database.
PromptLayer keeps that cache fresh through webhook events—no polling required.
Read more here about webhooks here.
Tip: Most teams push the track_to_promptlayer onto a Redis or SQS queue so as to not block on the logging of a request.
Read the full guide: PromptLayer Webhooks ↗
For complex workflows requiring orchestration, use PromptLayer’s managed agent infrastructure.
PromptLayer handles all orchestration, parallelization, and model provider communication.
Because execution is server-side, you inherit centralized tracing, cost analytics, and secure sandboxed tool-nodes without extra ops.
Learn more: Agents documentation ↗
Requirement | promptlayer_client.run | Webhook Cache | Managed Agent |
---|---|---|---|
⏱️ extreme latency reqs | ❌ | ✅ | ✅ |
🛠 Single LLM call | ✅ | ✅ | ➖ |
🌩 Complex plans / tools | ➖ | ➖ | ✅ |
👥 Non-eng prompt editors | ✅ | ✅ | ✅ |
🧰 Zero ops overhead | ✅ | ➖ | ✅ |
✉️ Need a hand? Ping us in Discord or email hello@promptlayer.com—happy to chat architecture!