FloorMemory Java SDK#
The FloorMemory Java SDK enables JVM-based applications to integrate with FloorMemory (xfloorβs conversational memory platform).Spring Boot, Quarkus, Micronaut applications
Desktop or Android clients interacting directly with FloorMemory APIs
Query memory-aware conversations
Add content and events to Floors
Retrieve recent activity feeds
Manage floor visibility and settings (owner-only)
The SDK mirrors the FloorMemory API contract closely and follows a capability-based structure (Query, Event, Floors, Auth).
Source Code#
Official Java SDK#
Production Examples (Highly Recommended)#
The examples repository includes:Spring Boot integration samples
Clean service-layer usage
Multi-turn conversational flows
Production-safe configuration patterns
If you're building a real backend system, start there.
Installation#
Maven#
<dependency>
<groupId>ai.xfloor.memory</groupId>
<artifactId>floor-memory-sdk</artifactId>
<version>1.x.x</version>
</dependency>
Gradle#
Authentication & Client Setup (Required)#
All FloorMemory APIs require:User ID (for conversational continuity)
Critical Notes#
Token is sent as:
Authorization: Bearer <XFLOOR_API_KEY>
Create the ApiClient once and reuse it
app_id is mandatory on every API call
Do not embed tokens in source code
Safe to reuse across threads
Common Parameter Glossary#
| Parameter | Meaning |
|---|
userId | Unique xfloor user identifier. Enables personalization and conversation continuity. |
appId | Required application context identifier. |
floorId / floorIds | Floor(s) to read from or write to. |
blockId | Optional block container inside a floor. |
blockType | Category (post, forum). |
| Async ingestion | Create Event returns when queued; poll feed for confirmation. |
Querying a Floor (Primary API)#
Endpoint: POST /agent/memory/query
QueryRequest Parameters#
| Field | Type | Required | Description |
|---|
userId | String | β
| Maintains conversational continuity |
query | String | β
| Natural language question |
floorIds | List<String> | β
| Floors to search |
k | Integer | Optional | Top-K retrieval |
includeMetadata | "0" / "1" | Optional | Include metadata |
summaryNeeded | "0" / "1" | Optional | Generate summarized answer |
appId | String | β
| Application context |
Example#
What This Does#
Loads prior conversation context
Retrieves floor-grounded knowledge
Returns contextual answer
Stores interaction for follow-up queries
Adding Content to a Floor (Create Event)#
API: EventApi.event(inputInfo, files, appId)
Endpoint: POST /api/memory/events
Content-Type: multipart/form-data
Ingestion model: Asynchronous
inputInfo JSON Fields#
| Field | Type | Required | Description |
|---|
floor_id | String | β
| Target floor |
block_id | String | Optional | Block container |
block_type | String | Optional | Category (0 for post, 1 for forum) |
user_id | String | β
| Author |
title | String | Optional | Title |
description | String | β
| Main content |
Example#
Ingestion Behavior#
200 OK = accepted and queued
Background embedding and indexing
Not immediately searchable
Poll Recent Events if deterministic confirmation is required
Retrieve Recent Activity (Feed)#
API: GetRecentEventsApi.getRecentEvents(floorId, userId, appId)
API: GetFloorInformationApi.getFloorInformation(...)
Edit Floor (Owner Only)#
Manage Floor Visibility#
Use one ApiClient per application
Safe for concurrent service requests
Suitable for high-throughput backend systems
Using the Official Java Examples#
A Spring Boot microservice
A memory-enabled AI backend
A JVM-based enterprise system
A structured conversational platform
The examples repository demonstrates:Proper client initialization
Clean separation of config and service logic
Multi-floor conversational patterns
Deterministic ingestion flows
Production-safe environment configuration
Summary#
Java SDK mirrors FloorMemory APIs closely
Capability-based APIs (Query, Event, Floor, Auth)
app_id is mandatory for every call
Designed for enterprise backend systems
Where to Go Next#
π Core FloorMemory APIs
Modified atΒ 2026-02-19 05:06:07