Real ChatGPT answer · index seedLShsWAVp3UMcompleteB2B software · AI and automation toolsinformational

How do I pass dynamic user context into LangChain agents so they only access authorized documents during an active chat session

ChatGPTgpt-62 queries10/31/2026
Download run

Fan-out diagram

The searches the AI actually ran for this prompt.

SEED QUERY
How do I pass dynamic user context into LangChain agents so they only access authorized documents during an active chat session
2 real searches · 1 real-search pass
site:docs.langchain.com/oss/python/langchain runtime context context_schema middleware tools authorization retrieval filteringGoogle ↗
OBSERVED
site:docs.langchain.com/oss/python/langchain agents runtime context ToolRuntime contextGoogle ↗
OBSERVED

Badge and edge weight = share of passes that produced the query. Hover a query for its intent and routing format.

Query classes

Google's semantic query class for every sub-query: what kind of answer each search is after, simulated vs real.

Classifying 2 queries…

Searches and sources

ChatGPT2 real searches · gpt-6
site:docs.langchain.com/oss/python/langchain runtime context context_schema middleware tools authorization retrieval filtering Google ↗
site:docs.langchain.com/oss/python/langchain agents runtime context ToolRuntime context Google ↗
  1. LangChain runtime documentation · docs.langchain.com
  2. LangChain Agents · docs.langchain.com
  3. LangGraph Persistence · docs.langchain.com
  4. LangChain Middleware · docs.langchain.com

Queries

2 queries · click a column to sort
Query / typeSearchIntentQuery classRouting formatClusterFreq ↓Weight
site:docs.langchain.com/oss/python/langchain runtime context context_schema middleware tools authorization retrieval filtering
OBSERVED
Google ↗
AI Mode ↗
————1x
of 1
site:docs.langchain.com/oss/python/langchain agents runtime context ToolRuntime context
OBSERVED
Google ↗
AI Mode ↗
————1x
of 1