# Losant MCP for AI Agents AI Agent Connect

> Losant MCP lets you control your IoT ecosystem directly through your AI agent. It handles device management, time-series data queries, and workflow automation for smart infrastructure. Use it to manage fleets, trigger actions, and pull sensor data without leaving your chat or code editor.

## Overview
- **Category:** iot-hardware
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_bL0nSZKYHlTSlhESUjlprolo2PMKUvm5nEgp4s7K/ai-agent-connect
- **Tags:** iot-platform, device-management, workflow-automation, time-series, smart-city

## Description

Connect your Losant platform to your AI agent to handle your IoT environment through natural conversation. This Connector lets you take over the heavy lifting of device management and data retrieval without navigating through complex dashboards. You can check sensor values, trigger maintenance workflows, or pull historical data for a report just by asking your agent. It turns your chat interface into a command center for your smart infrastructure. You can skip the manual navigation if you're an engineer debugging a specific sensor or a manager looking for a high-level status update. You'll find it's one of the most practical ways to interact with the Losant platform, especially when you're using the Vinkius catalog to keep all your integrations organized in one place. It makes the daily tasks of IoT operations feel like a simple conversation.

## Tools

### create_application
Create a new Losant application. This lets you start a new project or environment.

### create_data_table
Create a new data table. Use this to store organized information for your project.

### create_device
Create a new device. This adds a specific piece of hardware to your fleet.

### delete_device
Delete a device. Remove hardware from your active management list.

### delete_workflow
Delete a workflow. Remove automation logic you no longer need.

### execute_notebook
Execute a notebook. Run data processing scripts directly from your agent.

### get_application
Get a specific Losant application. View the details of a chosen project.

### update_application
Update an application. Modify the settings of an existing Losant application.

### send_device_command
Send a device command. Send a direct instruction to a piece of hardware.

### create_workflow
Create a new workflow. Build out new automation logic for your IoT devices.

### delete_application
Delete a Losant application. Remove old projects from your account.

### delete_data_table_rows
Delete rows from a data table. Clean up your structured data records.

### export_application
Export a Losant application. Save your current configuration for backup.

### export_data
Export device data. Get your sensor records into a format for external use.

### get_dashboard
Get a specific dashboard. See the configuration of your visual data displays.

### get_data_table_rows
Get rows from a data table. Retrieve specific records from your storage.

### get_device
Get a specific device. Check the current status and specs of a piece of hardware.

### get_workflow
Get a specific workflow. View the logic of an existing automation.

### import_application
Import a Losant application. Bring an existing setup into your platform.

### insert_data_table_row
Insert a row into a data table. Add new records to your structured data.

### list_applications
List applications. See every Losant application in your account.

### list_dashboards
List dashboards. View all dashboards currently active in your account.

### list_data_tables
List data tables. See all tables associated with a specific application.

### list_devices
List devices. See every device connected to a specific application.

### list_files
List files. See the files currently stored in your application.

### list_notebooks
List notebooks. View all notebooks available for your application.

### list_workflows
List workflows. See all workflows for a specific application.

### press_virtual_button
Press a virtual button in a workflow. Trigger a specific action in your logic.

### query_data_table_rows
Query data table rows. Search for specific records within your tables.

### query_last_value
Query last value data. Get the most recent reading from a sensor.

### query_time_series
Query time series data. Pull historical readings over a specific time range.

### send_dashboard_report
Send a dashboard report. Dispatch a report based on your dashboard data.

### send_device_state
Send device state. Update the reported status of a device in real-time.

### set_device_connection_status
Set device connection status. Manually update a device's online or offline state.

### update_device
Update a device. Edit the configuration of a specific hardware unit.

### update_workflow
Update a workflow. Change the logic of an existing automation.

### upload_file
Upload a file. Put a new file into your application storage.

### clone_application
Clone an application. Create a duplicate of an existing setup.

## Prompt Examples

**Prompt:** 
```
List all my Losant applications.
```

**Response:** 
```
I've retrieved your applications. You have 3 active apps: **Smart Factory** (ID: 60a...), **Office HVAC** (ID: 61b...), and **Fleet Tracker** (ID: 62c...). Which one would you like to explore?
```

**Prompt:** 
```
Show me all devices in application 60a123456789.
```

**Response:** 
```
In the **Smart Factory** application, I found 12 devices. 

- **Online**: 10
- **Offline**: 2

Notable devices include **Main Boiler** and **Assembly Line 1**. Would you like the details for a specific one?
```

**Prompt:** 
```
Trigger the 'Emergency Reset' virtual button in workflow 5f987654321.
```

**Response:** 
```
The virtual button for **Emergency Reset** in workflow 5f987654321 has been successfully pressed. The workflow logic is now executing.
```

## Capabilities

### Create and clone IoT applications
Set up new environments or duplicate existing ones to scale your infrastructure.

### Send real-time commands to devices
Trigger hardware actions and update device states instantly via your agent.

### Query historical time-series data
Pull sensor readings over specific periods for analysis or reporting.

### Trigger workflow virtual buttons
Activate specific logic paths in your automation workflows with text commands.

### Manage data tables and files
Interact with structured data and storage files within your application.

### Export device data for analysis
Get your device data into a usable format for external processing.

## Use Cases

### Rapid Site Deployment
A developer needs to set up a new site and asks the agent to `clone_application` from a pre-approved template.

### Bulk Data Export
A researcher needs to pull all sensor records for a specific month and asks the agent to `export_data` for analysis.

## Benefits

- Query historical data instantly with `query_time_series` to skip manual CSV exports.
- Manage your fleet at scale with `list_devices` to check statuses in seconds.
- Automate manual tasks by triggering actions with `press_virtual_button` via your agent.
- Keep your data organized by creating and querying tables with `create_data_table`.
- Update hardware states on the fly using `send_device_command` without opening a terminal.

## How It Works

The bottom line is that you get a natural language interface for your entire IoT infrastructure.

1. Subscribe to the Losant MCP
2. Provide your Losant API Token
3. Ask your agent to list applications or query device states

## Frequently Asked Questions

**Can I use Losant MCP to check my sensors?**
Yes. You can ask your agent to pull the latest readings or query historical time-series data for any sensor in your fleet.

**How do I trigger a workflow with this Connector?**
You can trigger specific logic by asking your agent to press a virtual button within a workflow, which initiates the automation immediately.

**Can the agent help me manage my IoT device fleet?**
Absolutely. You can list all devices, check their online status, and send direct commands to individual hardware units.

**Can I pull historical data from Losant?**
Yes, you can query time-series data to see how your devices have performed over hours, days, or weeks.

**Does this Connector work with my existing Losant API token?**
Yes, it connects directly to your existing account using your Losant API token for secure access.

**Can I create new applications using the agent?**
Yes, you can ask your agent to create, clone, or import applications to help you scale your IoT infrastructure quickly.

**Can I manually trigger a Losant workflow using this integration?**
Yes! You can use the `press_virtual_button` tool by providing the Application ID and Workflow ID. This allows your AI agent to trigger specific automation logic on demand.

**How do I check the current status of a specific sensor or device?**
Use the `get_device` tool with the Application ID and Device ID. The agent will return the full device metadata, including its last reported state and connection status.

**Is it possible to retrieve historical data for analysis?**
Absolutely. You can use `query_time_series` to fetch historical attribute data or `query_last_value` for the most recent data points across your device fleet.