langgoap.scaffold_deployment

langgoap.scaffold_deployment#

scaffold_deployment(out_dir, *, graph_factory_module, graph_factory_attr, agent_name, agent_description, python_version='3.12', extra_dependencies=(), force=False)[source]#

Emit a deployable LangGraph directory for a LangGOAP agent.

Parameters:
  • out_dir (Path | str) – Target directory. Created if missing.

  • graph_factory_module (str) – Importable module path the user holds their GoapGraph factory in (e.g. "my_agent.graph").

  • graph_factory_attr (str) – Name of the no-argument callable inside graph_factory_module that returns a configured GoapGraph (e.g. "build_graph").

  • agent_name (str) – Short identifier — becomes the key under graphs in langgraph.json and the MCP tool name once deployed.

  • agent_description (str) – Human-readable description, surfaced in the generated README. When LangGraph’s MCP route enriches tool descriptions in a future release, this is also the natural place to source from.

  • python_version (str) – Python version pinned in langgraph.json. Defaults to "3.12" — LangGraph requires ≥3.11.

  • extra_dependencies (tuple[str, ...]) – Extra pip dependencies appended to the default ["langgoap"]. Use to add LangChain provider packages ("langchain-openai>=0.3"), checkpointer backends, etc.

  • force (bool) – When True, overwrite existing files in out_dir.

Returns:

The output directory path.

Raises:

FileExistsError – When out_dir already contains scaffolded files and force is False.

Return type:

Path