test_agent_name_async() — langchain Function Reference
Architecture documentation for the test_agent_name_async() function in test_agent_name.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 75fad02d_5385_8f8b_eaa3_8e55f9390f66["test_agent_name_async()"] 855858ac_82a7_eb82_4d23_1dd8507dbcbb["test_agent_name.py"] 75fad02d_5385_8f8b_eaa3_8e55f9390f66 -->|defined in| 855858ac_82a7_eb82_4d23_1dd8507dbcbb style 75fad02d_5385_8f8b_eaa3_8e55f9390f66 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/test_agent_name.py lines 72–84
async def test_agent_name_async() -> None:
"""Test that agent name is set on AIMessage in async execution."""
tool_calls: list[list[ToolCall]] = [[]]
agent = create_agent(
model=FakeToolCallingModel(tool_calls=tool_calls),
name="async_agent",
)
result = await agent.ainvoke({"messages": [HumanMessage("Hello async")]})
ai_messages = [m for m in result["messages"] if isinstance(m, AIMessage)]
assert len(ai_messages) == 1
assert ai_messages[0].name == "async_agent"
Domain
Subdomains
Source
Frequently Asked Questions
What does test_agent_name_async() do?
test_agent_name_async() 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() defined?
test_agent_name_async() is defined in libs/langchain_v1/tests/unit_tests/agents/test_agent_name.py at line 72.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free