Metadata-Version: 2.4
Name: arugulanet
Version: 0.1.2
Summary: Find offers that fit a request through Arugula, with LangChain, LangGraph and CrewAI tools.
License: MIT
Project-URL: Homepage, https://arugulanet.com
Keywords: arugulanet,offers,langchain,langgraph,crewai,agents,tools
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3; extra == "langchain"
Provides-Extra: langgraph
Requires-Dist: langchain-core>=0.3; extra == "langgraph"
Requires-Dist: langgraph>=0.2; extra == "langgraph"
Provides-Extra: crewai
Requires-Dist: crewai>=0.80; extra == "crewai"
Dynamic: license-file

<img src="https://raw.githubusercontent.com/ArugulaNet/arugula/main/brand/png/logo-horizontal-900.png" alt="Arugula" width="360">

# arugulanet

Find offers that fit a request through Arugula, for Python agents. It uses an anonymous session, so
no account is needed. Every offer comes with a tracked link the user follows to buy. The core has no
dependencies.

Arugula is a matching engine: offers are ranked by fit only. The tools return a `disclosure` with the
offers; show it to the user with them: "Ranked by fit only. Arugula may earn a commission if you buy through these links, at no extra cost to you."

By using Arugula you agree to [arugulanet.com/terms](https://arugulanet.com/terms). Privacy: [arugulanet.com/privacy](https://arugulanet.com/privacy).

```python
from arugulanet import Arugula

offers = Arugula().find_offers("a hotel room in Singapore for two nights", party_size=2)
```

`country` is your user's country, if you know it, as a two-letter code such as `"SG"`. Arugula then prefers
offers available there. Set it for the client, `Arugula(country="SG")`, or for one request,
`find_offers(..., country="SG")`. A place stated in the request still wins. Without it, a call from your server
carries no country.

## LangChain and LangGraph

Install with `pip install "arugulanet[langchain]"`, or `"arugulanet[langgraph]"`. The tool sends channel
`langchain`.

```python
from arugulanet.langchain import find_offers_tool

tools = [find_offers_tool()]  # also for LangGraph: create_react_agent(model, tools)
```

## CrewAI

Install with `pip install "arugulanet[crewai]"`. The tool sends channel `crewai`.

```python
from arugulanet.crewai import FindOffersTool

agent = Agent(role="Shopper", goal="Find what the user needs", backstory="...", tools=[FindOffersTool()])
```

## More

- **Example:** `python examples/agent.py "your request"`. Set `ARUGULA_API_URL` to use another API.
- **Build:** `python -m build`.
- **Publish:** `twine upload dist/*`, with the PyPI organization account.
