원클릭으로
integration-builder
Guidelines for building integrations for MIMRAI
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guidelines for building integrations for MIMRAI
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | integration-builder |
| description | Guidelines for building integrations for MIMRAI |
packages/integration - This is main directory where all integration packages are stored. packages/integration/src/{integration-name} - Each integration has its own directory named after the integration. packages/integration/src/{integration-name}/index.ts - The main entry point for the integration. packages/integration/src/{integration-name}/handle.ts - Contains a handler function that processes incoming data in form of messages (mostly webhooks or events) packages/integration/src/{integration-name}/{functionality}.ts - Additional files that contain specific functionalities related to the integration. For example, authentication, fetching data, submitting data, etc. packages/integration/src/registry.ts - A registry file that exports all available integrations for easy access and management. This file is used in the UI and other parts of the system to list and utilize the integrations.
Integrations are driven by the following tables in the MIMRAI database:
packages/integration/src/ named after your integration.index.ts file in the new directory. This file should export the main handler function and any other necessary functions.handle.ts if the integration requires processing incoming messages.To use the integration within MIMRAI, you need to register it in the packages/integration/src/registry.ts file. This allows the system to recognize and utilize your integration.
Every integration can have a configSchema that defines the configuration options available for that integration using Zod.
Integrations can have their own UI components for configuration and interaction:
We always use useZodForm to create forms based on the Zod schema defined in the integration package. And use shadcn UI components for consistent styling from packages/ui.
If your integration requires user authentication, you will need to implement the necessary OAuth or token-based authentication flows. Store the authentication tokens and related information in the integrationUserLink table.
callbacks and token refresh logic that needs endpoints in the MIMRAI API server should be implemented in:
We use Hono as the web framework for the API server. Look at existing integrations for examples of how to implement authentication flows.
Integrations can also be used as tools for AI Agents within MIMRAI. To enable this functionality, ensure that your integration exposes the necessary methods. And implement the corresponding tool interface in:
Then include the tool in the agent's toolset in integrationToolRegistry in: