Skip to content

API agentmesh_adapter

Devrajsinh Gohil edited this page Aug 30, 2026 · 1 revision

API Reference: agentmesh_adapter

Public Python adapter module for compiling and running LangGraph workflows on AgentMesh.


agentmesh_adapter.compile(builder, checkpointer=None)

Compiles a LangGraph StateGraph builder into an AgentMeshCompiledApp.

Parameters

  • builder (StateGraph): The configured LangGraph workflow builder.
  • checkpointer (Optional): A checkpoint saver instance (e.g. MemorySaver).

Returns

  • AgentMeshCompiledApp: The compiled executable workflow instance.

AgentMeshCompiledApp

Methods

invoke(initial_state: dict, config: Optional[dict] = None) -> dict

Synchronously executes the workflow to completion.

ainvoke(initial_state: dict, config: Optional[dict] = None) -> Coroutine[dict]

Asynchronously executes the workflow on the event loop.

stream(initial_state: dict, config: Optional[dict] = None) -> Iterator[dict]

Streams state snapshots after wave execution.

astream(initial_state: dict, config: Optional[dict] = None) -> AsyncIterator[dict]

Asynchronously streams state snapshots.

get_state(config: dict) -> Optional[dict]

Retrieves persisted checkpoint state for the given configuration thread.\n

Clone this wiki locally