Skip to content

Runtime.store always undefined #1952

@etay2000

Description

@etay2000

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangGraph.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangGraph.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package).

Example Code


const store = new InMemoryStore();

const agent = createAgent({
  model: llm,
  store
});

beforeAgent: async (state, runtime) => {
  console.log('runtime', runtime); // runtime.store is always undefined
}

Error Message and Stack Trace (if applicable)

No response

Description

Providing a basic InMemoryStore to createAgent, and trying to access the runtime.store from middleware, runtime.store is always undefined.

System Info

npm

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