Framework-agnostic reasoning trace visualization tool for AI agents.
Project description
agentvis
agentvis visualizes an agent’s reasoning trace, giving you clear insight into why the agent chose a particular path or triggered a specific tool call.
By exposing the influence flow behind each decision, it transforms opaque agent behavior into something understandable and actionable — so you can confidently refine and improve your prompts, which is often the hardest part of building reliable agents. 🧠✨
agentvis reasoning visualization example
Installation
Install core:
pip install agentvis
With LangChain support:
pip install agentvis[langchain]
How to generate an agent reasoning graph
1. Define your LangChain / LangGraph agent
from langchain_tavily import TavilySearch
from langchain_google_genai import ChatGoogleGenerativeAI
from langchain.agents import create_agent
from langchain.messages import HumanMessage
import os
os.environ["TAVILY_API_KEY"] = "<your-tavily-api-key>"
tavily_search = TavilySearch(
max_results=5,
search_depth="basic",
)
llm = ChatGoogleGenerativeAI(
model="gemini-2.5-flash-lite",
temperature=0.7,
google_api_key="<your-google-api-key>",
)
agent = create_agent(
llm,
[tavily_search],
system_prompt=(
"You are a helpful web search agent. "
"Use the Tavily tool when you need fresh information from the web."
),
)
result = agent.invoke(
{"messages": [HumanMessage("Top warm countries and weather of each.")]}
)
messages = result["messages"]
2. Build the reasoning graph with agentvis and get a shareable link in exchange of messages produced by agent
from agentvis.framework.langchain import LangChainAdapter
from agentvis.core.export import ExportFactory
# Convert LLM messages into an AgentGraph
graph = LangChainAdapter().build_agent_graph(messages)
# Export as a short link you can open in the UI
link = ExportFactory.export_graph(graph=graph, export_strategy="link") # or "json"
print(link)
Open the printed
linkin your browser to inspect the full reasoning trace of thewebsearchagent.
License
This project is licensed under the Apache License 2.0.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentvis-0.1.2.tar.gz.
File metadata
- Download URL: agentvis-0.1.2.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ed891c69f0531dde00fb01e0c436df077c8c8f65399b02965142d0c1902555d
|
|
| MD5 |
3e6ffc2678521ed69a7df2e321528037
|
|
| BLAKE2b-256 |
cbe540fad4ecc8b7b78ffe620dadc63c1562195aebcb86a1cd4ebf93f52458f4
|
File details
Details for the file agentvis-0.1.2-py3-none-any.whl.
File metadata
- Download URL: agentvis-0.1.2-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06f308e2478aba2c77ae30259c68f00d1c4ed39df51ce43f2c84c1c9b330034a
|
|
| MD5 |
b14807e3332d81c1f0f2481aba57afc5
|
|
| BLAKE2b-256 |
030e7d15da9d45449e06d88edda4ddac793f8ee8ec67b8ee132043732c628da9
|