> For the complete documentation index, see [llms.txt](https://docs.mezzanine.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mezzanine.xyz/protocol/modules.md).

# Modules

Modules in Mezzanine are standalone contracts that contain bespoke functionality.  They are designed to be flexible and interchangeable. Modules usually contain specific logic for various types of spending assets (payroll, recurring payments, vesting, selling/distributing equity) or receiving money (billing, invoicing, subscriptions, streaming, token gating, ecommerce). To start with, a limited number of modules are available from Mezzanine. The long-term objective is to allow any developers to create and integrate many types of modules to provide companies a wide range of choices.

Modules will often be a sole function of a particular department. For example, a company may create a "payroll" department and augment it with a "streaming payroll" module. The payroll department would have authority to use the module and spend up to the amount granted by the treasury (board). Modules may have additional safeguards,  protections, and approvals, depending on their design.&#x20;

{% hint style="info" %}
Technical teams can easily create custom modules in Mezzanine to suit their needs (or as 3rd party software for other Mezzanine companies).  Mezzanine provides a base *Module* contract that can be inherited for hierarchical spending and access control.  For more information about creating a module, see [Creating a Custom Module](/technical-documentation/creating-a-custom-module.md).
{% endhint %}

Notably, the admin-like functionality of modules should be similar to that of departments.  For example, a subscription module may contain admin-like functionality to determine pricing.  This pricing, in turn, should not only be controlled by its *parent* but all of the module's *ancestors.*

<figure><img src="/files/FPS9Ym9ExspWR9cunjti" alt=""><figcaption></figcaption></figure>

In the above examples, both the *Treasury* and the *Finance Department* would be able to determine the pricing in the subscription module.

This hierarchical access control will be available for all Mezzanine-created modules but cannot be enforced for user-created modules due to their bespoke nature. &#x20;


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mezzanine.xyz/protocol/modules.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
