Deploying Long-Horizon Agents in Production with Durable Execution and Deepagents Deploy

Learn how to deploy long-running AI agents reliably using purpose-built runtime infrastructure. This guide explains durable execution for resuming agent workflows after failures, checkpoint-based memory for short- and long-term state, human-in-the-loop interruption and resumption, and production-grade observability with tracing and replay. It details how LangSmith Deployment (LSD) and Agent Server provide primitives like task queues, persistence via PostgreSQL, RBAC-based multi-tenancy, middleware guardrails, streaming, and cron scheduling. Discover how deepagents deploy packages these capabilities to eliminate infrastructure overhead and enable scalable, fault-tolerant agent systems.

The Agent Improvement Loop with Traces, Evals, and LangSmith

Learn how to systematically improve AI agents using a trace-driven feedback loop powered by LangSmith. The approach centers on collecting execution traces from staging, testing, and production, enriching them with automated evaluations and human annotations, and using those insights to identify failure patterns. Developers then make targeted updates across model prompts, orchestration logic, or context layers, and validate improvements through offline evaluation suites before deployment. Continuous production monitoring with online evals and insights ensures regressions are caught early and performance improves over time. This iterative loop—trace collection, enrichment, debugging, evaluation, and redeployment—enables reliable, data-driven optimization of agent behavior at scale.

Autonomous context compression

Deep Agents introduces a tool in its Python SDK and CLI that allows agents to autonomously compress their context windows at optimal moments. Instead of relying on fixed token thresholds, agents can now summarize older context when it becomes less relevant—such as at task boundaries, before large context ingestion, or after extracting key insights. This improves efficiency, reduces context rot, and aligns memory management with the agent’s reasoning process. The system retains recent messages (about 10% of context) while summarizing older interactions, enabling better long-horizon performance without manual intervention or rigid harness tuning.