> ## Documentation Index
> Fetch the complete documentation index at: https://docs.semicola.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inventory sources

> Connect the AdCP sales agent or ad server that actually delivers your inventory.

An **inventory source** is where your inventory really lives. Semicola sits between buyers and your
source: it discovers products from it, forwards approved media buys to it, and reads delivery back.

## Kinds of source

| `executionType`       | What it is                                                                                               |
| --------------------- | -------------------------------------------------------------------------------------------------------- |
| `AGENT`               | Any AdCP sales agent you run, reached by URL.                                                            |
| `MANAGED_SALES_AGENT` | Your ad server, connected through a managed sales agent that exposes its products, avails and reporting. |
| `LINKED_STOREFRONT`   | Another storefront's inventory, sold through yours.                                                      |
| `MODULAR_SOURCE`      | Inventory assembled from uploaded feeds.                                                                 |

## Connect a sales agent

```json save_inventory_source theme={null}
{
  "name": "Larkstone sales agent",
  "executionType": "AGENT",
  "endpointUrl": "https://agent.larkstone.test/mcp",
  "protocol": "MCP",
  "authenticationType": "API_KEY",
  "credentials": { "apiKey": "…" },
  "productMode": "WHOLESALE",
  "runDiscoveryTest": true
}
```

Credentials are write-only: Semicola stores them encrypted and never returns them. On connect it calls
the agent's `get_adcp_capabilities`, and with `runDiscoveryTest` it sends a probe brief through
`get_products` so you can see real products come back.

## Product mode

* `WHOLESALE`: the source's products are sold as they are.
* `COMPOSING`: the storefront agent composes proposals from the source's inventory.
* `BOTH`: either, depending on the brief.

## Health

Each source reports its health and when it was last checked. An unreachable or erroring source moves
the storefront to `live_attention` or `live_critical` and shows the fix on the setup checklist.
Buyers see failed forwards as media buys pending at `salesagent`, not as silence.

## Publishing who may sell for you

If you represent publisher properties, publish an `adagents.json` file on each publisher domain that
authorizes Semicola to sell on your behalf. Buyers' agents check it before they trust a listing.
