A demo implementation of a Mosaia Tool.
- Register for an account on mosaia.ai
- Fork/copy this repo
- Install the GitHub app to the repo by clicking the "Launch App" button on: https://mosaia.ai/org/mosaia/app/github
- Fill out the
.mosaiamanifest file:
TOOL_DISPLAY_NAME: (user-facing) The name of the tool, displayed on the Mosaia Tool Registry. Must be unique.SHORT_TOOL_DESCRIPTION: (user-facing) A one-sentence description of the tool, displayed in the Mosaia Tool Registry.LONG_TOOL_DESCRIPTION: (llm-facing) A longer description of what the tool does.EXAMPLE_PARAM_ONE, etc. (llm-facing): Any params you wish the LLM to pass to your tool.EXAMPLE_PARAM_ONE_DESCRIPTION, etc.: (llm-facing) Descriptions of each param and what they're for.ENV_VAR_ONE: (user-facing): When a user adds your tool to their agent they will be asked to supply values to the keys listed inenvVars.
- Validate your
.mosaiamanifest file:npm run validate:manifest - (Optional) test your tool locally:
npm run start:devin one terminal andnpm run test:requestin another. A Postman collection has also been provided with a test request. - Push your changes to
main. Once pushed, the deployment script will kick off. You should see your tool show up inhttps://mosaia.ai/user/YOUR_USERNAME?tab=toolsin about a minute. - Add your tool to an agent to test it out.
The project includes a validation script that checks your .mosaia manifest file against the required schema:
npm run validate:manifestThis script validates:
- name: Must be a string with minimum length 5, containing only alphanumeric characters and spaces
- description: Must be a string with minimum length 30
- schema.type: Must be "function"
- schema.function.name: Must be a string with minimum length 5
- schema.function.description: Must be a string with minimum length 30
- schema.function.strict: Must be a boolean (optional)
- schema.function.parameters: Must be a valid JSON schema object
- envVars: Must be an array of strings (optional)
See .mosaia.example for a valid manifest file structure.
The only requirements for a Mosaia Tool are that it:
- contains a valid
.mosaiafile - defines an npm
buildcommand npm run buildemits transpiled code into adistdirectory- the entrypoint of the trainspiled code is
dist/index.js.