> For the complete documentation index, see [llms.txt](https://docs.xyo.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xyo.network/developers/autonomys-data-lake/integration-guide.md).

# Integration Guide

Design a bounded and verifiable Auto Drive integration using public libraries.

Use this sequence when adapting the public Auto Drive adapter to an application.

{% stepper %}
{% step %}

## Validate the request

Authenticate the caller, authorize the operation, allowlist the payload schema, and enforce strict byte, field, and nesting limits. Reject unexpected content before making a provider or wallet request.
{% endstep %}

{% step %}

## Create one canonical payload

Choose exactly which fields define payload identity. Serialize them deterministically and compute the identity once. Do not normalize or mutate the payload after approval.
{% endstep %}

{% step %}

## Store with bounded resources

Use the public `@xyo-network/archivist-s3/auto-drive` entry point from a protected server environment. Apply a deadline, cancellation signal, bounded concurrency, rate limits, and per-principal quotas.
{% endstep %}

{% step %}

## Read and verify

Perform a fresh retrieval by the expected identity. Reapply size and schema checks, recompute the identity, and compare canonical bytes. Never render retrieved content as HTML or pass it to a shell, template engine, or dynamic evaluator.
{% endstep %}

{% step %}

## Anchor only compatible evidence

Submit an XL1 reference only through a supported public-library combination. Confirm the signer, account, network, recipient, fees, payload identity, and complete transaction intent before approval.
{% endstep %}

{% step %}

## Observe finality independently

Use the typed XL1 SDK to observe finalized inclusion. Keep provider retrieval, transaction acceptance, finality, and archival as distinct results.
{% endstep %}
{% endstepper %}

## Operational requirements

* Make writes idempotent where the provider contract supports it.
* Do not automatically retry an ambiguous upload or transaction submission.
* Limit recovery lookups by identity, caller, rate, and time window.
* Escape or encode untrusted values before displaying them.
* Record non-secret evidence sufficient to investigate an interrupted operation.

{% hint style="warning" %}
The public storage and XL1 packages currently follow different protocol peer lines. Keep the storage-only workflow separate until a supported combination is published and verified.
{% endhint %}


---

# 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.xyo.network/developers/autonomys-data-lake/integration-guide.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.
