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.2.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.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: drishti_ai_sdk-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 e94e43d0b75190152b7d7b3d32f25f81c08ed83db207d3ffeb3f2eec2a127af9
MD5 9842b516fb37dee7ef9ebc3666f1b9b1
BLAKE2b-256 6651391f5c8d078d2381bd7d1f823d37f930d46ec8cfe791429b82d77b4c7255

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drishti_ai_sdk-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ecc43193458ad6bfca2c2744c2a8f2d07d99aa4a3edc69bb18e79ce79305e4e7
MD5 f64f6044ae7981a5a4a7a21779585d35
BLAKE2b-256 f10aa1be11a6e75d7f1ea716692ef99a10178f8225984977e25758897816d9e3

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