Better support for Runtime with tools #882

Closed
opened 2026-02-20 17:42:13 -05:00 by yindo · 2 comments
Owner

Originally created by @sydney-runkle on GitHub (Jul 31, 2025).

Originally assigned to: @sydney-runkle on GitHub.

Privileged issue

  • I am a LangGraph maintainer, or was asked directly by a LangGraph maintainer to create an issue here.

Issue Content

Currently available with get_runtime but injection would be more ideal

Originally created by @sydney-runkle on GitHub (Jul 31, 2025). Originally assigned to: @sydney-runkle on GitHub. ### Privileged issue - [x] I am a LangGraph maintainer, or was asked directly by a LangGraph maintainer to create an issue here. ### Issue Content Currently available with `get_runtime` but injection would be more ideal
yindo closed this issue 2026-02-20 17:42:13 -05:00
Author
Owner

@RyanSept commented on GitHub (Aug 1, 2025):

+1 having something something analogous to what nodes take since this was how it was with config before v0.6

def node(state: State, runtime: Runtime[Context]):
    # type safe access to context attributes    
    user_id = runtime.context.user_id
    db_conn = runtime.context.db_connection
    ...

# should also  be valid
def some_tool(runtime: Runtime[Context]):
    ...
@RyanSept commented on GitHub (Aug 1, 2025): +1 having something something analogous to what nodes take since this was how it was with config before v0.6 ```python def node(state: State, runtime: Runtime[Context]): # type safe access to context attributes user_id = runtime.context.user_id db_conn = runtime.context.db_connection ... # should also be valid def some_tool(runtime: Runtime[Context]): ... ```
Author
Owner

@sydney-runkle commented on GitHub (Jan 9, 2026):

We now support injection of ToolRuntime :)

@sydney-runkle commented on GitHub (Jan 9, 2026): We now support injection of `ToolRuntime` :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#882