Skip to main content

India's AI agent observability SDK — INR-native, 2 lines of code

Project description

Drishti AI SDK

PyPI License: MIT

India's AI Agent Observability SDK — See inside your AI agent. 2 lines of code. INR-native. Zero config.

Drishti is a lightweight, high-performance observability tool designed specifically for AI agents and LLM applications. It allows developers to monitor step-by-step agent execution, track token usage, calculate precise API costs automatically in Indian Rupees (INR), and capture error traces seamlessly—all without blocking your application's execution.

Access your complete dashboard and analytics at drishtiai.dev.


🚀 Installation

Install the Drishti SDK via pip:

pip install drishti-ai-sdk

⚡ Quick Start

Integrating Drishti takes just two lines of code. Here is the raw Python quick start:

from drishti import Drishti

# 1. Initialize the client
drishti = Drishti(api_key="dk_your_api_key_here")

# 2. Wrap your agent execution
with drishti.trace("my_agent") as trace:
    result = agent.run(user_query)
    trace.set_output(result)

# Done! The trace is automatically sent to your dashboard in the background.

Note: Replace dk_your_api_key_here with your actual API key from the dashboard.

🔍 Step-by-Step Tracing

For deeper visibility into complex pipelines (like RAG), trace individual steps such as vector database lookups and direct LLM API calls.

with drishti.trace("rag_pipeline", input=question) as trace:
    
    # Trace a specific step (e.g., retrieving context)
    with trace.step("memory_lookup", "memory") as step:
        context = vector_db.search(question, top_k=5)
        step.set_output({"chunks": len(context)})
    
    # Trace an LLM generation step
    with trace.step("llm_call", "llm") as step:
        response = openai.chat.completions.create(
            model="gpt-4o-mini",
            messages=[{"role": "user", "content": question}]
        )
        # Automatically calculate costs and record token usage
        step.record_llm(
            model="gpt-4o-mini",
            tokens_input=response.usage.prompt_tokens,
            tokens_output=response.usage.completion_tokens
        )
    
    trace.set_output(response.choices[0].message.content)

💰 INR Cost Tracking

Every trace automatically calculates your cost natively in ₹ (INR)—no manual currency conversion logic needed.

Drishti supports 28+ leading models out of the box:

  • OpenAI: GPT-4o, GPT-4o-mini, o1, o3-mini
  • Anthropic: Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku
  • Google: Gemini 2.0 Flash, Gemini 1.5 Pro
  • DeepSeek: DeepSeek-V3, DeepSeek-R1
  • Meta: Llama 3.3 70B, Llama 3.1 series
  • Mistral: Mistral Large, Mistral Small, Mixtral

Using an unsupported model name still works—Drishti will apply a standard fallback estimate.

🛡️ Zero Overhead & Graceful Failure

If the Drishti ingestion servers are unreachable or your network drops, your agent keeps working. All trace telemetry is sent asynchronously via a background thread, ensuring absolutely zero blocking overhead on your critical path.

⚙️ Configuration

You can configure Drishti via environment variables instead of hardcoding credentials:

DRISHTI_API_KEY=dk_live_your_key_here
# DRISHTI_ENDPOINT=https://drishti-backend-3fks.onrender.com  # Optional for custom endpoints

📊 Dashboard

Get your API key and view your Agent's analytics live at drishtiai.dev.


Built with ❤️ for developers.

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

drishti_ai_sdk-0.1.4.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

drishti_ai_sdk-0.1.4-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file drishti_ai_sdk-0.1.4.tar.gz.

File metadata

  • Download URL: drishti_ai_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for drishti_ai_sdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 db64ae211afca9208ecfff4170edc0d3e2889014eeb68018b9f778012cf34680
MD5 9f6bf994e82b58756daf3968a9806187
BLAKE2b-256 1f36f3fa60c49bfa77f6a40ff7db1dae58e882506543891d3bd4166778d63e80

See more details on using hashes here.

File details

Details for the file drishti_ai_sdk-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: drishti_ai_sdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for drishti_ai_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 00d1986c28d08edcb6bf3d1095c08e10bd7ddd2451fc036dfc6811c6566a2357
MD5 2c72e5e783c2d15d8a08e9b81a108e16
BLAKE2b-256 59598153177927c940558e9b67a017ab75b50ea7db3121c5e20ea479076a21f8

See more details on using hashes here.

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