Skip to content

[Question] runtime entity_id with ComposioToolSet in LangGraph #1536

@austinmw

Description

@austinmw

I'm using Composio with LangGraph and want to define tools using the App enum pattern:

composio_toolset = ComposioToolSet()
tools = composio_toolset.get_tools(apps=[App.GOOGLEDRIVE])

Currently, I need to provide an entity_id when initializing ComposioToolSet or calling get_tools. Since entity_id changes per user, I'm currently recompiling my graph for each user session.

My application has separate frontend authentication that provides the entity_id at runtime via config:

config = {
    "configurable": {
        "entity_id": user_id  # Available at runtime
    }
}

Is there a way to initialize tools once and provide the entity_id at execution time instead? Are there docs or recommended patterns for handling this use case? I'd like to avoid graph recompilation as much as possible.

Really appreciate any help you can offer, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions