Metadata-Version: 2.5
Name: strands-lexio
Version: 0.1.0
Summary: Strands Agents tools for the Lexio Rent API (car and van rental software): fleet, availability and prices, rentals, customers and quotes.
Project-URL: Homepage, https://lexio.rent/logiciel-location-voiture
Project-URL: Documentation, https://docs.lexio.rent/strands
Project-URL: API reference, https://docs.lexio.rent
Project-URL: Source, https://github.com/lexio-rent-git/strands-lexio
Project-URL: Issues, https://github.com/lexio-rent-git/strands-lexio/issues
Author-email: Lexio Rent <contact@lexio.rent>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,car-rental,fleet-management,lexio,lexio-rent,strands,strands-agents,tools
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: lexio-rent>=0.1.1
Requires-Dist: strands-agents>=1.0
Provides-Extra: test
Requires-Dist: pytest>=7; extra == 'test'
Description-Content-Type: text/markdown

# strands-lexio

[Strands Agents](https://strandsagents.com) tools for the [Lexio Rent API](https://docs.lexio.rent). Give an agent read access to a rental company's fleet, availability and prices, rentals and customers, and optionally let it create priced quotes.

<a href="https://lexio.rent/logiciel-location-voiture">Lexio Rent</a> is rental management software for professional car, van and two-wheeler rental companies: bookings, digital rental agreements, condition reports, deposits, maintenance and invoicing. This package turns its public REST API into Strands tools, built on the official Python client [`lexio-rent`](https://pypi.org/project/lexio-rent/).

## Install

```sh
pip install strands-lexio
```

You need a Lexio Rent organization on a plan that includes the API, and an API key (`lck_...`) from **Settings → Developer → API tokens** in Lexio. For an agent that only answers questions, give the key read scopes: `vehicles.read`, `offers.read` (availability), `rentals.read`, `customers.read`, `catalog.read`. Add `quotes.write` only if you enable quotes. See [Authentication](https://docs.lexio.rent/authentification).

## Quick start

```python
from strands import Agent
from strands_lexio import LexioTools

# The key defaults to the LEXIO_API_KEY environment variable.
agent = Agent(
    system_prompt="You are the booking assistant of a van rental agency. Answer from the tools only.",
    tools=LexioTools().tools(),
)
agent("Which vans are free from 14 to 16 December, and at what price?")
```

The agent uses your configured Strands model provider (Amazon Bedrock by default); any provider works.

## Tools

| Tool | What it does | Writes |
|---|---|---|
| `lexio_search_vehicles` | Active fleet with plate, model, category, status, odometer | no |
| `lexio_check_availability` | Bookable vehicles for a period, with the indicative total price | no |
| `lexio_list_rentals` | Rentals by status, date window, vehicle or customer | no |
| `lexio_get_rental` | One rental with pick-up/return, options, price lines, balance | no |
| `lexio_find_customer` | Customers by exact email or company registration number | no |
| `lexio_list_categories` | Vehicle categories (pricing classes) | no |
| `lexio_create_quote` | Fixes the price of a vehicle for a period; books nothing | yes, opt-in |

`lexio_create_quote` is only returned with `LexioTools(allow_quotes=True)`. Results are compact JSON strings, capped at `max_results` items (20 by default) to keep the context small.

```python
tools = LexioTools(
    api_key="lck_...",          # or LEXIO_API_KEY
    allow_quotes=True,          # adds lexio_create_quote
    max_results=10,
).tools()
```

You can also call a tool directly, without a model, which is handy in tests:

```python
agent = Agent(tools=LexioTools().tools())
agent.tool.lexio_search_vehicles(vehicle_type="VAN", limit=5)
```

Dates for availability and quotes are local to the rental company, without offset (`2026-12-14T09:00:00`). Lexio applies a per-key rate limit; the client retries on `429` and `5xx`. See [Rate limits](https://docs.lexio.rent/limites).

## Development

```sh
pip install -e ".[test]"
pytest tests            # no network, no API key needed
```

## About

`strands-lexio` is maintained by the team behind <a href="https://lexio.rent/logiciel-location-voiture">Lexio Rent, car rental management software</a>. An agent that tracks rentals can also help with fleet upkeep: Lexio publishes a free <a href="https://lexio.rent/outils/carnet-entretien-vehicule">vehicle maintenance log template</a> (in French) for agencies that are not on the software yet.

- API documentation: <https://docs.lexio.rent>
- Strands guide: <https://docs.lexio.rent/strands>
- Python client: <https://github.com/lexio-rent-git/lexio-python>
- Contact: contact@lexio.rent

License: MIT.
