GroundForge Channel jobs and LangChain Agent state do not always have the same shape. The SDK offers two approaches.
Automatic mode
Use automatic mode when the Agent accepts normal message state and returns a normal final assistant message:
The LangChain Agent Example uses this approach.
Use an input adapter when your Agent expects a custom state object. A Channel job contains normalized request text in job["input"]:
Do not assume application metadata such as a user ID is present. Read only the fields your actual Channel job supplies.
Output adapter
Use an output adapter when the Agent returns a custom result:
Pass both adapters to init_groundforge():
See the complete LangChain Agent with Adapters walkthrough.
Example
Compare LangChain Agent Example with LangChain Agent with Adapters. The adapter page uses only the normalized job["input"] field. Last modified on July 27, 2026