Home / Function/ test_simple_agent_graph() — langchain Function Reference

test_simple_agent_graph() — langchain Function Reference

Architecture documentation for the test_simple_agent_graph() function in test_framework.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  8e097cb2_b789_4dfa_17cf_5719b52badb9["test_simple_agent_graph()"]
  8310d669_2524_e019_e333_8473b50a4990["test_framework.py"]
  8e097cb2_b789_4dfa_17cf_5719b52badb9 -->|defined in| 8310d669_2524_e019_e333_8473b50a4990
  style 8e097cb2_b789_4dfa_17cf_5719b52badb9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py lines 202–216

def test_simple_agent_graph(snapshot: SnapshotAssertion) -> None:
    @tool
    def my_tool(input_string: str) -> str:
        """A great tool."""
        return input_string

    agent_one = create_agent(
        model=FakeToolCallingModel(
            tool_calls=[[ToolCall(id="1", name="my_tool", args={"input": "yo"})]],
        ),
        tools=[my_tool],
        system_prompt="You are a helpful assistant.",
    )

    assert agent_one.get_graph().draw_mermaid() == snapshot

Domain

Subdomains

Frequently Asked Questions

What does test_simple_agent_graph() do?
test_simple_agent_graph() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py.
Where is test_simple_agent_graph() defined?
test_simple_agent_graph() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py at line 202.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free