Skip to content

Tools

flowtask.interfaces.parrot.tools

models

EmployeeInput

Bases: BaseModel

Input schema for employee-related operations requiring an Employee ID.

ManagerInput

Bases: BaseModel

Input schema for manager-related operations requiring a Manager ID.

NextStopStore

Bases: Model

Model representing Table for the NextStop system.

Meta

Meta class for NextStopStore model.

StoreInfoInput

Bases: BaseModel

Input schema for store-related operations requiring a Store ID.

today_date

today_date()

Returns today's date.

store

StoreInfo

Bases: BaseToolkit

Comprehensive toolkit for store information and demographic analysis.

This toolkit provides tools to: 1. Get detailed visit information for specific stores including recent visit history 2. Retrieve comprehensive store information including location and visit statistics 3. Foot traffic analysis for stores, providing insights into customer behavior

All tools are designed to work asynchronously with database connections and external APIs.

Tools included: - get_visit_info: Retrieves the last visits for a specific store - get_foot_traffic: Fetches foot traffic data for a store - get_store_information: Gets complete store details and aggregate visit metrics - get_employee_sales: Fetches Employee Sales data and ranked performance.

get_by_employee_visits async
get_by_employee_visits(employee_id)

Get visits information for a specific employee.

This coroutine retrieves the most recent visits made by the specified employee, including detailed visit metrics and questions answered during those visits.

Parameters:

Name Type Description Default
employee_id str

The unique identifier of the employee.

required

Returns:

Name Type Description
dict dict

Data containing the last visits with detailed information.

get_dataset async
get_dataset(query, output='pandas')

Fetch a dataset based on the provided query.

Parameters:

Name Type Description Default
query str

The query string to fetch the dataset.

required

Returns:

Type Description
DataFrame

pd.DataFrame: A pandas DataFrame containing the dataset.

get_employee_sales async
get_employee_sales(manager_id)

Get foot traffic data for a specific store. This coroutine retrieves the foot traffic data for the specified store, including the number of visitors and average visits per day.

Parameters:

Name Type Description Default
manager str

The unique identifier of the Manager (Associate OID).

required

Returns: str: Data containing employee sales data and rankings.

get_employee_visits async
get_employee_visits(manager_id)

Get Employee Visits data for a specific Manager. This coroutine retrieves the visit data for employees under a specific manager, including the number of visits, average visit duration, and most frequent visit hours. Args: manager (str): The unique identifier of the Manager (Associate OID). Returns: str: Data containing employee sales data and rankings.

get_foot_traffic async
get_foot_traffic(store_id)

Get foot traffic data for a specific store. This coroutine retrieves the foot traffic data for the specified store, including the number of visitors and average visits per day.

Parameters:

Name Type Description Default
store_id str

The unique identifier of the store.

required

Returns: str: JSON string containing foot traffic data for the store.

get_store_information async
get_store_information(store_id)

Get comprehensive store information for a specific store.

This coroutine retrieves complete store details including location, contact information, operating schedule, and aggregate visit metrics.

Parameters:

Name Type Description Default
store_id str

The unique identifier of the store.

required

Returns:

Name Type Description
str str

JSON string containing comprehensive store information and visit statistics.

get_tools
get_tools()

Get all available tools in the toolkit.

Returns:

Type Description
List[BaseTool]

List[BaseTool]: A list of configured Langchain tools ready for agent use.

get_visit_info async
get_visit_info(store_id)

Get visit information for a specific store.

This coroutine retrieves the most recent visits for the specified store, including detailed visit metrics and questions answered during those visits.

Parameters:

Name Type Description Default
store_id str

The unique identifier of the store.

required

Returns:

Type Description
List[dict]

List[dict]: Data containing the last visits with detailed information.