惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
V
Vulnerabilities – Threatpost
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News | PayPal Newsroom
S
Security Affairs
T
Tor Project blog
P
Proofpoint News Feed
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security @ Cisco Blogs
H
Heimdal Security Blog
Hacker News: Ask HN
Hacker News: Ask HN
Help Net Security
Help Net Security
U
Unit 42
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
Cisco Talos Blog
Cisco Talos Blog
量子位
F
Full Disclosure
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
有赞技术团队
有赞技术团队
T
Troy Hunt's Blog
P
Privacy & Cybersecurity Law Blog
Forbes - Security
Forbes - Security
人人都是产品经理
人人都是产品经理
L
Lohrmann on Cybersecurity
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Security Blog
Microsoft Security Blog
博客园 - Franky
腾讯CDC
AI
AI
Last Week in AI
Last Week in AI
Latest news
Latest news
Google Online Security Blog
Google Online Security Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
Martin Fowler
Martin Fowler
Blog — PlanetScale
Blog — PlanetScale
V2EX - 技术
V2EX - 技术
酷 壳 – CoolShell
酷 壳 – CoolShell

LangChain Forum - Latest posts

Proposal: additional docs for implementing custom DB checkpointers or a guide on generic base checkpointer Langsmith Fleet Sandbox Failure Prompt_cache_retention: &#39;24h&#39; supported in langchain agents and where to provide it, inside invoke or while creating client? Could RAG pipelines realistically cause deployment timeouts, is Render suitable for first-time RAG deployments? How do I use langchain_postgres&#39; init_vectorstore_table correctly? Proposal: Graph-wide default error handler for StateGraph (fallback for nodes without error_handler) Support timedelta for CachePolicy.ttl, consistent with TimeoutPolicy The x402 illusion: Is advertising dead in the age of agents? Question about LangSmith Trace Search via API How to cancel a run correct !! Anyone confirms this issue that deepagent ui streaming is disturb by update in deepagent or bug issue Would pre-inference routing help long-context agent workflows? Best Stack for Building AI Applications Question about LangSmith Trace Search Seeking help regarding the connection between Websocket and tool calls Tool invocation error with empty error message when using `InjectedState` + `Command` return in async tool How to use @langchain/react FileSystem middleware Using ChatSnowflake with agents Built llmsessioncontract on AgentMiddleware: runtime enforcement of tool-call protocols — feedback wanted DeltaChannelHistory not found in langgraph-api:3.12 Improving citation accuracy and reducing hallucinations in custom Parent-Child RAG pipeline (Gemma3:4B + FAISS+BM25 + Cross-encoder reranker) Metadata filter not filtering for alerts Connecting the Slack integration fails with invalid_team_for_non_distributed_app Trouble understanding and editing experiment summary evaluators feedbacks SSL certificate error from httpx with LangGraph server WikipediaLoader endup in JSONDecodeError Human-in-the-loop approval dashboard for LangGraph agents — open source, free to deploy How are people handling data governance across agent handoffs in production? Feature Request: @task metadata Research: Friction Points in Agentic Commerce Transactions How should I provide an agent to a LangGraph server? Parallel astream() on the same compiled graph leaks messages between streams How I added claim verification to a LangChain agent in 5 minutes (with code) Interested in contributing a DynamoDB checkpointer for LangGraph.js A set of speculative ideas on treating LLM agents as interpreters with limited working memory, using externalized structures for reliable long-term project maintenance. Where should I define the name and description for subagents? Add Qdrant-backed checkpoint saver and memory store (langgraph-checkpoint-qdrant) The output content has been corrupted Incorrect `reasoning_effort` options in the UI A Minimal Receipt + Validator Pattern for Tool-Calling Agents Feature Request: Simple cryptographic provenance for who authorized what in LangGraph multi-agent graphs Using LangGraph interrupt for multi-step wizards with branching — right tool or wrong abstraction? Portable departure and admission records for LangChain agents Socratic Tools: Intelligent Agent Enhancement for LangChain Built NORNR for spend governance in agent workflows LangGraph + PostgreSQL: Chat history and summarization best practice Using SQLRecordManager multi-agent systems debugging agent-to-agent Proposal: Add save_local and load_local to USearch VectorStore (Feature Parity with FAISS) How are you handling agent security in production? (Identity, permissions, kill switch) RFC: Human delegation provenance for LangGraph multi-agent chains Build UX for Langgraph Tiny LangGraph -> Assay evidence sample from tasks v2 tool isolation between Skills: Bug: Cannot save edited prompt back to Prompt Hub after opening trace run in Playground Add faiss-node-native as async alternative vector store for FAISS Deep Agents: Clarify Multimodal (Image) Context Management and Compression Discussion about why LangGraph JS ToolNode doesn’t inject ToolRuntime.state like Python does, and what the correct workaround or intended design pattern is. xat-langchain: signed Agent-Signature headers on every tool call Help with local RAG pipeline – poor retrieval quality, wrong page numbers Building an AI networking agent (LangChain vs LangGraph vs Deep Agents)? LOGIC.md — declarative reasoning contracts that compile to LangGraph StateGraph Distinguishing internal vs final streamed chunks in Supervisor multi-agent architecture Machine-Readable Permissions for Web-Interacting Agents Are people hitting race conditions in multi-agent LangChain setups? How do ContextEditingMiddleware and SummarizationMiddleware interact when used together?Combining ContextEditingMiddleware + SummarizationMiddleware — execution order and behavior when both trigger? How we add runtime security to LangChain agents in production What does recursionLimit actually count in createAgent? (LangChain JS) LangSmith Playground returns 401 Invalid token for both /stream and /invoke across accounts How to register type in langgraph Are there any frontends for interacting with a LangGraph agent? Langchain.schema is not available while using in python code In-place model update on a compiled create_agent and per-subagent model update for deep agents - is this possible? Physical control surface for AI agents — feedback wanted Feature Request: Native Support for A2A Protocol (Remote Agents as Sub-Graphs) Feature Request: Image Input support for ChatMistralAI Cache disable in Deepagent Multiple response formats when creating agents? Unable to parse docstring from OpenAI schema Enable OpenTelemetry traces without sending data to LangSmith No cost displayed in LangSmith when using LiteLLM + LangGraph Course certificate I had a few months Experience with across Agent deploys remotegraph calls - old/new dist runtime architecture Runs visiblty problem AI Agent Identity Management Framework How should I deploy a self-hosted multi-agent system? Free Self-hosted LangGraph Agent Server: how to separate API and queue workers using Docker LangSmith signup stuck on activation screen New integration: langchain-w2a — LangChain tools for W2A-enabled websites Custom routes not working self-hosted standalone Trace-to-Fix: how are you actually improving RAG/agents after observability flags issues? `Failed to use model_dump to serialize <class 'langchain_core.tools.structured.StructuredTool'> to JSON: PydanticSerializationError(Unable to serialize unknown type: <class 'pydantic._internal._model_construction.ModelMetaclass'>)` `PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/` BaseSandbox.write() fails if file already exists -- any way to overwrite? What does the security architecture of AI agents actually look like? Persisting HITL payloads LangMem support in JS/TS Are dynamic tool lists allowed when using create_agent? How to make an image tool?
Hosting an agent server on Heroku
@alexk Alex · 2026-04-18 · via LangChain Forum - Latest posts

