Create a flomo.yaml file to define your tool interface:
identity: author: yourname name: flomo label: en_US: Flomo Note ru_RU: Flomo Notesdescription: human: en_US: Add notes to your Flomo account directly from MultiAgentStudio. ru_RU: Добавляйте заметки в ваш аккаунт Flomo прямо из MultiAgentStudio. llm: > A tool that allows users to save notes to Flomo. Use this tool when users want to save important information from the conversation. The tool accepts a 'content' parameter that contains the text to be saved as a note.credential_schema: api_url: type: string required: true label: en_US: API URL ru_RU: API URL human_description: en_US: Flomo API URL from your Flomo account settings. ru_RU: API URL из настроек вашего аккаунта Flomo.tool_schema: content: type: string required: true label: en_US: Note Content ru_RU: Содержимое заметки human_description: en_US: Content to save as a note in Flomo. ru_RU: Содержимое, которое нужно сохранить в заметке Flomo.
Create a utility module in utils/flomo_utils.py for API interaction:
import requestsdef send_flomo_note(api_url: str, content: str) -> None: """ Send a note to Flomo via the API URL. Raises requests.RequestException on network errors, and ValueError on invalid status codes or input. """ api_url = api_url.strip() if not api_url: raise ValueError("API URL is required and cannot be empty.") if not api_url.startswith('https://flomoapp.com/iwh/'): raise ValueError( "API URL should be in the format: https://flomoapp.com/iwh/{token}/{secret}/" ) if not content: raise ValueError("Content cannot be empty.") headers = {'Content-Type': 'application/json'} response = requests.post(api_url, json={"content": content}, headers=headers, timeout=10) if response.status_code != 200: raise ValueError(f"API URL is not valid. Received status code: {response.status_code}")
The Tool class handles actual API calls when the user invokes the plugin. Create tools/flomo.py:
from collections.abc import Generatorfrom typing import Anyfrom multiagentstudio_plugin import Toolfrom multiagentstudio_plugin.entities.tool import ToolInvokeMessageimport requestsfrom utils.flomo_utils import send_flomo_noteclass FlomoTool(Tool): def _invoke(self, tool_parameters: dict[str, Any]) -> Generator[ToolInvokeMessage]: content = tool_parameters.get("content", "") api_url = self.runtime.credentials.get("api_url", "") try: send_flomo_note(api_url, content) except ValueError as e: yield self.create_text_message(str(e)) return except requests.RequestException as e: yield self.create_text_message(f"Connection error: {str(e)}") return # Return success message and structured data yield self.create_text_message( "Note created successfully! Your content has been sent to Flomo." ) yield self.create_json_message({ "status": "success", "content": content, })
Always handle exceptions gracefully and return user-friendly error messages. Remember that your plugin represents your brand in the MultiAgentStudio ecosystem.
You can find your debug key and host in the MultiAgentStudio dashboard: click the “Plugins” icon in the top right corner, then click the debug icon. In the pop-up window, copy the “API Key” and “Host Address”.
2
Install dependencies and run
pip install -r requirements.txtpython -m main
Your plugin will connect to your MultiAgentStudio instance in debug mode.
3
Test functionality
In your MultiAgentStudio instance, navigate to plugins and find your debugging plugin (marked as “debugging”).
Add your Flomo API credentials and test sending a note.
You’ve built a functioning MultiAgentStudio plugin that connects with an external API service! This same pattern works for integrating with thousands of services - from databases and search engines to productivity tools and custom APIs.
Documentation
Write your README.md in English (en_US) describing functionality, setup, and usage examples
Localization
Create additional README files like readme/README_ru_RU.md for other languages