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.3.tar.gz (13.8 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.3-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: drishti_ai_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 13.8 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.3.tar.gz
Algorithm Hash digest
SHA256 b4a33da35be65af10c24d9bdd2b996e9f86af998fad0ef247801ee6ed5d83c0d
MD5 a6c70cc111b52e4a231b399570d56556
BLAKE2b-256 c1a598311b74256d35c95d48566609edcabb9c861bbbe6ada7c1e7d46269c2ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drishti_ai_sdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 13.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 69aed75a15da19e4aaca30d88d7158c0177aec110d60346d82de2293a68099c9
MD5 b0ccd01a0eaff7ae9126558d73fbe42c
BLAKE2b-256 e360bcce2203cd318f96cdaaa982a7640b5d7efcaf1d0f9a4a3a8a9f7aaa0f27

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