I’m trying to host an agent on Heroku as an Agent Server.

I’ve been following this guide so far: Self-host standalone servers - Docs by LangChain

According to this, it needs access to a Postgres DB and Redis Store.

And on Heroku, I use the container registry as I figure that using Heroku’s build-system where you just push to their repo won’t work: Container Registry & Runtime (Docker Deploys) | Heroku Dev Center

One major problem is that the Langgraph server expects DATABASE_URIand REDIS_URIas environment variables. Heroku though sets these by itself as DATABASE_URL and REDIS_URL and we can’t change them, and the connection strings can be rotated by Heroku anytime.

Hence, just duplicating these variables and copying over the connection strings won’t work either (not long term, at least).

So I wondered if there’s a way to either configure Langgraph to use different variables (looking into langgraph_api/config.py it doesn’t seem like it’s possible) - or if I can set the variables somewhere else at runtime, when the docker container starts up or something?

I’ve also seen these here, maybe this helps? If so, where to define these vars and how do I set them to my DATABASE_URL from the Heroku environment?

Here’s my agent.py file - we also see that it loads another DATABASE_URL but that’s the one containing production data which the agent is supposed to be answering questions about.

import os
from datetime import datetime, timedelta

import dotenv
import numpy as np
import pandas as pd
from langchain.agents import create_agent
from langchain_community.agent_toolkits import SQLDatabaseToolkit
from langchain_community.utilities import SQLDatabase
from langgraph.checkpoint.memory import MemorySaver
from langchain_experimental.tools import PythonREPLTool
from langchain_experimental.utilities import PythonREPL
from langchain_openai import ChatOpenAI

