@xfloor-memory-sdk
  1. SDK
@xfloor-memory-sdk
  • Get Started
    • Overview
    • Quick Start
    • Authentication and Identification
    • Core Concepts (5-Minute Read)
    • What to Use First (API Map)
  • SDK
    • Overview
    • SDK Installation & Setup
    • Python SDK
    • JavaScript SDK
    • Typescript SDK
    • Java SDK
    • FAQ & Troubleshooting
    • Copy-Paste Debug Checklists
  • Core FloorMemory
    • Query (Primary API)
      POST
    • Create Event (Post Content)
      POST
    • Recent Events
      GET
    • Basic information of a floor
      GET
  • Floor Management
    • Edit floor
      POST
    • Make floor Private
      POST
    • Make floor public
      POST
    • Rename floor
      POST
  • Registration
    • Sign Up
      POST
    • Sign In with email ID
      POST
    • Sign In with Mobile number
      POST
    • Validation
      POST
    • Change Password
      POST
    • Reset Password
      POST
    • Change email ID
      POST
    • Change Mobile number
      POST
    • Send Validation code
      POST
    • External User Registration
      POST
  • SDKs
  • Schemas
    • PostAdd
    • QueryResponse
    • Media
    • UserDetails
    • SignUpResponse
    • BlockDetails
    • FloorInfo
    • Threads
    • EventResponse
    • 400ErrorCode
    • Remaining
  1. SDK

Java SDK

FloorMemory Java SDK#

The FloorMemory Java SDK enables JVM-based applications to integrate with FloorMemory (xfloor’s conversational memory platform).
It is suitable for:
Backend services
Enterprise systems
Spring Boot, Quarkus, Micronaut applications
Desktop or Android clients interacting directly with FloorMemory APIs
You can use it to:
Query memory-aware conversations
Add content and events to Floors
Retrieve recent activity feeds
Fetch floor metadata
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#

πŸ‘‰ https://github.com/xFloorllm/floor-memory-sdk-client/tree/main/java

Production Examples (Highly Recommended)#

πŸ‘‰ https://github.com/xFloorllm/floor-memory-sdk-examples/tree/main/java
The examples repository includes:
Spring Boot integration samples
Clean service-layer usage
Multi-turn conversational flows
Event ingestion examples
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:
Bearer access token
App ID
User ID (for conversational continuity)

Configure ApiClient#


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#

ParameterMeaning
userIdUnique xfloor user identifier. Enables personalization and conversation continuity.
appIdRequired application context identifier.
floorId / floorIdsFloor(s) to read from or write to.
blockIdOptional block container inside a floor.
blockTypeCategory (post, forum).
Async ingestionCreate Event returns when queued; poll feed for confirmation.

Querying a Floor (Primary API)#

API: QueryApi.query()
Endpoint: POST /agent/memory/query

QueryRequest Parameters#

FieldTypeRequiredDescription
userIdStringβœ…Maintains conversational continuity
queryStringβœ…Natural language question
floorIdsList<String>βœ…Floors to search
kIntegerOptionalTop-K retrieval
includeMetadata"0" / "1"OptionalInclude metadata
summaryNeeded"0" / "1"OptionalGenerate summarized answer
appIdStringβœ…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#

FieldTypeRequiredDescription
floor_idStringβœ…Target floor
block_idStringOptionalBlock container
block_typeStringOptionalCategory (0 for post, 1 for forum)
user_idStringβœ…Author
titleStringOptionalTitle
descriptionStringβœ…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)

Fetch Floor Metadata#

API: GetFloorInformationApi.getFloorInformation(...)

Edit Floor (Owner Only)#


Manage Floor Visibility#


Thread Safety & Performance#

ApiClient is thread-safe
Use one ApiClient per application
Reuse API instances
Safe for concurrent service requests
Suitable for high-throughput backend systems

Using the Official Java Examples#

If you are building:
A Spring Boot microservice
A memory-enabled AI backend
An ingestion pipeline
A JVM-based enterprise system
A structured conversational platform
Start here:
πŸ‘‰ https://github.com/xFloorllm/floor-memory-sdk-examples/tree/main/java
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
No hidden abstractions
Designed for enterprise backend systems

Where to Go Next#

πŸ‘‰ JavaScript SDK
πŸ‘‰ TypeScript SDK
πŸ‘‰ Python SDK
πŸ‘‰ Core FloorMemory APIs
Modified atΒ 2026-02-19 05:06:07
Previous
Typescript SDK
Next
FAQ & Troubleshooting
Built with