Skip to content
中

Create

Writing an extension

Coopanion supports Cortico’s World and provider extensions. Worlds give Coo environments or tools to use. Provider extensions connect model services. Cortico’s extension docs also cover the contract and template for standalone bots.

As with figure packs, you can copy the text below into an AI coding assistant (a coding agent such as DeepSeek Harness, Claude Code or Codex) and have it read the docs and work the extension out with you.

Prompt for your AI coding assistant (a starting point only)Show the full text
I want to write an extension for the Coopanion desktop pet (built on the Cortico framework). First, read these:
- The guide's "Writing an extension" page: https://coo.palailab.org/guide/en/make-extension/
- Cortico's extension docs: https://github.com/Pal-AI-Lab/Cortico/blob/main/docs/extensions.md
- The extension templates: https://github.com/Pal-AI-Lab/Cortico/tree/main/templates/extension

Then work it out with me step by step:
1. Ask me what the extension should do, whether it is a World, a provider or a bot, and which outside services it needs to reach. A few questions at a time.
2. Propose a plan: the interfaces it uses, what it declares, and which network addresses and files it touches. Wait for my OK before writing anything.
3. Start from a copy of the matching template and follow the naming rules in the docs. Use cortico-world for the keyword on a World and cortico-provider on a provider.
4. When done, run corepack pnpm install and pnpm test, and hand it to me only once every test passes.
5. Tell me how to use Extension market → Manual install → From a local directory, then restart the process to test it. The World market is on World extensions. For providers, use Model connections in advanced mode. I’ll decide whether to publish to npm.

Rules: build only what I agreed to; never read or upload my private data or API keys; credit anyone else's code or assets with their source and licence.
  1. templates/extension/ in the Cortico repository has an installable template for each of the three kinds. Copy one.

  2. Change the package name and id, then run corepack pnpm install and pnpm test.

  3. Open World extensions → Extension market → Manual install and choose From a local directory. For a provider, use Model connections → Extension market in advanced mode. A local install links the source folder. Restart the process to load changes.

How to write one, the manifest format and contract versions are in Cortico’s extension docs. Tooling for writing extensions is in Cortina.

  • On npm. Set the cortico-world keyword in a World’s package.json or cortico-provider for a provider. The market searches npm by extension type.
  • Check first. Use Check extension under Manual install to validate the package declaration, then install and run the extension in a test setup.
  • Mind the licences: state your extension’s licence; make sure you may use any code, images or audio from others, and credit them. Don’t collect people’s private data.

The market’s tags, badges and comments come from the official index, Pal-AI-Lab/cortico-extensions, which picks up new npm packages on a schedule. To be listed right after publishing, open an issue there titled [sync] your-package-name; a bot syncs it at once and closes the issue.

  • To tag your package, add tag IDs to cortico.tags in package.json and publish a new version. See TAGS.md.
  • To apply for certification, open a [certify] your-package-name issue. See the certification requirements.

The comments and likes in an extension’s details are that package’s thread in the index repository’s Discussions. Check in now and then, and answer the problems people report.