> 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

Open digital public infrastructure for agriculture.

Agri Stack is **open-source digital public infrastructure (DPI) for agriculture**. A country deploys it so that the services farmers need (credit, insurance, subsidies, OAN (marketplace), advisory) can draw on trusted farmer data, **with the farmer's consent**.

* **Open source.** Free to deploy, adapt and extend.
* **Digital public infrastructure.** Countries deploy it to provide essential services to farmers, on infrastructure they own and run.
* **Consent built in.** Farmer data is shared with service providers only with the farmer's consent, checked on every request.
* **Distributed registries.** Each department runs its own registry, on its own infrastructure, and stays in control of its data; Agri Stack queries them together and shares the result, without centralising the data.
* **Open standards.** It follows open standards for data, consent, identity and APIs ([Standards](https://docs.openg2p.org/products/open-agri-stack/architecture/standards.md)).
* **A foundation for farmer services networks.** A natural building block for networks such as the Open Agri Network (OAN), and usable on its own without one.
* **Partners onboard once.** A bank or agritech joins once and uses one farmer consent across several registries.

## At a glance

<figure><img src="https://3034178245-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZcdob2emEcLMvLyIxqT%2Fuploads%2Fgit-blob-fbaa15e5c0b2b3daa2db08e5bb0fc7b7adce3a94%2Fopen-agri-stack-overview.svg?alt=media" alt="Agri Stack. Above it, farmer services offered by banks, insurers, government programmes and agritechs, with the farmer&#x27;s consent; for example credit, insurance, subsidies, OAN (marketplace), advisory and more. A use case for a farmer reaches Agri Stack through its API. Agri Stack has three layers: the Exchange for consented data sharing (Composite, consent with national-ID login, Partner Management); the registries, systems of record, each run by its own department and each issuing verifiable credentials (Farmer Registry, Crop Sown Registry, Livestock Registry, Land Registry); and the catalogues, a public common vocabulary (crop, seed, inputs, livestock, location, land)."><figcaption><p>Concept: Agri Stack makes farmer data available, with consent, to the farmer services offered in a country</p></figcaption></figure>

## What Agri Stack does

Agri Stack lets service providers (banks, insurers, government programmes, agritechs) get the farmer data they need for a service, **only with the farmer's consent**. The farmer proves who they are with the national ID and agrees to what is shared, for what purpose and for how long. Each registry releases only what the consent and its own department allow, and every access is recorded.

## The layers

### Farmer services

The services that use Agri Stack's data sit above it. They can be anything a country offers farmers: loans, insurance, subsidies, market linkages, advisory. They reach Agri Stack through its API, or through a farmer services network such as OAN ([below](#agri-stack-and-oan)).

### Exchange

The **Exchange** is where service providers (partners) onboard once and ask for farmer data. It collects and checks the farmer's consent, decides which partner may ask for what, and queries several registries in one request. Data is shared through **use cases**, which partners are assigned when they are onboarded ([Use Cases](https://docs.openg2p.org/products/open-agri-stack/architecture/use-cases.md)). A registry can also be used directly, without the Exchange. More: [The Exchange](https://docs.openg2p.org/products/open-agri-stack/architecture/exchange.md).

### Registries

The **registries** are the systems of record, each run by its own department. Registries envisaged in Agri Stack today:

* **Farmer Registry:** who the farmers are, their households and holdings.
* **Crop Sown Registry:** what each farmer grows, plot by plot and season by season.
* **Livestock Registry:** animals and their life events.
* **Land Registry:** parcels, holdings and tenure.

More can be added as a country needs them. All registries identify the farmer by the **Farmer ID** the Farmer Registry issues; the national ID is used to authenticate the farmer. Each registry also issues verifiable credentials to farmers. More: [Registries](https://docs.openg2p.org/products/open-agri-stack/registries.md).

### Catalogues

The **catalogues** are the common vocabulary every registry and service uses: crops, seed varieties, farm inputs (fertilisers, pest control, machinery, irrigation), livestock, locations, land. They are defined once for the country, and can be published openly. More: [Catalogue](https://docs.openg2p.org/products/open-agri-stack/architecture/catalogue.md).

## Agri Stack and OAN

Agri Stack stands on its own: any authorised partner uses it through its API. A country that also runs an agricultural services network such as the Open Agri Network (OAN), built on Beckn, can make Agri Stack one of that network's providers, so partners on the network reach it with the same order mechanism they use for everything else. That is a proposal, described in [Interoperability with OAN (Beckn)](https://docs.openg2p.org/products/open-agri-stack/roadmap/oan-interoperability.md).

<figure><img src="https://3034178245-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZcdob2emEcLMvLyIxqT%2Fuploads%2Fgit-blob-0514ba84b509b26f1f8b46873a8686020ae75dd2%2Fopen-agri-stack-oan-overview.svg?alt=media" alt="OAN above Agri Stack. OAN holds use cases of value to the farmer, for example access to credit, access to market, grievance, access to payment, and more. A use case for a farmer reaches Agri Stack through Beckn or Agri Stack&#x27;s own API. Agri Stack has the Exchange for consented data sharing, the departments&#x27; registries and the public catalogues."><figcaption><p>Concept: Agri Stack with OAN on top (proposal)</p></figcaption></figure>

## Licence and ownership

Agri Stack is available under the **Mozilla Public License 2.0** ([licence](https://docs.openg2p.org/resources/license.md)). It is owned and maintained by the International Institute of Information Technology, Bangalore ([IIITB](https://www.iiitb.ac.in/)). The source code of every module: [Versions & Source Code](https://docs.openg2p.org/products/open-agri-stack/versions.md).


---

# 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.
