Skip to content

Commit 0e9ce21

Browse files
authored
relax agent types (#62)
1 parent 7964ad0 commit 0e9ce21

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ MANIFEST
3636
# mypy
3737
.mypy_cache/
3838
.dmypy.json
39-
dmypy.json
39+
dmypy.json
40+
41+
.langgraph_api

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ test_watch:
2222
######################
2323

2424
# Define a variable for Python and notebook files.
25-
lint format: PYTHON_FILES=.
26-
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=. --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
25+
lint format: PYTHON_FILES=langgraph_swarm/ tests/
26+
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=langgraph_swarm/ tests/ --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
2727

2828
lint lint_diff:
2929
[ "$(PYTHON_FILES)" = "" ] || uv run ruff format $(PYTHON_FILES) --diff

langgraph_swarm/swarm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from langgraph.graph import START, MessagesState, StateGraph
2-
from langgraph.graph.state import CompiledStateGraph
2+
from langgraph.pregel import Pregel
33
from typing_extensions import Any, Literal, Optional, Type, TypeVar, Union, get_args, get_origin
44

55
from langgraph_swarm.handoff import get_handoff_destinations
@@ -86,7 +86,7 @@ def route_to_active_agent(state: dict):
8686

8787

8888
def create_swarm(
89-
agents: list[CompiledStateGraph],
89+
agents: list[Pregel],
9090
*,
9191
default_active_agent: str,
9292
state_schema: StateSchemaType = SwarmState,

0 commit comments

Comments
 (0)