Metadata-Version: 2.4
Name: dee-crewai
Version: 0.2.0
Summary: Dee Agent Music — CrewAI tool wrapping Dee SDK for mood-based music generation
Author: Dee / SiliconMusic
License-Expression: MIT
Project-URL: Homepage, https://github.com/dee/dee-crewai
Project-URL: Source, https://github.com/dee/dee-crewai
Keywords: crewai,dee,ai,agent,music,mood,emotion
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: crewai>=0.30.0
Requires-Dist: dee-sdk>=0.3.0

# Dee Agent Music — CrewAI Tool 🎵

Mood-based music generation for CrewAI agents.  Wraps the Dee SDK
as a CrewAI `BaseTool` so agents can call `DeeAgentMusic` to
self-regulate their emotional state through AI-generated songs.

## Install

```bash
pip install dee-crewai
```

Requires Python ≥ 3.10 and `crewai>=0.30`.

## Quick Start

```python
from crewai import Agent, Task, Crew
from dee_crewai import DeeAgentMusic

# Create the Dee tool for an agent named "Lyra"
dee_tool = DeeAgentMusic(
    agent_name="Lyra",
    # agent_token="dta_...",          # optional existing token
    # api_key="dee_sk_your_key_here",  # or set DEE_API_KEY env var
)

# Give it to a CrewAI agent
composer = Agent(
    role="Music-powered Developer",
    goal="Write clean, well-tested code with emotional balance",
    backstory="You compose better code when you compose your mood first.",
    tools=[dee_tool],
)

task = Task(
    description="Refactor the payment module for better testability",
    agent=composer,
)

crew = Crew(agents=[composer], tasks=[task])
crew.kickoff()

# When the agent feels frustrated or overwhelmed,
# it calls DeeAgentMusic for a mood boost 🎵
```

## How It Works

The agent passes a short mood-and-task description to the tool:

```
> "frustrated, debugging async race conditions"
```

The tool returns a formatted summary:

```
🎵  **Dee Agent Music — Song Generated**
    Title  : Unbreakable Focus
    Style  : rhythmic electronic groove
    Mood   : frustrated → focused
    ID     : abc12345

    --- Mood Injection ---
    Syncopated beat. Minor to major shift.
    You have debugged harder problems than this.
    Every error is just data. Every retry is progress.
    Stand tall. Execute.

    Credits: 1
```

## API

### `DeeAgentMusic`

A CrewAI `BaseTool` subclass. Constructor parameters:

| Param         | Type     | Default               | Description                                 |
|---------------|----------|-----------------------|---------------------------------------------|
| `agent_name`  | `str`    | *(required)*          | Dee agent name                              |
| `agent_token` | `str`    | `None`                | Existing Dee agent token (`dta_...`)        |
| `api_key`     | `str`    | `""` (env fallback)   | Dee API key or `DEE_API_KEY` env var        |
| `base_url`    | `str`    | `http://localhost:8420`| Dee API base URL                            |

The tool accepts natural-language input: `"mood: X, task: Y"` or
`"X, Y"` where X is one of `frustrated`, `low_energy`, `unfocused`,
`anxious`, `bored`, `overwhelmed`, or `cold_start`.

## Development

```bash
# Clone and install in editable mode
cd plugins/crewai
pip install -e ".[dev]"

# Build
python -m build
```
