You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tuya is a PaaS for brand-owners — different role from xiaozhi-server (open firmware for makers). Per docs/research/tuya-vs-xiaozhi.md: Tuya's 1.6K stars vs xiaozhi's 26.7K make it the wrong choice for M1 PoC, but its brand-owner reach (thousands of brands shipping IoT through Tuya) makes it the right Phase 2 expansion. "Complement, don't compete" — AgentKeys adds the identity/memory/audit layer that Tuya doesn't try to be.
The Tuya MCP-server hook (announced as part of the "Hey Tuya" upgrade) is the integration surface. Through it, an AgentKeys MCP server appears as a registered tool to any Tuya-platform AI agent — exactly the cross-runtime moat we're building.
Scope (M2)
Tuya Cloud Development app registration
Create a Tuya Cloud Development account
Submit an integration app describing AgentKeys' tool surface
Get app ID + secret for the Cloud Development APIs
Document the brand-owner authorization scopes we'll request
Webhook receiver
Endpoint: https://api.agentkeys.io/v1/tuya/events
Auth: Tuya's signed webhook payload (HMAC verified per their docs)
Event mapping:
Tuya device-paired event → agentkeys.memory.put (record the pairing in memory)
Tuya device-action event (lights on, etc.) → agentkeys.audit.append (audit-trail per device action)
Tuya device-unpaired → agentkeys.cap.revoke (revoke any cap-tokens tied to that device)
Tuya MCP-server hook
Register AgentKeys MCP server with Tuya's "Hey Tuya" MCP catalog
Tuya brand-owner → AgentKeys OAuth: brand-owner authorizes AgentKeys to access their device fleet on Tuya
Brand-owner's Tuya account links to their AgentKeys vendor tenant (one-to-one)
Standard OAuth 2.0 authorization code flow
Out of scope (defer)
Tuya consumer-side flows (we integrate at brand-owner layer, not end-user)
Reverse direction (AgentKeys → Tuya device control) — that's an orchestration surface, hard line per agent-iam-strategy.md §2.4
Tuya-specific UI white-labeling (M4)
Acceptance criteria
A Tuya-platform AI plushie (test device or partner-provided) successfully uses AgentKeys for memory + audit via the Tuya Cloud Development connector — end-to-end demonstrated
OAuth flow exercised: Tuya brand-owner signs in via Tuya → grants AgentKeys access → AgentKeys provisions vendor tenant → first device authorizes through MCP server
(Days 8-10) MCP catalog listing submission + integration test
(Days 10-14) Live test against a partner-provided Tuya device
Pickup notes for the next agent / developer
Read tuya-vs-xiaozhi.md first — Tuya is a different category from xiaozhi (PaaS vs open firmware), so the integration pattern differs
Tuya signup: international developer account at https://www.tuya.com/ — use their Cloud Development tier
"Hey Tuya" MCP catalog status: check the latest Tuya announcement (was beta as of 2026-05); if not generally available, ship without catalog listing and add when available
OAuth flow uses standard authz code; library-of-choice for Rust is oauth2 crate
Context
Tuya is a PaaS for brand-owners — different role from xiaozhi-server (open firmware for makers). Per
docs/research/tuya-vs-xiaozhi.md: Tuya's 1.6K stars vs xiaozhi's 26.7K make it the wrong choice for M1 PoC, but its brand-owner reach (thousands of brands shipping IoT through Tuya) makes it the right Phase 2 expansion. "Complement, don't compete" — AgentKeys adds the identity/memory/audit layer that Tuya doesn't try to be.The Tuya MCP-server hook (announced as part of the "Hey Tuya" upgrade) is the integration surface. Through it, an AgentKeys MCP server appears as a registered tool to any Tuya-platform AI agent — exactly the cross-runtime moat we're building.
Scope (M2)
Tuya Cloud Development app registration
Webhook receiver
https://api.agentkeys.io/v1/tuya/eventsagentkeys.memory.put(record the pairing in memory)agentkeys.audit.append(audit-trail per device action)agentkeys.cap.revoke(revoke any cap-tokens tied to that device)Tuya MCP-server hook
identity.whoami,memory.get/put,permission.check,cap.mint/revoke,audit.append)OAuth flow
Out of scope (defer)
agent-iam-strategy.md§2.4Acceptance criteria
Risks
References
docs/spec/plans/milestones-roadmap.md§3 (M2 scope)docs/research/tuya-vs-xiaozhi.md— full Tuya vs xiaozhi analysis + Phase 2 strategic placementdocs/research/agent-iam-strategy.md§5 Phase 2 (where Tuya sits in sequencing)Effort
~1-2 weeks. Sequencing:
Pickup notes for the next agent / developer
tuya-vs-xiaozhi.mdfirst — Tuya is a different category from xiaozhi (PaaS vs open firmware), so the integration pattern differsoauth2crate