Agent Tool

Let an AI agent operate the gateway safely

The agent package gives local AI tools a controlled way to inspect status, test configuration, add Modbus devices, rotate agent tokens, and run maintenance actions only with explicit confirmation.

Downloads

Tool

Python CLI for the local gateway API.

Download gateway_agent_tool.py

Skill

Instructions for AI agents that know how to use skills.

Download SKILL.md

Download openai.yaml

Download api.md

What it can do

  • read gateway status and diagnostics;
  • verify authorization mode without exposing secrets;
  • rotate and delete one agent Bearer token;
  • call documented API paths for configuration and Modbus device setup;
  • upload firmware, reboot, or factory reset only with a matching confirmation flag.

Compatible AI systems

The package is model-agnostic. It works with any AI assistant or agent runner that can use local files, execute a local CLI, or call a local HTTP tool from the operator computer.

  • Works well with coding agents such as Codex, Claude Code, Cursor, Continue, and local agent frameworks.
  • Works with ChatGPT or other hosted models only when a local connector, MCP server, or tool runner gives them access to this CLI or to the gateway API.
  • Does not work from a plain hosted chat window that cannot reach your LAN and cannot run local commands.

Local install

  1. Install Python 3.10 or newer on the operator computer.
  2. Download gateway_agent_tool.py.
  3. Make sure the computer can open the gateway web interface, for example http://192.168.1.85.
  4. Rotate an agent token using local admin credentials.
  5. Store the token in the local agent environment, not in source code.
python gateway_agent_tool.py --base-url http://192.168.1.85 --username admin --password admin rotate-token --scopes read,test,configure

set GATEWAY_BASE_URL=http://192.168.1.85
set GATEWAY_AGENT_TOKEN=<token returned once>
python gateway_agent_tool.py status

Skill install

Create a folder named umec-gateway-agent in the skills directory of your AI tool, then place the downloaded SKILL.md, agents/openai.yaml, and references/api.md inside it.

umec-gateway-agent/
  SKILL.md
  agents/openai.yaml
  references/api.md

Safe workflow

  1. Ask the agent to inspect /api/status and /api/auth/session.
  2. Ask it to describe the intended change before sending write requests.
  3. Use tokens without dangerous for normal work.
  4. Use dangerous scope only during a planned maintenance window.
  5. For firmware upload, reboot, or factory reset, require the matching --confirm value.

Examples

python gateway_agent_tool.py session
python gateway_agent_tool.py get /api/modbus/devices
python gateway_agent_tool.py add-device --json @device.json
python gateway_agent_tool.py upload-firmware firmware.bin --confirm update --timeout 240