Skip to main content

groundforgeai/demo

The simple_agent_service_adapter.py example uses explicit input and output adapters.
Complete LangChain Agent Example first, then stop that process.

Why use an adapter?

Automatic mode works when the Agent accepts normal message state and returns a normal final assistant message. Use adapters when your Agent expects a different state object or returns a custom result.

Input adapter

The GroundForge job contains normalized input. The demo reads only the field it needs:
Do not assume fields such as user_id, tenant metadata, or application metadata unless your own Channel contract explicitly supplies them.

Output adapter

Run the example

Use the same environment variables as the previous page:
Send the same weather question and open the Trace.
Screenshot placeholder
Add /images/examples/langchain-adapter-trace.png showing Channel input, Agent execution, and Channel output.
Read SDK Inputs and Outputs for the adapter hooks.
Last modified on July 27, 2026