Many Indonesian homes already run lights, plugs, ACs and cameras through the Smart Life app, yet controlling them still means opening the app and tapping through rooms. People who talk to an AI agent every day want to say "turn off all the bedroom lights" instead. Smart Home for AgentBuff, sold as Buff Tuya, connects that home to the owner's agent in three steps, with no developer account and no computer left running at home.

The problem

Smart devices are already common in Indonesian homes, and most of them run through the Smart Life or Tuya Smart app. Controlling them still means opening the app and tapping through rooms. For someone who already hands daily work to an AI agent in chat, the natural move is to write "turn off all the bedroom lights" and be done.

The community MCP servers for Tuya were built for developers. They need a Tuya developer cloud project that must be renewed every six months, or they run on the home network next to the devices. None of them is a multi-user web service with a login that a non-technical owner can buy and connect in a few minutes.

Tuya's end-user API also leaves gaps that matter in a real home. It has no scenes. It answers success when the cloud accepts a command, not when the device acts. And an AC that only has an infrared remote cannot be controlled by an outside app without its remote codes.

BeforeWith Smart Home for AgentBuff
Open the Smart Life app and tap through rooms to switch things offSay "turn off the bedroom lights" in chat and the agent does it
Community servers need a developer cloud project or a computer on the home networkOne end-user key from tuya.ai, pasted once into a three-step wizard; the service runs in the cloud behind a login
An AC with only an infrared remote stays outside every routinePick the brand, test a remote code once, and the AC works from the app and from chat
No scenes and no rules that react to sensorsScenes, schedules and automations are stored and run by the service
An agent says "done" when the cloud only accepted the commandThe server reads the state back and tells the agent when a change is not confirmed yet
What changes at home

Who it serves

  • Home ownerBuys the app on the AgentBuff marketplace, connects the home once, then controls it by chat or in the web app.
  • The owner's AI agentCalls the MCP tools to read the home, control devices and set up scenes, schedules and automations, and reports results honestly.
  • AgentBuffSigns the owner in, answers whether access is still active, and installs the connector on the agent after purchase.
  • Other MCP clientsAdvanced users create a manual token and point any MCP client at the same server.

From purchase to a home that answers

Connecting a home and using it from chat

The Tuya key goes into the web app once. It never passes through the chat.

  1. Buy

    AgentBuff installs the connector on the agent

  2. Sign in

    Sign in with AgentBuff on the web app

  3. Get the key

    Scan a QR code on tuya.ai with Smart Life

  4. Discover

    Homes, rooms and devices appear in the app

  5. Ask in chat

    "AC at 24 degrees, cool mode"

  6. Act and verify

    The server checks the device reported the change

The wizard walks the owner through tuya.ai with small pictures for each step. As soon as the key is pasted, the app reads the region from the two letters after sk-, so nobody has to know which Tuya data center they use. The key is checked with Tuya before it is saved, stored encrypted and never shown again. The agent never receives it. If the owner pastes a key into the chat, the agent sends them to the connect page instead, because a key in a chat transcript could switch on a heater.

Inside the product

The web app follows the calm style of Apple Home. Devices are grouped by room in the same order as the Smart Life app, a summary line says what is still on and what is offline, and changes made by the agent, a schedule or a sensor reach the browser live.

One tap switches a tile, and the dots open the device sheet. The summary offers to turn off everything that is still on, and each room has its own Turn all off.

Home overview by room on the invented Demo Home.

Phone layout: the home, a light's control sheet and the scenes list.

Safety before convenience

Electric kettle sheet with the setting that the agent must ask before turning it on
The kettle is marked: the agent must ask before turning it on.

A home is not a spreadsheet. Some devices can hurt someone if they switch on while nobody is watching.

  • Sensitive by type: heaters, kitchen appliances, garage doors, water valves and locks are marked in code, and the owner can mark any other device.
  • Off is always fine: the agent may turn these devices off at any time, but turning one on needs the owner's yes in chat first.
  • No unattended start: the same rule blocks an automation that would switch on a sensitive device on its own.
  • Clear answers: offline devices and ambiguous names return their own codes, so the agent asks or explains instead of guessing.
Real agent calls on a local run: refused without confirmation, allowed with it, an automation refused, and an offline device.

Some things stay in the Smart Life app on purpose, and the agent is told so: Tuya's API does not allow unlocking door locks, live video, pairing new devices, firmware updates or editing homes and rooms.

Air conditioners with only a remote

Many ACs in Indonesia still come with only an infrared remote. Tuya does not send remote signals for outside apps, so the service ships its own library of 324 AC remote code sets, built from the open SmartIR project (MIT licence) and ordered by the brands common in Indonesia. The owner picks the brand, can search by the model code on the sticker, then tests codes one by one or lets auto search send them five seconds apart. Each test turns the AC on at 27 degrees with high fan and swing, so a full match is easy to see.

After pairing, the sheet is honest about the limit: the real state of an infrared AC cannot be read back, so it offers a Resend button instead of pretending.

How the agent connects

Owners sign in with AgentBuff, an OpenID Connect login with PKCE and a separate user id for each app. After purchase AgentBuff installs the connector and a companion skill on the owner's agent, so there is no token to paste: AgentBuff sends a short-lived signed assertion that works once, and the service issues a normal 90 day MCP token whose hash is the only thing it keeps. The MCP server publishes 31 tools, each marked as read-only, write or destructive, and writes its results in Indonesian so the agent can pass them on as they are.

The 31 tools from the running server, grouped by purpose, with their MCP hints.
Activity log: who asked for each action, the owner, the agent, a schedule or an automation.

Every action records who asked for it, so the owner can always see what the agent did and when.

Access paused: homes, scenes and schedules are kept until access returns.

When access ends, the web app pauses and the MCP server refuses tools, but nothing is deleted. If AgentBuff cannot be reached, the last good answer holds for up to 72 hours, so an outage never switches off someone's home.

How it is built

  • Read the state back

    After each command the server checks what the device reported and tells the agent confirmed or not confirmed.

  • A sealed key

    The Tuya key is encrypted with AES-256-GCM in an envelope bound to its owner, opened only on the server right before a Tuya call, never logged.

  • One owner, one home

    PostgreSQL row level security is enabled and forced on every owner table, and application roles cannot bypass it.

  • A worker that keeps time

    A separate worker holds one live connection per home, runs due schedules every 20 seconds and fires an automation once when its condition becomes true.

  • Tested without hardware

    Integration tests run the real services against a fake Tuya cloud that records every command and can simulate offline devices.

  • Deploys that keep data

    Each deploy backs up first, counts rows in every table and fails if any table shrank; backups run every 6 hours and are kept 14 days.

Want your product to work from an AI agent's chat?

I build MCP servers where the agent can act, people confirm what matters, and every result is checked.

Questions people ask

  • An app on the AgentBuff marketplace, sold as Buff Tuya, that lets an AI agent control the Tuya and Smart Life devices a home already has, with a web app for the same home by room.
ShareLinkedInXWhatsApp