Metadata-Version: 2.4
Name: ppx-crewai
Version: 0.1.0a4
Summary: CrewAI integration for the Preference Profile Exchange (PPX).
Project-URL: Homepage, https://ppx.dev/
Author: Blazing Customs
License: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: crewai>=0.51.0
Requires-Dist: ppx-client>=0.1.0a4
Requires-Dist: pydantic>=2.9.0
Description-Content-Type: text/markdown

# ppx-crewai

> CrewAI integration for the [Preference Profile Exchange (PPX)](https://blazing-customs.github.io/ppx-spec/).

## Install

```bash
pip install ppx-crewai
```

Requires Python 3.11+. Published version: **0.1.0a1** ([PyPI](https://pypi.org/project/ppx-crewai/)).

> Alpha, tracking a **draft** specification. Expect breaking changes.
> The version is `0.1.0a1` on PyPI and `0.1.0-alpha.1` on npm — the
> same release in each ecosystem's required format.

## Give a CrewAI agent access to the user's preferences

```python
from crewai import Agent, Task, Crew
from ppx_client import PpxClient
from ppx_crewai import PpxPreferenceTool, preference_briefing

ppx = PpxClient("https://api.provider.app")

agent = Agent(
    role="Fragrance advisor",
    goal="Recommend one scent that matches the user's actual preferences.",
    backstory=preference_briefing(
        ppx, grant_token=my_grant_token,
        requested_namespaces=["core", "fragrance"],
        context={"climate": "hot_humid"},
    ),
    tools=[PpxPreferenceTool(client=ppx, grant_token=my_grant_token)],
    verbose=True,
)

task = Task(
    description="Pick one fragrance for a date-night in humid weather.",
    agent=agent,
    expected_output="A single fragrance pick with a one-sentence justification.",
)

crew = Crew(agents=[agent], tasks=[task])
print(crew.kickoff())
```

## License

Apache-2.0.
