Installation and setup
You can refer to the installation guide to installpyagentspec.
You can subsequently install the LangGraph Adapter through its extra dependency:
LangGraph adapter
The LangGraph Adapter allows for instantiation and execution of Open Agent Spec configurations using LangGraph. TheAgentSpecLoader class is responsible for loading Agent Spec configurations (in JSON or YAML format) and instantiating them as runnable agents within the LangGraph environment. It also includes support for mapping of declared tools to corresponding Python functions.
The following example shows the creation of a simple Agent Spec Agent and its conversion into a LangGraph assistant.
Starting from the Agent Spec Agent creation:
AgentSpecLoader.
The example also showcases the mapping of the tool and the execution of a conversation.