Skip to main content

Vizu is a high-performance observability and tracing platform for LLM agents and AI apps, combining semantic search, specialized evals (RAGAS, G-Eval, toxicity), and Git-like versioning of prompts and responses.

Project description

Vizu Python SDK

Python SDK for Vizu - A purpose-built agent trace engine for LLM agents.

Installation

pip install vizu

With Framework Integrations

# Install specific framework integrations
pip install vizu[langchain]      # LangChain / LangGraph
pip install vizu[llamaindex]     # LlamaIndex
pip install vizu[openai-agents]  # OpenAI Agents SDK
pip install vizu[autogen]        # Microsoft AutoGen
pip install vizu[semantic-kernel] # Semantic Kernel
pip install vizu[crewai]         # CrewAI
pip install vizu[smolagents]     # Hugging Face smolagents
pip install vizu[pydantic-ai]    # PydanticAI
pip install vizu[strands]        # AWS Strands Agents
pip install vizu[google-adk]     # Google ADK

# Or install all framework integrations at once
pip install vizu[all-frameworks]

# For development (includes all frameworks + dev tools)
pip install vizu[all]

Quick Start

from vizu import VizuClient, SpanType

# Initialize client
client = VizuClient(
    url="http://localhost:8080",
    tenant_id=1,
    project_id=0
)

# Log a trace
with client.trace(span_type=SpanType.ROOT) as root:
    # Planning step
    with root.child(SpanType.PLANNING) as planning:
        planning.set_token_count(50)
        planning.set_confidence(0.95)
    
    # Tool call
    with root.child(SpanType.TOOL_CALL) as tool:
        tool.set_token_count(20)
        tool.set_duration_ms(150)
    
    # Final response
    with root.child(SpanType.RESPONSE) as response:
        response.set_token_count(80)
        response.set_confidence(0.94)

# Query traces
edges = client.query_temporal_range(
    start_timestamp_us=start_time,
    end_timestamp_us=end_time
)

# Get causal relationships
children = client.get_children(edge_id)
ancestors = client.get_ancestors(edge_id)

Framework Integrations

Vizu provides seamless integrations for all major AI agent frameworks:

Supported Frameworks

Framework Install Documentation
LangChain / LangGraph pip install vizu[langchain] Chains, agents, workflows
LlamaIndex pip install vizu[llamaindex] Query engines, agents, workflows
OpenAI Agents SDK pip install vizu[openai-agents] Agent wrappers, sessions
Microsoft AutoGen pip install vizu[autogen] Multi-agent conversations
Semantic Kernel pip install vizu[semantic-kernel] Kernel functions, planners
CrewAI pip install vizu[crewai] Crews, tasks, collaboration
Hugging Face smolagents pip install vizu[smolagents] Code agents, tool calling
PydanticAI pip install vizu[pydantic-ai] Type-safe agents
Strands Agents pip install vizu[strands] AWS agents, multi-provider
Google ADK pip install vizu[google-adk] Gemini agents

Quick Integration Examples

LangChain

from vizu.integrations.langchain import VizuCallbackHandler
from langchain.chains import LLMChain

callback = VizuCallbackHandler(
    url="http://localhost:8080",
    tenant_id=1
)

chain = LLMChain(llm=llm, callbacks=[callback])
result = chain.run("What is the weather?")

LlamaIndex

from vizu.integrations.llamaindex import create_callback_manager
from llama_index.core import VectorStoreIndex

callback_manager = create_callback_manager(
    vizu_url="http://localhost:8080",
    tenant_id=1
)

index = VectorStoreIndex.from_documents(
    documents,
    callback_manager=callback_manager
)

OpenAI Agents SDK

from vizu.integrations.openai_agents import VizuAgentWrapper
from openai_agents import Agent

agent = Agent(name="assistant", instructions="You are helpful")
wrapped = VizuAgentWrapper(
    agent=agent,
    vizu_url="http://localhost:8080",
    tenant_id=1
)

session = wrapped.create_session()
response = wrapped.run(session, "Hello!")

PydanticAI

from vizu.integrations.pydantic_ai import wrap_pydantic_ai_agent
from pydantic_ai import Agent

agent = Agent("openai:gpt-4")
agent = wrap_pydantic_ai_agent(
    agent,
    vizu_url="http://localhost:8080",
    tenant_id=1
)

result = agent.run_sync("Process this request")

📚 For detailed integration guides and examples, see INTEGRATIONS.md

Features

Core SDK

  • Low-level API: Direct control over edge creation and querying
  • Context Managers: Pythonic span tracking with automatic parent-child relationships
  • Async Support: Full async/await support for high-performance applications
  • Type Safety: Full type hints and Pydantic models
  • Causal Queries: Navigate agent reasoning graphs
  • Semantic Search: Find similar traces using vector embeddings

Framework Integrations (New in v2.0!)

  • 10+ Framework Support: LangChain, LlamaIndex, OpenAI Agents, AutoGen, and more
  • Automatic Tracking: LLM calls, token usage, costs, and execution timing
  • OpenTelemetry GenAI: Full semantic conventions support
  • Production Ready: Async/sync, error resilience, connection pooling
  • Zero Code Changes: Wrap existing agents with minimal modifications

Documentation

License

MIT License

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

vizu_client-0.1.0.tar.gz (64.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vizu_client-0.1.0-py3-none-any.whl (71.3 kB view details)

Uploaded Python 3

File details

Details for the file vizu_client-0.1.0.tar.gz.

File metadata

  • Download URL: vizu_client-0.1.0.tar.gz
  • Upload date:
  • Size: 64.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vizu_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f3f1dbba9b3cc90e385d244ad406860869dd07a0fda97afd170a747a3c4cea6
MD5 0f7f958398a3d99e672106eaa2c74c98
BLAKE2b-256 d4fe3e6c2c084e9d9eb9bc5713a09f2a25bd2129b3986c067c585b5e7ba835ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for vizu_client-0.1.0.tar.gz:

Publisher: workflow.yml on sushanthpy/vizu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vizu_client-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vizu_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 71.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vizu_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 504126fd0cc62e85ce4b039b1b47bfed2a345c388ca352da96fe626a31ddae29
MD5 86baaede25b8f2afc2c0f14bcb6397ff
BLAKE2b-256 f385fac42b7ace370317bcf7d04b448baeb759e746c91ea2a1fe8a855e5ddc90

See more details on using hashes here.

Provenance

The following attestation bundles were made for vizu_client-0.1.0-py3-none-any.whl:

Publisher: workflow.yml on sushanthpy/vizu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page