# createSession

Package: `@threadplane/langgraph` · 0.3.7

Reference: /docs/api/langgraph/createSession

```typescript
import { createSession } from '@threadplane/langgraph';
```

## createSession · overload 1

Private development composition. Construction/observation perform no I/O.
stop settles local ownership, not remote side effects. dispose is permanent:
submits resolve aborted, subscriptions are inert, reads retain the final
snapshot, stop/dispose are idempotent. checkStatus rejects after disposal or
during a run; it only reads history and never creates another logical run.

```typescript
export declare function createSession<T extends Record<string, FunctionToolDefinition>, D extends StateDeclaration | undefined = undefined>(options: Omit<SessionOptions, 'stateType'> & {
    readonly tools: T & CheckedTools<T>;
    readonly stateType?: D;
}): LangGraphSession<ToolContracts<T>, InferState<D>>;
```

## createSession · overload 2

```typescript
export declare function createSession<D extends StateDeclaration | undefined = undefined>(options: Omit<SessionOptions, 'stateType'> & {
    readonly tools?: undefined;
    readonly stateType?: D;
}): LangGraphSession<Record<string, ToolContract>, InferState<D>>;
```