from system_prompts import SQL_AGENT_PROMPT

dotenv.load_dotenv(override=False)

# Use LM Studio for local models or OpenAI for cloud
USE_LOCAL = os.getenv("USE_LOCAL", "false").lower() == "true"
# Disable checkpointer for langgraph server (enabled by default)
DISABLE_CHECKPOINTER = os.getenv("DISABLE_CHECKPOINTER", "false").lower() == "true"

# just for local hosting
if USE_LOCAL:
    model = ChatOpenAI(
        # Model name doesn't matter for LM Studio
        model=os.getenv("LOCAL_MODEL", "local-model"),
        temperature=0,
        streaming=True,
        base_url=os.getenv("LOCAL_BASE_URL", "http://localhost:1234/v1"),
        # LM Studio doesn't require API key
        api_key="not-needed",
    )
else:
    model = ChatOpenAI(model="gpt-5.1", temperature=0, streaming=True)


# was used for former deployment, might be obsolete
def normalize_db_uri(uri: str) -> str:
    """
    Normalize database connection URIs.
    - Convert 'postgres://' (Heroku) to 'postgresql://' (SQLAlchemy)
    """
    if not uri:
        return uri
    if uri.startswith("postgres://"):
        return uri.replace("postgres://", "postgresql://", 1)
    return uri


database_url = os.getenv("DATABASE_URL")
database_url = normalize_db_uri(database_url)

db = SQLDatabase.from_uri(database_url)

toolkit = SQLDatabaseToolkit(db=db, llm=model)

tools = [tool for tool in toolkit.get_tools() if
         tool.name != "sql_db_query_checker"]

# Add Python REPL tool for code execution with restricted globals
# Create Python REPL with restricted globals
python_repl_instance = PythonREPL(
    _globals={
        "pd": pd,
        "pandas": pd,
        "np": np,
        "numpy": np,
        "datetime": datetime,
        "timedelta": timedelta,
    }
)

# Create the tool with custom description
python_repl = PythonREPLTool(python_repl=python_repl_instance)
python_repl.description = (
    "A Python shell for executing code. Use this to process data, "
    "perform calculations, filter results, or do multi-step analysis. "
    "Input should be valid Python code. Available libraries: pandas (pd), "
    "numpy (np), datetime. Results from SQL queries can be converted to "
    "DataFrames for processing."
)
tools.append(python_repl)

system_prompt = SQL_AGENT_PROMPT.format(
    dialect=db.dialect,
    top_k=5,
)

checkpointer = None if DISABLE_CHECKPOINTER else MemorySaver()

agent = create_agent(
    model, tools, system_prompt=system_prompt, checkpointer=checkpointer
)