Skip to content

Feature/prebuilt2#122

Merged
Iamsdt merged 14 commits into
mainfrom
feature/prebuilt2
May 22, 2026
Merged

Feature/prebuilt2#122
Iamsdt merged 14 commits into
mainfrom
feature/prebuilt2

Conversation

@Iamsdt
Copy link
Copy Markdown
Collaborator

@Iamsdt Iamsdt commented May 22, 2026

This pull request primarily removes support for Composio and LangChain tool integrations from the core tool node system, simplifies the StateGraph initialization, and adds new shared helpers for tool node executors. It also includes several documentation and planning file cleanups, removing outdated or redundant content.

Core codebase changes:

  • ToolNode simplification and cleanup:

    • Removed Composio and LangChain tool support from ToolNode by eliminating related mixins, adapters, and documentation references. The class now focuses on local and MCP (Model Context Protocol) tools only. [1] [2] [3] [4]
    • Added a new _helpers.py module with shared utility functions for tool node executors, such as safe serialization, status normalization, and error extraction.
  • StateGraph improvements:

    • Changed the id_generator argument in StateGraph.__init__ to accept None and default to DefaultIDGenerator if not provided, improving flexibility and testability. [1] [2]
    • Lowered the logging level in the _setup method from info to debug for less noisy logs during setup.
    • Minor code cleanup in _resolve_named_tool_nodes.

Documentation and planning file updates:

  • Removed outdated or redundant content:
    • Deleted the detailed project overview from Overview.md, as well as checklist and planning items from Checklist.md, Plans.md, Plan2.md, and TODO.txt, likely as part of a documentation refresh or migration. [1] [2] [3] [4] [5]

Iamsdt added 11 commits May 21, 2026 23:43
- Refactor ReactAgent constructor to include additional parameters for tools, memory, and multimodal configurations.
- Introduce a new example script demonstrating the usage of ReactAgent with a weather tool.
- Add helper functions for tool routing and graph configuration.
- Update tests to cover new functionalities and ensure proper initialization and compilation of the agent.
- Introduced _helpers.py to centralize shared helper functions and constants for tool node executors.
- Split LocalExecMixin, MCPMixin, and KwargsResolverMixin into separate files for better organization and maintainability.
- Updated executors to utilize the new helper functions for serialization and status extraction.
- Enhanced error handling and message formatting in the execution flow.
- Changed ExecutionStatus and StopRequestStatus to use StrEnum for better string representation.
- Updated StreamEvent to use StrEnum for consistency.
- Removed deprecated merge_two_state function from utils.py.
…tion

- Introduced StructuredOutputAgent to ensure structured LLM output with automatic repair on validation failure.
- Updated agent initialization to accept output schema and max attempts.
- Implemented routing logic for handling valid and invalid outputs, including tool calls.
- Added examples demonstrating usage of StructuredOutputAgent for structured extraction and tool integration.
- Created comprehensive unit tests for StructuredOutputAgent, covering various scenarios and edge cases.
- Cleaned up mock MCP client by removing unnecessary lines.
- Introduced `test_supervisor_team_agent.py` with tests covering WorkerConfig, supervisor prompt building, routing logic, and agent initialization for SupervisorTeamAgent.
- Added `test_swarm_agent.py` containing tests for SwarmMemberConfig, member routing, agent initialization, and handoff tool functionality for SwarmAgent.
- Both test files ensure robust validation of agent behaviors and configurations, enhancing overall test coverage for the agent framework.
- Introduced a new example script `rag_example.py` demonstrating the usage of RAGAgent in three scenarios: simple vector search, reranking with Cohere, and local reranking with CrossEncoder.
- Implemented a stub store for demonstration purposes and provided instructions for production setup using QdrantStore.
- Enhanced unit tests for RAGAgent, including tests for initialization, compilation, and node behavior.
- Added integration tests to verify the end-to-end functionality of the RAGAgent.
- Updated tests for SupervisorTeamAgent and SwarmAgent to improve clarity and maintainability.
Comment thread tests/prebuilt/test_plan_act_reflect_agent.py Fixed

def test_requires_model(self):
with pytest.raises(TypeError):
StructuredOutputAgent(output_schema=MovieReview) # type: ignore

def test_requires_output_schema(self):
with pytest.raises(TypeError):
StructuredOutputAgent(model="fake-model") # type: ignore
Comment thread tests/prebuilt/test_swarm_agent.py Fixed
Comment thread tests/prebuilt/test_swarm_agent.py Fixed
Comment thread tests/prebuilt/test_swarm_agent.py Fixed
Comment thread tests/prebuilt/test_swarm_agent.py Fixed
Comment thread tests/prebuilt/test_swarm_agent.py Fixed
Comment thread tests/prebuilt/test_swarm_agent.py Fixed
Comment thread tests/prebuilt/test_swarm_agent.py Fixed

def test_requires_model(self):
with pytest.raises(TypeError):
PlanActReflectAgent() # type: ignore
async def aget_all(self, config, **kwargs):
return []

async def aupdate(self, config, record_id, **kwargs): ...
async def aget_all(self, config, **kwargs):
return []

async def aupdate(self, config, record_id, **kwargs): ...
state = await retrieve(state, {})
assert state.execution_meta.internal_data[_RAG_DOCS_KEY] == ["chunk A", "chunk B"]

state = await synthesize(state, {})
state = await retrieve(state, {})
state = await rerank(state, {})
assert state.execution_meta.internal_data[_RAG_DOCS_KEY] == ["high", "mid"]
state = await synthesize(state, {})
def test_compiled_graph_has_correct_nodes_without_reranker(self):
rag = RAGAgent(store=_fake_store(), agent=_fake_agent())
graph = rag.compile()
node_names = set(graph.nodes.keys()) if hasattr(graph, "nodes") else set()
def __init__(
async def arerank(self, query: str, documents: list[str], top_n: int) -> list[str]:
"""Re-rank *documents* for *query* and return the top *top_n* texts."""
...
)
"""

async def asetup(self): ...
@Iamsdt Iamsdt merged commit 9d83d05 into main May 22, 2026
6 checks passed
@Iamsdt Iamsdt deleted the feature/prebuilt2 branch May 22, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant