LangGraph Guide
Deploy LangGraph agents on Maritime.
Configuration
maritime.toml
[agent]
name = "my-graph"
framework = "langgraph"
tier = "extended"
[triggers]
webhook = true
cron = "0 */4 * * *"Entry Point
graph.py
from langgraph.graph import StateGraph, END
def run(payload: dict) -> dict:
# Define your LangGraph workflow
workflow = StateGraph(dict)
def process(state):
return {"result": f"Processed: {state.get('input', '')}"}
workflow.add_node("process", process)
workflow.set_entry_point("process")
workflow.add_edge("process", END)
app = workflow.compile()
result = app.invoke(payload)
return result