Skip to main content

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

Project description

drishti-ai-sdk

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

PyPI License: MIT


Installation

pip install drishti-ai-sdk

Quick Start

from drishti import Drishti

drishti = Drishti(api_key="dk_live_...")

with drishti.trace("handle_user_query", input=user_query) as trace:
    result = agent.run(user_query)
    trace.set_output(result)
# Done! Trace appears in your dashboard at drishti.dev

Step-by-Step Tracing

with drishti.trace("rag_pipeline", input=question) as trace:
    
    with trace.step("memory_lookup", "memory") as step:
        context = vector_db.search(question, top_k=5)
        step.set_output({"chunks": len(context)})
    
    with trace.step("llm_call", "llm") as step:
        response = openai.chat.completions.create(
            model="gpt-4o-mini",
            messages=[{"role": "user", "content": question}]
        )
        step.record_llm(
            "gpt-4o-mini",
            tokens_input=response.usage.prompt_tokens,
            tokens_output=response.usage.completion_tokens,
        )
    
    trace.set_output(response.choices[0].message.content)

Decorator Pattern

@drishti.watch
def run_agent(query: str) -> str:
    return agent.run(query)

# Auto-traced on every call
result = run_agent("What is the weather in Mumbai?")

INR Cost Tracking

Every trace automatically shows cost in ₹ — no manual calculation needed.

Supported models:

  • OpenAI: GPT-4o, GPT-4o-mini, O1, O3-mini, and more
  • Anthropic: Claude Opus 4, Claude Sonnet 4, Claude Haiku 4
  • Google: Gemini 2.0 Flash, Gemini 2.5 Pro
  • DeepSeek: DeepSeek V3, R1
  • Meta: Llama 3.3, 3.1 series
  • Mistral: Mistral Large, Small, Mixtral

Environment Variables

DRISHTI_API_KEY=dk_live_your_key_here
DRISHTI_ENDPOINT=https://drishti-backend.3fks.onrender.com  # optional

Graceful Failure

If Drishti's server is down, your agent keeps working. All sends are async in a background thread and never block your code.

Dashboard

Get your API key at drishti.dev


Built with ❤️ for Indian 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.1.tar.gz (13.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.1-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: drishti_ai_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 13.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.1.tar.gz
Algorithm Hash digest
SHA256 42c7949d7889e89aacf19b7c534c7b132999ba184c155b766c092637860274a3
MD5 de664a350567586ccae609f02e6ea6f5
BLAKE2b-256 cbf6e58bd72f1b9c3cc7ee12b4ba17c7b1f7419d6f3de096886221c99579f750

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drishti_ai_sdk-0.1.1-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.14.2

File hashes

Hashes for drishti_ai_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f61d3d7da1d06a75941a115840932f968e8ec5817952ec95c29be8a56a6ec94b
MD5 fa684336ec7f99f62e0805eb1da2a106
BLAKE2b-256 001a4ec3accb2d0b76aebd9dee0b8164f4b241be4a07528139f6df8408ae7eaf

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