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

# Agent messages

> The agent_message type stores individual messages within a conversation session.

export const EditionBadge = ({edition}) => <Tooltip tip={edition === "ee" ? "Requires an Enterprise Edition license." : "Available in the Community Edition."}>
    <span style={{
  fontFamily: "RobotoMono, monospace",
  fontSize: "12px",
  textTransform: "uppercase",
  letterSpacing: "0.04em",
  border: "1px solid var(--imp-hair-light)",
  padding: "2px 8px"
}}>
      {edition === "ee" ? "Enterprise" : "Community"}
    </span>
  </Tooltip>;

Each `agent_message` is one turn in a session — a user prompt or an assistant reply. Messages reference their parent session and the model that generated the response. See [Agents overview](/building/agents/overview) for product context.

```graphql theme={null}
type agent_message {
  content: String
  title: String
  user: Float
  message_id: String
  session: String
  model: String
  last_processed_at: Date
  embeddings_updated_at: Date
  createdAt: Date
  updatedAt: Date
  id: ID!
}
```

## Field notes

| Field                   | Notes                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------ |
| `message_id`            | Client-generated idempotency key; the frontend sets this to deduplicate streaming retries. |
| `session`               | ID string of the parent `agent_session`.                                                   |
| `model`                 | The model ID string that generated this message (for assistant turns).                     |
| `last_processed_at`     | Timestamp of the last knowledge-embedding pass over this record.                           |
| `embeddings_updated_at` | Timestamp when the vector embeddings for this record were last regenerated.                |

## Example query

```graphql theme={null}
query {
  agent_messagesPagination(
    limit: 50
    filters: [{ session: { eq: "session-456" } }]
    sort: { field: "createdAt", direction: ASC }
  ) {
    items {
      id
      content
      user
      model
      createdAt
    }
    pageInfo {
      currentPage
      hasNextPage
    }
  }
}
```
