2, Dann möchte ich meinen Agenten als LangGraph-Server bereitstellen, also führe ich „langgraph dev“ aus, es gibt mir die Fehlermeldung: langgraph_api.utils.errors.GraphLoadError: Fehler beim Laden des Diagramms „Graph with Memory“ aus src/agent/graph.py: Kein Modul namens „agent“
3, hier ist meine Projektstruktur :
Projektstrukturbild
und langgraph.json-Code:
Code: Select all
{
"$schema": "https://langgra.ph/schema.json",
"dependencies": ["."],
"graphs": {
"Graph with Memory": "src/agent/graph.py:graph"
},
"env": ".env",
"image_distro": "wolfi",
"store": {
"index": {
"embed": "src/agent/llm/models.py:get_embeddings",
"dimensions": 1024,
"fields": ["content.memory_fragments[*].content", "content.memory_fragments[*].scene"]
}
}
}
Code: Select all
...
graph = workflow.compile(name="Graph with Memory", checkpointer=my_checkpointer, store=my_store)