Skip to content

Commit d1ee446

Browse files
author
Joongheon Park
committed
feat: add initial agents module with graph structure and templates
- Introduced the agents module with a new graph-based architecture, including Front and Back graphs. - Added base classes for nodes and graphs, enhancing modularity and scalability. - Created scaffold templates for agents, including pyproject.toml and README files. - Implemented state management and node execution logic for both Front and Back graphs. - Included integration and unit tests to ensure functionality and reliability. - Added environment configuration examples and pre-commit setup for code quality management.
1 parent b1f85f0 commit d1ee446

5 files changed

Lines changed: 9 additions & 5 deletions

File tree

act_operator/act_operator/scaffold/{{ cookiecutter.project_dir }}/.cursor/rules/act.mdc renamed to act_operator/act_operator/scaffold/{{ cookiecutter.project_dir }}/.claude/rules/act.mdc

File renamed without changes.

act_operator/act_operator/scaffold/{{ cookiecutter.project_dir }}/.cursor/rules/uv.mdc renamed to act_operator/act_operator/scaffold/{{ cookiecutter.project_dir }}/.claude/rules/uv.mdc

File renamed without changes.

act_operator/act_operator/scaffold/{{ cookiecutter.project_dir }}/casts/{{ cookiecutter.cast_snake }}/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- Graph API Usage: https://docs.langchain.com/oss/python/langgraph/use-graph-api
1616
"""
1717

18-
from langgraph.graph import StateGraph, START, END
18+
from langgraph.graph import END, START, StateGraph
1919

2020
from casts.base_graph import BaseGraph
2121
from casts.{{ cookiecutter.cast_snake }}.modules.nodes import SampleNode

act_operator/act_operator/scaffold/{{ cookiecutter.project_dir }}/casts/{{ cookiecutter.cast_snake }}/modules/nodes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
- Implement :meth:`execute` to mutate and return the graph state.
66
"""
77

8-
from casts.base_node import BaseNode
9-
from casts.base_node import AsyncBaseNode
8+
from casts.base_node import AsyncBaseNode, BaseNode
109

1110
class SampleNode(BaseNode):
1211
"""Sample node for the {{ cookiecutter.cast_name }} graph.

act_operator/act_operator/scaffold/{{ cookiecutter.project_dir }}/casts/{{ cookiecutter.cast_snake }}/modules/state.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
"""[Required] State definition shared across {{ cookiecutter.cast_name }} graphs."""
1+
"""[Required] State definition shared across Test graphs."""
22

33
from __future__ import annotations
44

55
from dataclasses import dataclass
66
from typing import Annotated
7-
from langgraph.graph.message import add_messages
7+
88
from langchain.messages import AnyMessage
9+
from langgraph.graph.message import add_messages
10+
911

1012
@dataclass(kw_only=True)
1113
class InputState:
@@ -14,6 +16,7 @@ class InputState:
1416
Attributes:
1517
query: User query
1618
"""
19+
1720
query: str
1821

1922

@@ -24,6 +27,7 @@ class OutputState:
2427
Attributes:
2528
messages: Additional messages
2629
"""
30+
2731
messages: Annotated[list[AnyMessage], add_messages]
2832

2933

@@ -35,5 +39,6 @@ class State:
3539
query: User query
3640
messages: Additional messages
3741
"""
42+
3843
query: str
3944
messages: Annotated[list[AnyMessage], add_messages]

0 commit comments

Comments
 (0)