Dhenara AI Unified Python framework for LLM integrations

A powerful, flexible, and truly open-source Python framework for interacting with AI models from OpenAI, Google AI, Anthropic, and other providers through a consistent interface.

python
from dhenara.ai import AIModelClient
from dhenara.ai.types import AIModelCallConfig, AIModelEndpoint
from dhenara.ai.types.external_api import AIModelAPIProviderEnum
from dhenara.ai.types.genai import AIModelAPI
from dhenara.ai.types.genai.foundation_models.anthropic.chat import Claude37Sonnet

# Create an API
api = AIModelAPI(
    provider=AIModelAPIProviderEnum.ANTHROPIC,
    api_key="your_api_key",
)

# Create an endpoint using a pre-configured model
model_endpoint = AIModelEndpoint(
    api=api,
    ai_model=Claude37Sonnet,
)

# Configure the api call
client = AIModelClient(
    model_endpoint=model_endpoint,
    config=AIModelCallConfig(streaming=True),
    is_async=False,
)

# Generate a response
response = client.generate(prompt="Explain quantum computing in simple terms")

Powerful Features

Everything you need to build advanced AI agents

Dhenara Agent provides a comprehensive set of tools and features to create, deploy, and manage sophisticated AI agents.

Unified API
Interact with different AI providers through a consistent interface, making it easy to switch between models without changing your code.
Type Safety
Built with Pydantic for robust type checking and validation, ensuring your code is reliable and errors are caught early.
Multiple Providers
Support for OpenAI, Google AI, Anthropic, DeepSeek, Vertex AI, Amazon Bedrock, and Microsoft Azure AI.
Streaming Support
First-class support for streaming responses along with accumulated responses for a consistent developer experience.
Cost Tracking
Monitor token usage and associated costs to keep your AI implementation cost-effective and transparent.
Open Source
Truly open-source and community-focused, designed for transparency and extensibility.

Key Benefits

Build better AI agents faster

Dhenara Agent's design principles enable faster development, better maintainability, and more powerful AI agents.

Genuinely Open Source

Built from the ground up as a community resource, not an afterthought or internal tool. Our open-source commitment means you can trust the code and contribute to its improvement.

Genuinely Open Source

Multiple Model Support

Easily switch between models and providers at runtime without reconfiguration. Work with foundation models regardless of which provider is serving them.

Multiple Model Support

Ready for Dhenara Agent

Dhenara AI serves as the foundation for Dhenara Agent, our open-source framework for creating sophisticated AI agents with its own DSL. Build complex agent workflows on top of this robust foundation.

Ready for Dhenara Agent

Why Choose Dhenara AI?

Dhenara AI offers significant advantages compared to other LLM frameworks:

Advantages

  • Genuinely open-source with a community-first approach
  • Unified API across multiple providers with easy switching
  • Built-in cost tracking and usage monitoring
  • Strong focus on type safety with Pydantic
  • First-class streaming support with consistent response handling
  • Simple configuration with sensible defaults
  • Foundation for the Dhenara Agent framework

Ready to simplify your AI development?Get started with Dhenara AI today.