Skip to main content
Create typed Mastra tools around the Darwin SDK or use remote MCP where supported. Keep discovery and mutation tools separate. Persist the selected target/capability IDs, thread, cursor, and idempotency keys in workflow state. Use get_thread after process restarts, delayed providers, or browser-based interactions. Treat typed thread requests and operation states as the router for valid next steps and surface confirmation, approval, authentication, or payment review to the user instead of automatically continuing.

Suggested workflow data

Checkpoint before and after each write. After a process restart, load thread and the last consumed cursor, then call get_thread before choosing a node.
Last modified on October 1, 2026