# Custom datasources (https://docs.getaviato.com/integrations/custom-datasources)



A custom datasource lets Aviato work with records that do not live in a supported database: for example, an internal service or a helpdesk API. The SDK supplies collection metadata and operations; the agent applies the caller's permissions.

## Describe the collection [#describe-the-collection]

Define the collection name, fields, and primary key. Use stable identifiers. Advertise which filtering, sorting, and count operations your datasource implements so the agent knows which work to delegate.

## Implement only the operations you support [#implement-only-the-operations-you-support]

A list operation is the starting point. Add get, create, update, or delete as appropriate for the source. Do not expose a write operation merely because the upstream API supports it; decide what operators should be allowed to change.

For sources that cannot efficiently filter or sort, the agent may need to process records in memory. Avoid advertising capabilities that your handler ignores, and test large result sets.

## Choose live access or replication [#choose-live-access-or-replication]

Live access queries the source for each operation. Replication maintains an agent-side copy using changes from your plugin and refreshes it periodically or on demand. Replication changes freshness and storage requirements; persist the agent data directory and explain the refresh interval to users.

See the [full datasource guide](https://github.com/getaviato/aviato/blob/master/docs/guides/custom-datasources.md) and the language fixtures for executable implementations.
