> For the complete documentation index, see [llms.txt](https://docs.ecotone.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecotone.tech/messaging/contributing-to-ecotone/registering-new-module-package.md).

# Registering new Module Package

Registering a new module package in Ecotone

If you want to provide new integration with external tooling, or you want to expose your set of features as separate package, then we will need to create new `Module Package`.

## Set up new Package

Ecotone dev repository comes with Module Template, you can find the template in `packages/_PackageTemplate`.\
\
Start by copying this catalog and replace placeholders with `_PackageTemplate` with your package name, for example `Dbal`.

## Registering new Module

Each Module needs to implements `AnnotationModule` and be annotated with `#[ModuleAnnotation]`.

You will find example `Module`, that you can adjust in `Ecotone\_PackageTemplate\Configuration\_PackageTemplate.`\
\
**create method:**\
Module is constructed from static `create` method.\
In this method you may use of `AnnotationFinder` to fetch for all the classes that you're interested in.

**canHandle method:**

This tell Ecotone what `extension objects` should be delivered to `prepare method.`\
Those objects are objects created in user land code by [Service Configuration](/messaging/service-application-configuration.md).\
\
**prepare method:**

This registers [Configuration](https://github.com/ecotoneframework/ecotone/blob/master/src/Messaging/Config/Configuration.php) for Ecotone, that can be executed on later stage.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecotone.tech/messaging/contributing-to-ecotone/registering-new-module-package.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
