Threadplane
Pricing
Talk to Us
@threadplane/langgraphTypeAliasv0.3.4

InferBag

Infer the Bag type from an agent, defaulting to the provided Bag.

Currently returns the provided Bag for all types. Can be extended in the future to extract Bag from agent types.

View sourceView Markdown
import type { InferBag } from '@threadplane/langgraph';

Declaration

type InferBag<T, B extends BagTemplate = BagTemplate> = T extends {
  "~agentTypes": unknown;
} ? BagTemplate : B;

Type parameters

T
B
BagTemplate Default: BagTemplate