> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/products/open-agri-stack.md).

# Agri Stack

Agri Stack is the digital public infrastructure (DPI) for agriculture: sovereign departmental registries, shared reference data, and the shared services that let partners use farmer data with the farm

<figure><img src="https://3034178245-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZcdob2emEcLMvLyIxqT%2Fuploads%2Fgit-blob-aab88e5b2bbdcf2a4974d0033dc230996280c494%2Fopen-agri-stack-logo.jpg?alt=media" alt="Agri Stack — DPI for Agriculture" width="160"><figcaption></figcaption></figure>

{% hint style="info" %}
**Source code:** [github.com/openg2p/agri-stack](https://github.com/openg2p/agri-stack) (the Composite), [github.com/OpenG2P/crop-sown-registry](https://github.com/OpenG2P/crop-sown-registry), [github.com/OpenG2P/farmer-registry](https://github.com/OpenG2P/farmer-registry) and [github.com/OpenG2P/registry-platform](https://github.com/OpenG2P/registry-platform).
{% endhint %}

## What it is

Agri Stack is the digital public infrastructure (DPI) for agriculture. It has four parts:

* **Registries:** the functional registries (farmer, crop sown, livestock, DA), each run by its department.
* **Catalogues:** the reference data every registry uses (datasets such as crop types, units and seed varieties, geography).
* **Platform services:** Partner Management, Consent Manager and Audit Manager. Every install has its own.
* [**The Exchange**](/products/open-agri-stack/architecture/exchange.md) (the data exchange layer): where service providers (banks, MFIs, agritechs: **partners**) onboard once and use one farmer consent across registries: the partner portal, the Exchange's own Consent Manager and Partner Management, eSignet, and the Composite (the Exchange's use-case service).

These pages describe how a partner gets farmer data held across the registries: who routes a request, who decides what may be shared, and who enforces it.

## Registries

Each department runs its own registry on the OpenG2P [registry platform](/products/registry/registry.md). Registries are sovereign: each checks the caller, asks its own Consent Manager what may be released, and releases only that. Registries share **data**, never code.

| Registry                     | Holds                                                                                                      | Kind                                                       | Status                                                                                                  |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| **Farmer Registry (FR)**     | Farmers, land parcels, households, declared main crops, livestock (until a Livestock Registry exists)      | Registers and child tables (entities)                      | Built ([Farmer Registry](/products/registry/farmer-registry.md))                                        |
| **Crop Sown Registry (CSR)** | What each farmer plans, prepares, sows, observes and harvests, plot by plot and season by season; clusters | An activity register (occurrences) plus a Cluster register | Built ([Crop Sown Registry](/products/registry/crop-sown-registry.md))                                  |
| **Livestock Registry**       | Animals and livestock events (born, vaccinated, treated, sold)                                             | An entity register and an activity register                | Planned (design only, see [Livestock Registry](/products/open-agri-stack/design/livestock-registry.md)) |
| **DA Registry**              | Development agents                                                                                         | Register                                                   | Planned                                                                                                 |

The kinds are the registry platform's: a **register** holds changeable records such as farmers, a **table** holds a register record's child rows such as land parcels, and an [**activity register**](/products/registry/registry/features/activity-register.md) holds append-only records of what happened, such as a crop sown or harvested, with figures worked out from them.

All registries are keyed to the same national identifier (Fayda in the reference setup).

## Catalogues, platform services and the Exchange

