test_agent_name_async_multiple_iterations() — langchain Function Reference
Architecture documentation for the test_agent_name_async_multiple_iterations() function in test_agent_name.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 733bbc75_f1ca_7f8a_dc3a_1d0703bd2a7f["test_agent_name_async_multiple_iterations()"] 855858ac_82a7_eb82_4d23_1dd8507dbcbb["test_agent_name.py"] 733bbc75_f1ca_7f8a_dc3a_1d0703bd2a7f -->|defined in| 855858ac_82a7_eb82_4d23_1dd8507dbcbb style 733bbc75_f1ca_7f8a_dc3a_1d0703bd2a7f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/test_agent_name.py lines 87–102
async def test_agent_name_async_multiple_iterations() -> None:
"""Test that agent name is set on all AIMessages in async multi-turn."""
agent = create_agent(
model=FakeToolCallingModel(
tool_calls=[[{"args": {"x": 5}, "id": "call_1", "name": "simple_tool"}], []]
),
tools=[simple_tool],
name="async_multi_agent",
)
result = await agent.ainvoke({"messages": [HumanMessage("Call tool async")]})
ai_messages = [m for m in result["messages"] if isinstance(m, AIMessage)]
assert len(ai_messages) == 2
for msg in ai_messages:
assert msg.name == "async_multi_agent"
Domain
Subdomains
Source
Frequently Asked Questions
What does test_agent_name_async_multiple_iterations() do?
test_agent_name_async_multiple_iterations() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/test_agent_name.py.
Where is test_agent_name_async_multiple_iterations() defined?
test_agent_name_async_multiple_iterations() is defined in libs/langchain_v1/tests/unit_tests/agents/test_agent_name.py at line 87.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free