# Dhenara Agent DSL (DAD)
## Overview
Dhenara Agent DSL (DAD) is an open-source framework built on top of the `dhenara-ai` Python package. It provides a
powerful, expressive, and type-safe domain-specific language (DSL) for defining and executing AI agent workflows. DAD
makes it easier to create, compose, and orchestrate AI agents with sophisticated behaviors, while maintaining robust
observability and reproducibility.
For full documentation, visit [docs.dhenara.com](https://docs.dhenara.com/).
## What is Dhenara Agent DSL?
Dhenara Agent DSL or DAD (available as a Python package named `dhenara-agent`) is an AI agent framework with a strong
focus on:
1. **Expressive Agent Definition**: Create complex agent workflows using a straightforward, programming language-like
approach
2. **Component-Based Architecture**: Compose reusable components to build sophisticated agent systems
3. **Out-of-the-box Support for Multiple LLMs**: Switch between different LLM models on the fly
4. **Comprehensive Observability**: Built-in logging, tracing, and metrics collection for all agent activities using
OpenTelemetry and open-source exporters like Zipkin and Jaeger
5. **Reproducible Execution**: Track and replay agent execution through a run context system, reducing costs by
rerunning failed flows without additional AI Model API calls
6. **Extensible Node System**: Easily create custom node types to extend functionality
7. **Resource Management**: Flexible management of AI model resources and credentials
## Installation
You can install the Dhenara Agent DSL framework using pip:
```bash
pip install dhenara-agent
```
## Core Concepts
### Basic Elements
DAD uses a hierarchical component model that allows for composition and reuse. It is built around three primary types of
components:
- **Execution Nodes**: Atomic execution units that perform specific functions (e.g., making an LLM API call, analyzing a
folder, performing file operations like creating/updating files)
- **Execution Flows**: Collections of nodes or sub-flows with execution logic, supporting sequential execution,
conditionals, and loops
- **Agents**: Higher-level abstractions that can contain flows and other agents, representing complete functional units
### Event-Driven Architecture
An event system enables loose coupling between components, allowing agents to react to events, request inputs, and
communicate with each other without tight coupling.
### Powerful Template Engine
A powerful template engine supports variable substitution, expressions, and hierarchical references, making it easy to
build dynamic prompts and process responses.
### Execution Model
The execution follows a hierarchical structure:
1. Components (Agents or Flows) define the overall structure
2. Nodes within components perform specific tasks
3. A RunContext manages the execution environment
4. Tracing, logging, and metrics provide visibility into execution
### Resource Management
DAD provides a flexible system for managing AI model resources and API credentials, making it easier to work with
different LLM providers and models.
## Usage Examples
### Basic Example
Here's a simple example of defining a flow using DAD:
```python
from dhenara.agent.dsl import (
AIModelNode,
AIModelNodeSettings,
FlowDefinition,
ResourceConfigItem,
)
from dhenara.ai.types import Prompt
# Define a flow
my_flow = FlowDefinition()
# Add an AI model node to the flow
my_flow.node(
"question_answerer",
AIModelNode(
resources=ResourceConfigItem.with_model("claude-3-5-haiku"),
settings=AIModelNodeSettings(
system_instructions=["You are a helpful assistant."],
prompt=Prompt.with_dad_text("Answer the following question: $var{question}"),
),
),
)
```
## Documentation
For comprehensive documentation including tutorials, API reference, and advanced usage examples, visit [docs.dhenara.com](https://docs.dhenara.com/).
Raw data
{
"_id": null,
"home_page": "https://github.com/dhenara/dhenara-agent",
"name": "dhenara-agent",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ai, llm, machine learning, language models, ai agents, agent frameworks",
"author": "Dhenara",
"author_email": "support@dhenara.com",
"download_url": "https://files.pythonhosted.org/packages/31/f8/64a2e37ac73fd75ac00d0bcca51437eb82a12ff0b574ed637e70fe50dbfd/dhenara_agent-0.3.0.tar.gz",
"platform": null,
"description": "# Dhenara Agent DSL (DAD)\n\n## Overview\n\nDhenara Agent DSL (DAD) is an open-source framework built on top of the `dhenara-ai` Python package. It provides a\npowerful, expressive, and type-safe domain-specific language (DSL) for defining and executing AI agent workflows. DAD\nmakes it easier to create, compose, and orchestrate AI agents with sophisticated behaviors, while maintaining robust\nobservability and reproducibility.\n\nFor full documentation, visit [docs.dhenara.com](https://docs.dhenara.com/).\n\n\n## What is Dhenara Agent DSL?\n\nDhenara Agent DSL or DAD (available as a Python package named `dhenara-agent`) is an AI agent framework with a strong\nfocus on:\n\n1. **Expressive Agent Definition**: Create complex agent workflows using a straightforward, programming language-like\n approach\n2. **Component-Based Architecture**: Compose reusable components to build sophisticated agent systems\n3. **Out-of-the-box Support for Multiple LLMs**: Switch between different LLM models on the fly\n4. **Comprehensive Observability**: Built-in logging, tracing, and metrics collection for all agent activities using\n OpenTelemetry and open-source exporters like Zipkin and Jaeger\n5. **Reproducible Execution**: Track and replay agent execution through a run context system, reducing costs by\n rerunning failed flows without additional AI Model API calls\n6. **Extensible Node System**: Easily create custom node types to extend functionality\n7. **Resource Management**: Flexible management of AI model resources and credentials\n\n## Installation\n\nYou can install the Dhenara Agent DSL framework using pip:\n\n```bash\npip install dhenara-agent\n```\n\n## Core Concepts\n\n### Basic Elements\n\nDAD uses a hierarchical component model that allows for composition and reuse. It is built around three primary types of\ncomponents:\n\n- **Execution Nodes**: Atomic execution units that perform specific functions (e.g., making an LLM API call, analyzing a\n folder, performing file operations like creating/updating files)\n- **Execution Flows**: Collections of nodes or sub-flows with execution logic, supporting sequential execution,\n conditionals, and loops\n- **Agents**: Higher-level abstractions that can contain flows and other agents, representing complete functional units\n\n### Event-Driven Architecture\n\nAn event system enables loose coupling between components, allowing agents to react to events, request inputs, and\ncommunicate with each other without tight coupling.\n\n### Powerful Template Engine\n\nA powerful template engine supports variable substitution, expressions, and hierarchical references, making it easy to\nbuild dynamic prompts and process responses.\n\n### Execution Model\n\nThe execution follows a hierarchical structure:\n\n1. Components (Agents or Flows) define the overall structure\n2. Nodes within components perform specific tasks\n3. A RunContext manages the execution environment\n4. Tracing, logging, and metrics provide visibility into execution\n\n### Resource Management\n\nDAD provides a flexible system for managing AI model resources and API credentials, making it easier to work with\ndifferent LLM providers and models.\n\n## Usage Examples\n\n### Basic Example\n\nHere's a simple example of defining a flow using DAD:\n\n```python\nfrom dhenara.agent.dsl import (\n AIModelNode,\n AIModelNodeSettings,\n FlowDefinition,\n ResourceConfigItem,\n)\nfrom dhenara.ai.types import Prompt\n\n# Define a flow\nmy_flow = FlowDefinition()\n\n# Add an AI model node to the flow\nmy_flow.node(\n \"question_answerer\",\n AIModelNode(\n resources=ResourceConfigItem.with_model(\"claude-3-5-haiku\"),\n settings=AIModelNodeSettings(\n system_instructions=[\"You are a helpful assistant.\"],\n prompt=Prompt.with_dad_text(\"Answer the following question: $var{question}\"),\n ),\n ),\n)\n```\n\n\n\n## Documentation\n\nFor comprehensive documentation including tutorials, API reference, and advanced usage examples, visit [docs.dhenara.com](https://docs.dhenara.com/).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Dhenara Agent DSL (DAD) Framework SDK",
"version": "0.3.0",
"project_urls": {
"Bug Reports": "https://github.com/dhenara/dhenara-agent/issues",
"Documentation": "https://docs.dhenara.com/",
"Homepage": "https://dhenara.com",
"Source Code": "https://github.com/dhenara/dhenara-agent"
},
"split_keywords": [
"ai",
" llm",
" machine learning",
" language models",
" ai agents",
" agent frameworks"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "34af965cf55be2b2c52ebe53362fc3ef40973c5dd6f48ba269a33bdacd5e4a87",
"md5": "d5407e31b1fd567bdabf87a16aa55faf",
"sha256": "52441ae142f9dd5b6e8afa8fadf958be4ee038725a626623ec540299d1226e53"
},
"downloads": -1,
"filename": "dhenara_agent-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d5407e31b1fd567bdabf87a16aa55faf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 224190,
"upload_time": "2025-07-23T08:14:16",
"upload_time_iso_8601": "2025-07-23T08:14:16.900028Z",
"url": "https://files.pythonhosted.org/packages/34/af/965cf55be2b2c52ebe53362fc3ef40973c5dd6f48ba269a33bdacd5e4a87/dhenara_agent-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "31f864a2e37ac73fd75ac00d0bcca51437eb82a12ff0b574ed637e70fe50dbfd",
"md5": "0b541fe2f7147f22b79b4039dddf9a76",
"sha256": "ebd57d07086a9e4143ae79870dec4efa5bd86319e31a1d3e64cd47444565f3f3"
},
"downloads": -1,
"filename": "dhenara_agent-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "0b541fe2f7147f22b79b4039dddf9a76",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 168645,
"upload_time": "2025-07-23T08:14:18",
"upload_time_iso_8601": "2025-07-23T08:14:18.634727Z",
"url": "https://files.pythonhosted.org/packages/31/f8/64a2e37ac73fd75ac00d0bcca51437eb82a12ff0b574ed637e70fe50dbfd/dhenara_agent-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-23 08:14:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dhenara",
"github_project": "dhenara-agent",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dhenara-agent"
}