Skip to main content
Record a signal when your own AI agent can’t answer a customer and hands the thread to your team, or when your team finds a question your docs should answer. Plain checks the signal the same way it checks Customer Agent signals, groups it into a knowledge gap, and raises a task once the gap has 2 signals.
Knowledge gaps are in beta. The mutation and fields on this page may change without a deprecation period.
For TypeScript, the GraphQL SDK gives you a fully typed client for these operations.
This operation requires the following permissions:
  • knowledgeGapSignal:create
  • knowledgeGapSignal:read
  • thread:read
  • timeline:read
  • helpCenterArticle:read if you send a helpCenterArticleId
  • indexedDocument:read if you send an indexedDocumentId
Knowledge gaps and Plain AI must be on for your workspace.

What to send

Only threadId is required. Plain reads the thread’s conversation to decide whether it’s a gap and which gap it belongs to.
  • searchQueries: what your agent searched for, up to 20 queries of at most 500 characters each
  • referencedDocuments: the documents your agent found, up to 20. Set exactly one of helpCenterArticleId or indexedDocumentId on each, using the IDs that searchKnowledgeSources returns.
Sending what your agent searched for and found helps Plain tell a real gap from a question your docs already answer.
Mutation
Variables

Calling it again for the same thread

A signal is tied to the latest message in the thread. Calling the mutation again before a new message arrives returns the existing signal and records nothing new, so retries are safe. Once a new message arrives, the next call records a new signal, which counts toward the gap.

Errors