LangChain pioneered the idea of composing LLM calls with tools and memory. The price was code: chains, runnables, callbacks, output parsers, prompt templates, and a layer of glue between every step. Digitorn keeps the composition idea but trades the Python plumbing for a declarative YAML file.
Most LangChain teams hit the same wall. The first agent ships in a notebook, then somebody asks for a webhook, a Discord trigger, a cron job, multi-tenant credentials, and a deploy story. Each of those is a separate library or a custom wrapper. Digitorn ships them as runtime modules and channel providers so the same agent runs from a CLI, a REST endpoint, a Discord mention, or a 9am cron with no extra code.
Every LangChain primitive maps to a Digitorn equivalent. Where the mapping is not 1-to-1, the notes call out what changed.
Real apps in both stacks. The Digitorn version is what you would commit to a repo, no scaffolding hidden offscreen.
1from langchain.agents import AgentExecutor, create_tool_calling_agent2from langchain_anthropic import ChatAnthropic3from langchain_community.tools import TavilySearchResults4from langchain_core.prompts import ChatPromptTemplate56llm = ChatAnthropic(model="claude-haiku-4-5", api_key=API_KEY)7tools = [TavilySearchResults(max_results=4, api_key=TAVILY_KEY)]89prompt = ChatPromptTemplate.from_messages([10 ("system", "Answer concisely. Cite sources."),11 ("placeholder", "{chat_history}"),12 ("human", "{input}"),13 ("placeholder", "{agent_scratchpad}"),14])1516agent = create_tool_calling_agent(llm, tools, prompt)17executor = AgentExecutor(agent=agent, tools=tools, verbose=True)1819result = executor.invoke({"input": "What shipped this quarter?"})20print(result["output"])1schema_version: 223app:4 app_id: web-helper5 name: "Web helper"6 version: "1.0.0"78runtime:9 mode: conversation10 entry_agent: helper1112modules:13 web: {}1415agents:16 - id: helper17 modules: [{web: [search, fetch]}]18 brain:19 provider: anthropic20 model: claude-haiku-4-521 credential: anthropic_main22 system_prompt: "Answer concisely. Cite sources."The Python file is 18 lines of imports and wiring before the first useful instruction. The YAML is the instruction. Tools come from the web module, history is automatic, the daemon serves the agent over REST and SSE without extra code.
1# requires: discord.py, langchain, your own bot process2import discord3from langchain.agents import AgentExecutor, create_tool_calling_agent45client = discord.Client(intents=discord.Intents.default())6llm = ChatAnthropic(model="claude-haiku-4-5", api_key=API_KEY)78@client.event9async def on_message(message):10 if client.user.mentioned_in(message):11 result = executor.invoke({"input": message.content})12 await message.channel.send(result["output"])1314client.run(DISCORD_BOT_TOKEN)1schema_version: 223app:4 app_id: discord-helper5 name: "Discord helper"6 version: "1.0.0"78runtime:9 mode: background10 entry_agent: helper1112tools:13 modules:14 web: {}15 channels:16 config:17 providers:18 discord_bot:19 adapter: discord20 credential: { scope: per_user, provider: discord }21 activation: { agent: helper }2223agents:24 - id: helper25 modules: [{web: [search]}]26 brain: { provider: anthropic, model: claude-haiku-4-5, credential: anthropic_main }Discord wiring is a config block, not a bot process you host and keep alive. No token in the source - the credential is referenced by name, the vault holds it.
Subtle differences that look the same on paper and break on first run. Read these before you start porting.
Conversation history is part of the session, not an object you instantiate. Stop reaching for ConversationBufferMemory equivalents, the runtime already has it.
When a LangChain agent uses a Pydantic output parser, in Digitorn you write the equivalent shape as the tool's response schema. The model is forced into it by the function-calling layer, no string parsing needed.
LangChain streaming requires AsyncCallbackHandler plumbing. In Digitorn the daemon streams over Server-Sent Events by default.
# 1. install runtime
curl -sSL https://digitorn.ai/install | sh
# 2. save the YAML above as app.yaml in a new folder
mkdir from-langchain
# 3. install and chat
digitorn install ./from-langchain
digitorn chat from-langchainEngineering notes from the Digitorn team. No marketing, no launch announcements, no "10 prompts that will change your life". Just the things we write that we'd want to read.