# Building Long-Running Agents with ScaleDown and Deep Agents

DevFeed: [Building Long-Running Agents with ScaleDown and Deep Agents](<https://devfeed.tech/articles/building-long-running-agents-with-scaledown-and-deep-agents-86201.md>)

Original publisher: [Read original article](<https://www.langchain.com/blog/building-long-running-agents-with-scaledown-and-deep-agents>)

Author: LangChain Accounts

Published: 2026-10-13T14:01:24Z

Content type: tutorial

Language: en

Sources: [LangChain Blog](<https://devfeed.tech/sources/langchain-blog.md>)

Topics: [LangChain](<https://devfeed.tech/topics/langchain.md>), [agentic workflows](<https://devfeed.tech/topics/agentic-workflows.md>), [Langgraph](<https://devfeed.tech/topics/langgraph.md>)

Tags: [compression](<https://devfeed.tech/tags/compression.md>), [context-management](<https://devfeed.tech/tags/context-management.md>), [langchain](<https://devfeed.tech/tags/langchain.md>), [long-running-agents](<https://devfeed.tech/tags/long-running-agents.md>)

## AI overview

The article explains how to use ScaleDown constrained decoding models with LangChain and Deep Agents for long-running AI agents. It describes middleware for summarizing agent history, compressing tool results, extracting structured fields, and classifying agent state, plus integration with the LangSmith LLM Gateway. It presents ScaleDown-reported speed and cost comparisons for selected tasks and advises reserving general-purpose models for open-ended work.

## Source excerpt

Use ScaleDown's constrained decoding models with LangChain and Deep Agents to summarize history, compress tool results, and extract data faster and cheaper.