| Service                                                                                   | Role in Agri Stack                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Catalogues**                                                                            | All reference data, defined once for the country; registries hold none of their own: datasets (the core datasets plus the agriculture theme of the country pack in use; ETH ships, its crops following the Ministry of Agriculture's crop variety list), geography, sample people. Served by the OpenG2P [Master Data Service](/platform/platform-services/master-data-service.md). Versions, approvals and a change feed: see [how MDS works](/platform/platform-services/master-data-service.md#key-features) and [open items](/products/open-agri-stack/open-items.md#catalogues) |
| [Partner Management (PM)](/platform/platform-services/partner-management.md)              | Trust root for every participant (partners, registries, the Composite): identities, public keys and access policies (what each partner may ask for), approved there. One per install                                                                                                                                                                                                                                                                                                                                                                                                 |
| [Consent Manager (CM)](/platform/platform-services/consent-management.md)                 | The farmer's consent; `/validate` checks it against the partner's policy in PM and tells each registry what it may release. One per install; the Exchange's CM collects consents and issues a consent token per registry                                                                                                                                                                                                                                                                                                                                                             |
| **Composite** (in the Exchange)                                                           | One generic service that serves approved use cases (e.g. `loan-profile@1`) by querying several registries with one consent and returning one signed response                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [Approval Workflow Engine (AWE)](/platform/platform-services/approval-workflow-engine.md) | Approval of registers' changes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [Audit Manager](/platform/platform-services/audit-manager.md)                             | Audit events from every hop, linked by the request ID. One per install                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

## Map of this section

Built today: the Farmer and Crop Sown registries, activity registers in the registry platform, the catalogues (Master Data Service), and the [Exchange](/products/open-agri-stack/architecture/exchange.md): the [Composite](/products/open-agri-stack/exchange/composite.md) with its [console](/products/open-agri-stack/exchange/composite/console.md), a [consent token per registry](/products/open-agri-stack/architecture/request-flow.md) from one consent, and [consent collection](/products/open-agri-stack/architecture/consent.md) in person with a form. Still to do: [TODOs & Open Items](/products/open-agri-stack/open-items.md).

| Part                                                                       | Pages                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**Architecture and concepts**](/products/open-agri-stack/architecture.md) | Components and who talks to whom; [the Exchange](/products/open-agri-stack/architecture/exchange.md); [consent](/products/open-agri-stack/architecture/consent.md); [data-sharing policies](/products/open-agri-stack/architecture/data-sharing-policies.md); [request flow](/products/open-agri-stack/architecture/request-flow.md); [registries](/products/open-agri-stack/architecture/registries.md); [terms](/products/open-agri-stack/architecture/terms.md); [standards](/products/open-agri-stack/architecture/standards.md)                                                                                                                                                          |
| [**Design**](/products/open-agri-stack/design.md)                          | [Registry data sync](/products/open-agri-stack/design/registry-data-sync.md); [Livestock Registry](/products/open-agri-stack/design/livestock-registry.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [**Exchange**](/products/open-agri-stack/exchange.md)                      | The [Composite](/products/open-agri-stack/exchange/composite.md), the partners' entry point: design; [Composite API](/products/open-agri-stack/exchange/composite/api.md); [use-case configuration](/products/open-agri-stack/exchange/composite/use-case-configuration.md); [adding a data source](/products/open-agri-stack/exchange/composite/adding-a-data-source.md); [Composite console](/products/open-agri-stack/exchange/composite/console.md); [running the Composite locally](/products/open-agri-stack/exchange/composite/running-locally.md)                                                                                                                                     |
| [**Deployment**](/products/open-agri-stack/deployment.md)                  | Topology, install order and the names that must match; installing the [Exchange](/products/open-agri-stack/deployment/exchange.md), the [Farmer Registry](/products/open-agri-stack/deployment/farmer-registry.md), the [Crop Sown Registry](/products/open-agri-stack/deployment/crop-sown-registry.md) and the [Composite](/products/open-agri-stack/deployment/composite.md); [after install](/products/open-agri-stack/deployment/after-install.md); [testing](/products/open-agri-stack/deployment/testing.md); [upgrades and uninstall](/products/open-agri-stack/deployment/upgrades-and-uninstall.md); [separate clusters](/products/open-agri-stack/deployment/separate-clusters.md) |
| [**Partner guide**](/products/open-agri-stack/partner-guide.md)            | For banks, MFIs and agritechs: joining Agri Stack and calling a use case end to end                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [**TODOs and open items**](/products/open-agri-stack/open-items.md)        | Work still to do, with the design worked out so far                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |


---

# 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.openg2p.org/products/open-agri-stack.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.
