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

# SDK: Mentions

> Discover, search, preview, and administer typed mention sources

Use `client.mention_types` for the tenant mention catalog and agent-scoped mention search.

## Search assigned mentions

The agent manifest is the authoritative editor catalog. Agent-scoped search rejects mention types that are disabled or not assigned to that agent.

<CodeGroup>
  ```python Python theme={null}
  manifest = await client.mention_types.agent_manifest(agent_id)
  accounts = await client.mention_types.search_for_agent(
      agent_id,
      "accounts",
      query="Acme",
      limit=10,
  )
  ```

  ```ts TypeScript theme={null}
  const manifest = await client.mention_types.agent_manifest(agentId);
  const accounts = await client.mention_types.search_for_agent(agentId, "accounts", {
    query: "Acme",
    limit: 10,
  });
  ```
</CodeGroup>

Catalog-wide search uses `search(id_or_key, ...)`. Queries may be empty and are limited to 256 characters; `limit` must be between 1 and 50.

## Editor discovery

<CodeGroup>
  ```python Python theme={null}
  providers = await client.mention_types.providers()
  editor = await client.mention_types.editor_options()
  objects = await client.mention_types.selectable_data_objects()
  catalog = await client.mention_types.data_object_catalog()
  ```

  ```ts TypeScript theme={null}
  const providers = await client.mention_types.providers();
  const editor = await client.mention_types.editor_options();
  const objects = await client.mention_types.data_objects();
  const catalog = await client.mention_types.data_object_catalog();
  ```
</CodeGroup>

`sources()` is a deprecated compatibility method and throws without making a request. Use provider and data-object discovery instead.

## Create a custom static mention type

<CodeGroup>
  ```python Python theme={null}
  mention = await client.mention_types.create(
      key="regions",
      label="Regions",
      description="Select a sales region.",
      provider_key="static",
      source_config={
          "options": [
              {"id": "emea", "name": "EMEA"},
              {"id": "amer", "name": "Americas"},
          ]
      },
  )
  ```

  ```ts TypeScript theme={null}
  const mention = await client.mention_types.create({
    key: "regions",
    label: "Regions",
    description: "Select a sales region.",
    provider_key: "static",
    source_config: {
      options: [
        { id: "emea", name: "EMEA" },
        { id: "amer", name: "Americas" },
      ],
    },
  });
  ```
</CodeGroup>

Only providers marked as customer-configurable can back custom mention types. Create, update, availability, and delete operations require tenant-admin permission. System-managed types cannot be updated or deleted, and a custom type cannot be deleted while an agent still references it.

## Preview a data-object source

<CodeGroup>
  ```python Python theme={null}
  from agentflow.models import MentionDataObjectPreviewRequest

  preview = await client.mention_types.preview_data_object(
      MentionDataObjectPreviewRequest(
          mention_key="accounts",
          source_config={
              "schema_slug": "accounts",
              "label_field": "name",
              "search_fields": ["name"],
              "context_fields": ["name", "industry"],
          },
          query="Acme",
      )
  )
  ```

  ```ts TypeScript theme={null}
  const preview = await client.mention_types.preview_data_object({
    mention_key: "accounts",
    source_config: {
      schema_slug: "accounts",
      label_field: "name",
      search_fields: ["name"],
      context_fields: ["name", "industry"],
    },
    query: "Acme",
  });
  ```
</CodeGroup>

The exact `source_config` fields come from the selected provider and data-object catalog. Preview validates availability and returns sample options without creating a mention type.
