Skip to main content

Advanced hairstyle recommendation agent with rule-based scoring

Project description

Hair Recommendation Agent

PyPI PyPI - Python Version CI License

A lightweight, rule-based agent for hairstyle and hair-color recommendations (no LLM required).

This package provides rule-based recommendations and compatibility analysis for hairstyles, based on face shape, hair type and simple style profiles. The agent accepts structured inputs (e.g. face_shape, hair_type) and can also accept free-form descriptions for style/color when appropriate.

Key features

  • Hairstyle recommendations tailored to face shape and hair type.
  • Style compatibility analysis for specific haircuts.
  • Trending styles by season.
  • Simple, testable API designed to integrate into UIs and orchestrators.

Installation

Developer editable install:

python -m pip install -e .[dev]

Install from PyPI (when published):

pip install hair-recommendation-agent

Install directly from the repository:

pip install git+https://github.com/msalsas/hair-recommendation-agent.git

Quick start

from hair_recommendation_agent import HairRecommendationAgent
from agent_core_framework import AgentTask

# Create the agent
agent = HairRecommendationAgent()

# Example: get hairstyle recommendations using structured fields
task = AgentTask(
    type="get_hairstyle_recommendations",
    payload={
        "face_shape": "oval",
        "hair_type": "wavy",
        "personal_style": "bohemian",
        "age_group": "adult",
        "gender": "female",
        "hair_length": "medium"
    }
)
response = agent.process(task)
print(response.success, response.error)
print(response.data)

Supported task types (examples): get_hairstyle_recommendations, analyze_style_compatibility, get_trending_styles.

Testing

Run the test suite locally:

PYTHONPATH=src pytest -q

Publishing to TestPyPI (manual)

  1. Bump the version in pyproject.toml (e.g. 0.2.0).
  2. Build distributions:
python -m build
  1. Upload to TestPyPI (create a TestPyPI API token first):
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

CI notes

You can add GitHub Actions workflows to run tests and publish packages. Make sure the runner has any test dependencies available.

Contributing

Contributions are welcome. Open an issue or a pull request. Add tests for new behavior and keep changes focused.

License

MIT — see the LICENSE file for details.

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

hair_recommendation_agent-0.1.1.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hair_recommendation_agent-0.1.1-py2.py3-none-any.whl (12.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file hair_recommendation_agent-0.1.1.tar.gz.

File metadata

File hashes

Hashes for hair_recommendation_agent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 447a6c72c1308a640fe33d6a219675b35925c2c1751c71e6a11af9a4e0b499d0
MD5 79934cb22c49b78c68f9c4d50e6fe873
BLAKE2b-256 621c605c6de63295bed50c3982381a6f6e6186b254b48ecc3872cd54de943435

See more details on using hashes here.

File details

Details for the file hair_recommendation_agent-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for hair_recommendation_agent-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d96601f3a08acf6ada0359b3bca2df8a2333da6a0c03fe6395d79edf29eb0796
MD5 e2e8335e5c3eeb6f18b85ac7cd176fc5
BLAKE2b-256 09054787fca2519f07121aa8702afaeed08360524f33951c4b024b35c2d7556c

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