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

# Sessions

> GraphQL types for conversation sessions and messages

## agent\_sessions

Conversation sessions between users and agents.

```graphql theme={null}
type agent_sessions {
  id: ID!
  agent: ID!
  user: ID
  name: String
  createdAt: Date!
  updatedAt: Date!
  RBAC: RBACData
}
```

**Example query:**

```graphql theme={null}
query {
  agent_sessionsPagination(
    limit: 20
    filters: [{ agent: { eq: "agent-123" } }]
  ) {
    items {
      id
      name
      createdAt
    }
  }
}
```

## agent\_messages

Individual messages within a session.

```graphql theme={null}
type agent_messages {
  id: ID!
  session: ID!
  role: String!       # "user" | "assistant" | "system"
  content: String!
  createdAt: Date!
  updatedAt: Date!
}
```

## Usage

Sessions track conversation history between users and agents. Each session contains multiple messages with different roles:

* **user** - Messages from the user
* **assistant** - Responses from the AI agent
* **system** - System instructions or context

## Related Types

<CardGroup cols={2}>
  <Card title="Agent Types" icon="robot" href="/api-reference/core-types/agent-types">
    Agent configurations
  </Card>

  <Card title="User Management" icon="users" href="/api-reference/core-types/user-management">
    User accounts
  </Card>

  <Card title="RBAC Types" icon="shield" href="/api-reference/core-types/rbac-types">
    Session access control
  </Card>

  <Card title="Back to Overview" icon="arrow-left" href="/api-reference/core-types/overview">
    View all core types
  </Card>
</CardGroup>
