Skip to main content

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

Project description

drishti-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-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://api.drishti.dev  # 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.0.tar.gz (13.1 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.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: drishti_ai_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 13.1 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.0.tar.gz
Algorithm Hash digest
SHA256 7a54b990496a9d1f5f06f8dc40779ed5141da3fa1add8e0f36f4462347d03068
MD5 d68b16d85f9830a82c97806c60559a69
BLAKE2b-256 5445f222da430d269ce19d909d104875e398f8a1a230d8ab96156e41a94e7144

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drishti_ai_sdk-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97d49002a4edb9177d51952b9a19f29970cb3fd4df6d00c888ae50640765d069
MD5 7de5d1941373dbde3f2c763bccba26ff
BLAKE2b-256 ad7b020a3091d735e1114d6c92ac857e838e9881df7b4cc52c14a9df3caaf52e

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