> ## Documentation Index
> Fetch the complete documentation index at: https://docs.charmos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# LangGraph Adapter

Use the LangGraph adapter for stateful graph-based agents.

## Manifest

```yaml theme={"theme":{"light":"min-light","dark":"min-dark"}}
runtime:
  adapter:
    type: "langgraph"
    entry_point: "src.main:graph"
```

## Runtime Behavior

Charm loads the compiled graph and invokes it with the input payload from the Store. Thread or state behavior depends on how your graph is configured.

## Best For

* Multi-step workflows.
* Graph-based agent control flow.
* Stateful assistants.
* Agents with conditional routing.

## State and Auto-Checkpointing

If your graph requires durable state, the Charm SDK provides automatic checkpointing when used with an external memory provider.

When you configure `runtime.memory.provider: supabase`, the platform automatically injects a `CharmSupabaseCheckpointer` into your LangGraph execution. This eliminates the need for custom database logic—every step of your graph's state is transparently serialized and persisted. In the event of a system upgrade, network disconnect, or runner restart, the next invocation automatically rehydrates the latest graph state to resume the asynchronous workflow seamlessly, ensuring strict fault tolerance.

## Tips

* Keep graph inputs aligned with `interface.input`.
* Validate state shape before publishing.
* Use interactive lifecycle for chat UX and daemon lifecycle for persistent background behavior.
