Smart Memory
The Smart Memory service provides comprehensive memory management capabilities for AI agents. It enables agents to store, retrieve, search, and manage memories in a timeline-based system with working-, semantic-, episodic-, procedural-, memory storage capabilities. The service supports semantic search, temporal queries, and intelligent summarization.
POST /v1/put_memory
Stores a new memory entry in the agent’s working memory. Memories are organized by timeline and can include contextual information like the agent responsible and triggering events.
The system will:
- Store the memory with automatic timestamping
- Generate embeddings for semantic search
- Associate the memory with the specified timeline
- Enable future retrieval and search operations
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
sessionId
(string
) Required
Details
Description
Unique session identifier for the working memory instance
Example
01jxanr45haeswhay4n0q8340y
timeline
(string
(nullable))
Details
Description
Timeline identifier for organizing related memories
Example
user-conversation-2024
key
(string
(nullable))
Details
Description
Optional key for direct memory retrieval
Example
user-preference-theme
content
(string
) Required
Details
Description
The actual memory content to store
Example
User prefers dark theme for the interface
agent
(string
(nullable))
Details
Description
Agent identifier responsible for this memory
Example
assistant-v1
memoryId
(string
)
Details
Description
Unique identifier for the stored memory entry
Example
01jxanr45haeswhay4n0q8340y
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const putMemory = await client.putMemory.create({ content: 'User prefers dark theme for the interface', sessionId: '01jxanr45haeswhay4n0q8340y', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(putMemory.memoryId);
from raindrop import Raindrop
client = Raindrop()put_memory = client.put_memory.create( content="User prefers dark theme for the interface", session_id="01jxanr45haeswhay4n0q8340y", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(put_memory.memory_id)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) putMemory, err := client.PutMemory.New(context.TODO(), raindrop.PutMemoryNewParams{ Content: "User prefers dark theme for the interface", SessionID: "01jxanr45haeswhay4n0q8340y", SmartMemoryLocation: raindrop.PutMemoryNewParamsSmartMemoryLocation{SmartMemory: raindrop.PutMemoryNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", putMemory.MemoryID)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.putmemory.PutMemoryCreateParams;import com.raindrop.api.models.putmemory.PutMemoryCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
PutMemoryCreateParams params = PutMemoryCreateParams.builder() .content("User prefers dark theme for the interface") .sessionId("01jxanr45haeswhay4n0q8340y") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); PutMemoryCreateResponse putMemory = client.putMemory().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/put_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "session_id": "01jxanr45haeswhay4n0q8340y", "content": "User prefers dark theme for the interface"}'
Response Examples
{ "memoryId": "01jxanr45haeswhay4n0q8340y"}
POST /v1/get_memory
Retrieves memories based on timeline, key, or temporal criteria. Supports filtering by specific timelines, time ranges, and limiting results to the most recent entries.
Query capabilities:
- Timeline-specific retrieval
- Key-based lookup
- Temporal range queries
- Most recent N entries
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
sessionId
(string
) Required
Details
Description
Unique session identifier for the working memory instance
Example
01jxanr45haeswhay4n0q8340y
timeline
(string
(nullable))
Details
Description
Timeline to filter memories
Example
user-conversation-2024
key
(string
(nullable))
Details
Description
Specific key to retrieve
Example
user-preference-theme
nMostRecent
(integer
(nullable))
Details
Description
Maximum number of most recent memories to return
Example
10
startTime
(object
(nullable))
Details
Description
Start time for temporal filtering
endTime
(object
(nullable))
Details
Description
End time for temporal filtering
memories
(array
)
Details
Description
List of matching memory entries
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const getMemory = await client.getMemory.retrieve({ sessionId: '01jxanr45haeswhay4n0q8340y', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(getMemory.memories);
from raindrop import Raindrop
client = Raindrop()get_memory = client.get_memory.retrieve( session_id="01jxanr45haeswhay4n0q8340y", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(get_memory.memories)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) getMemory, err := client.GetMemory.Get(context.TODO(), raindrop.GetMemoryGetParams{ SessionID: "01jxanr45haeswhay4n0q8340y", SmartMemoryLocation: raindrop.GetMemoryGetParamsSmartMemoryLocation{SmartMemory: raindrop.GetMemoryGetParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", getMemory.Memories)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.getmemory.GetMemoryRetrieveParams;import com.raindrop.api.models.getmemory.GetMemoryRetrieveResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
GetMemoryRetrieveParams params = GetMemoryRetrieveParams.builder() .sessionId("01jxanr45haeswhay4n0q8340y") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); GetMemoryRetrieveResponse getMemory = client.getMemory().retrieve(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/get_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "session_id": "01jxanr45haeswhay4n0q8340y"}'
Response Examples
{ "memories": [ { "id": "01jxanr45haeswhay4n0q8340y", "sessionId": "01jxanr45haeswhay4n0q8340y", "timeline": "user-conversation-2024", "by": "assistant-v1", "dueTo": "user-input", "content": "User prefers dark theme for the interface", "at": "2025-05-05T18:36:43.029Z", "key": "user-preference-theme", "agent": "assistant-v1" } ]}
POST /v1/search_memory
Performs semantic search across stored memories using natural language queries. The system uses vector embeddings to find semantically similar content regardless of exact keyword matches.
Search features:
- Semantic similarity matching
- Timeline-specific search
- Temporal filtering
- Relevance-based ranking
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
sessionId
(string
) Required
Details
Description
Unique session identifier for the working memory instance
Example
01jxanr45haeswhay4n0q8340y
timeline
(string
(nullable))
Details
Description
Timeline to filter search results
Example
user-conversation-2024
terms
(string
) Required
Details
Description
Natural language search query
Example
user interface preferences
nMostRecent
(integer
(nullable))
Details
Description
Maximum number of most recent results to return
Example
10
startTime
(object
(nullable))
Details
Description
Start time for temporal filtering
endTime
(object
(nullable))
Details
Description
End time for temporal filtering
memories
(array
)
Details
Description
List of matching memory entries ordered by relevance
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const response = await client.query.memory.search({ sessionId: '01jxanr45haeswhay4n0q8340y', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } }, terms: 'user interface preferences',});
console.log(response.memories);
from raindrop import Raindrop
client = Raindrop()response = client.query.memory.search( session_id="01jxanr45haeswhay4n0q8340y", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } }, terms="user interface preferences",)print(response.memories)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.Query.Memory.Search(context.TODO(), raindrop.QueryMemorySearchParams{ SessionID: "01jxanr45haeswhay4n0q8340y", SmartMemoryLocation: raindrop.QueryMemorySearchParamsSmartMemoryLocation{SmartMemory: raindrop.QueryMemorySearchParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, Terms: "user interface preferences", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Memories)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.query.memory.MemorySearchParams;import com.raindrop.api.models.query.memory.MemorySearchResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
MemorySearchParams params = MemorySearchParams.builder() .sessionId("01jxanr45haeswhay4n0q8340y") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .terms("user interface preferences") .build(); MemorySearchResponse response = client.query().memory().search(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/search_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "session_id": "01jxanr45haeswhay4n0q8340y", "terms": "user interface preferences"}'
Response Examples
{ "memories": [ { "id": "01jxanr45haeswhay4n0q8340y", "sessionId": "01jxanr45haeswhay4n0q8340y", "timeline": "user-conversation-2024", "by": "assistant-v1", "dueTo": "user-input", "content": "User prefers dark theme for the interface", "at": "2025-05-05T18:36:43.029Z", "key": "user-preference-theme", "agent": "assistant-v1" } ]}
POST /v1/delete_memory
Removes a specific memory entry from storage. This operation is permanent and cannot be undone.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
sessionId
(string
) Required
Details
Description
Unique session identifier for the working memory instance
Example
01jxanr45haeswhay4n0q8340y
memoryId
(string
) Required
Details
Description
Unique identifier of the memory entry to delete
Example
01jxanr45haeswhay4n0q8340y
success
(boolean
)
Details
Description
Indicates whether the deletion was successful
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const deleteMemory = await client.deleteMemory.create({ memoryId: '01jxanr45haeswhay4n0q8340y', sessionId: '01jxanr45haeswhay4n0q8340y', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(deleteMemory.success);
from raindrop import Raindrop
client = Raindrop()delete_memory = client.delete_memory.create( memory_id="01jxanr45haeswhay4n0q8340y", session_id="01jxanr45haeswhay4n0q8340y", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(delete_memory.success)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) deleteMemory, err := client.DeleteMemory.New(context.TODO(), raindrop.DeleteMemoryNewParams{ MemoryID: "01jxanr45haeswhay4n0q8340y", SessionID: "01jxanr45haeswhay4n0q8340y", SmartMemoryLocation: raindrop.DeleteMemoryNewParamsSmartMemoryLocation{SmartMemory: raindrop.DeleteMemoryNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", deleteMemory.Success)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.deletememory.DeleteMemoryCreateParams;import com.raindrop.api.models.deletememory.DeleteMemoryCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
DeleteMemoryCreateParams params = DeleteMemoryCreateParams.builder() .memoryId("01jxanr45haeswhay4n0q8340y") .sessionId("01jxanr45haeswhay4n0q8340y") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); DeleteMemoryCreateResponse deleteMemory = client.deleteMemory().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/delete_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "session_id": "01jxanr45haeswhay4n0q8340y", "memory_id": "01jxanr45haeswhay4n0q8340y"}'
Response Examples
{ "success": true}
POST /v1/summarize_memory
Generates intelligent summaries of a collection of memories using AI. Can optionally accept custom system prompts to guide the summarization style.
The summarization system:
- Identifies key themes and patterns
- Extracts important events and decisions
- Maintains temporal context
- Supports custom summarization instructions
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
sessionId
(string
) Required
Details
Description
Unique session identifier for the working memory instance
Example
01jxanr45haeswhay4n0q8340y
memoryIds
(array
) Required
Details
Description
List of memory IDs to summarize
Example
[ "01jxanr45haeswhay4n0q8340y", "01jxanr45haeswhay4n0q8341z"]
systemPrompt
(string
(nullable))
Details
Description
Optional custom system prompt for summarization
Example
Summarize the key decisions and action items
summary
(string
)
Details
Description
AI-generated summary of the memories
Example
The conversation focused on user interface preferences...
summarizedMemoryIds
(array
)
Details
Description
List of memory IDs that were summarized
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const summarizeMemory = await client.summarizeMemory.create({ memoryIds: ['01jxanr45haeswhay4n0q8340y', '01jxanr45haeswhay4n0q8341z'], sessionId: '01jxanr45haeswhay4n0q8340y', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(summarizeMemory.summarizedMemoryIds);
from raindrop import Raindrop
client = Raindrop()summarize_memory = client.summarize_memory.create( memory_ids=["01jxanr45haeswhay4n0q8340y", "01jxanr45haeswhay4n0q8341z"], session_id="01jxanr45haeswhay4n0q8340y", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(summarize_memory.summarized_memory_ids)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) summarizeMemory, err := client.SummarizeMemory.New(context.TODO(), raindrop.SummarizeMemoryNewParams{ MemoryIDs: []string{"01jxanr45haeswhay4n0q8340y", "01jxanr45haeswhay4n0q8341z"}, SessionID: "01jxanr45haeswhay4n0q8340y", SmartMemoryLocation: raindrop.SummarizeMemoryNewParamsSmartMemoryLocation{SmartMemory: raindrop.SummarizeMemoryNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", summarizeMemory.SummarizedMemoryIDs)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.summarizememory.SummarizeMemoryCreateParams;import com.raindrop.api.models.summarizememory.SummarizeMemoryCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
SummarizeMemoryCreateParams params = SummarizeMemoryCreateParams.builder() .addMemoryId("01jxanr45haeswhay4n0q8340y") .addMemoryId("01jxanr45haeswhay4n0q8341z") .sessionId("01jxanr45haeswhay4n0q8340y") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); SummarizeMemoryCreateResponse summarizeMemory = client.summarizeMemory().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/summarize_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "session_id": "01jxanr45haeswhay4n0q8340y", "memory_ids": [ "01jxanr45haeswhay4n0q8340y", "01jxanr45haeswhay4n0q8341z" ]}'
Response Examples
{ "summary": "The conversation focused on user interface preferences...", "summarizedMemoryIds": [ "example" ]}
POST /v1/start_session
Starts a new working memory session for an agent. Each session provides isolated memory operations and automatic cleanup capabilities.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
sessionId
(string
)
Details
Description
Unique identifier for the new session
Example
01jxanr45haeswhay4n0q8340y
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const startSession = await client.startSession.create({ smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(startSession.sessionId);
from raindrop import Raindrop
client = Raindrop()start_session = client.start_session.create( smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(start_session.session_id)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) startSession, err := client.StartSession.New(context.TODO(), raindrop.StartSessionNewParams{ SmartMemoryLocation: raindrop.StartSessionNewParamsSmartMemoryLocation{SmartMemory: raindrop.StartSessionNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", startSession.SessionID)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.startsession.StartSessionCreateParams;import com.raindrop.api.models.startsession.StartSessionCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
StartSessionCreateParams params = StartSessionCreateParams.builder() .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); StartSessionCreateResponse startSession = client.startSession().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/start_session" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }}'
Response Examples
{ "sessionId": "01jxanr45haeswhay4n0q8340y"}
POST /v1/end_session
Ends a working memory session, optionally flushing working memory to long-term storage. When flush is enabled, important memories are processed and stored for future retrieval.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
sessionId
(string
) Required
Details
Description
Unique session identifier to end
Example
01jxanr45haeswhay4n0q8340y
flush
(boolean
(nullable))
Details
Description
Whether to flush working memory to long-term storage
Example
true
systemPrompt
(string
(nullable))
Details
Description
Optional custom system prompt for memory summarization during flush
Example
Summarize the key decisions and action items from this session
success
(boolean
)
Details
Description
Indicates whether the session was ended successfully
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const endSession = await client.endSession.create({ sessionId: '01jxanr45haeswhay4n0q8340y', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(endSession.success);
from raindrop import Raindrop
client = Raindrop()end_session = client.end_session.create( session_id="01jxanr45haeswhay4n0q8340y", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(end_session.success)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) endSession, err := client.EndSession.New(context.TODO(), raindrop.EndSessionNewParams{ SessionID: "01jxanr45haeswhay4n0q8340y", SmartMemoryLocation: raindrop.EndSessionNewParamsSmartMemoryLocation{SmartMemory: raindrop.EndSessionNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", endSession.Success)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.endsession.EndSessionCreateParams;import com.raindrop.api.models.endsession.EndSessionCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
EndSessionCreateParams params = EndSessionCreateParams.builder() .sessionId("01jxanr45haeswhay4n0q8340y") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); EndSessionCreateResponse endSession = client.endSession().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/end_session" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "session_id": "01jxanr45haeswhay4n0q8340y"}'
Response Examples
{ "success": true}
POST /v1/rehydrate_session
Rehydrates a previous session from episodic memory storage. Allows resuming work from where a previous session left off by restoring either all memories or just a summary of the previous session.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
sessionId
(string
) Required
Details
Description
Session identifier to restore from episodic memory
Example
01jxanr45haeswhay4n0q8340y
summaryOnly
(boolean
(nullable))
Details
Description
If true, only restore a summary. If false, restore all memories
Example
false
success
(boolean
)
Details
Description
Indicates whether the rehydration was successful
operation
(string
)
Details
Description
Operation status: ‘initiated’ for async processing, ‘failed’ for immediate failure
statusKey
(string
(nullable))
Details
Description
Storage key for checking async operation status (optional)
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const response = await client.rehydrateSession.rehydrate({ sessionId: '01jxanr45haeswhay4n0q8340y', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(response.operation);
from raindrop import Raindrop
client = Raindrop()response = client.rehydrate_session.rehydrate( session_id="01jxanr45haeswhay4n0q8340y", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(response.operation)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.RehydrateSession.Rehydrate(context.TODO(), raindrop.RehydrateSessionRehydrateParams{ SessionID: "01jxanr45haeswhay4n0q8340y", SmartMemoryLocation: raindrop.RehydrateSessionRehydrateParamsSmartMemoryLocation{SmartMemory: raindrop.RehydrateSessionRehydrateParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Operation)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.rehydratesession.RehydrateSessionRehydrateParams;import com.raindrop.api.models.rehydratesession.RehydrateSessionRehydrateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
RehydrateSessionRehydrateParams params = RehydrateSessionRehydrateParams.builder() .sessionId("01jxanr45haeswhay4n0q8340y") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); RehydrateSessionRehydrateResponse response = client.rehydrateSession().rehydrate(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/rehydrate_session" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "session_id": "01jxanr45haeswhay4n0q8340y"}'
Response Examples
{ "success": true, "operation": "example", "statusKey": "example"}
POST /v1/search_episodic_memory
Searches across episodic memory documents stored in the SmartBucket. Allows finding relevant past sessions based on natural language queries. Returns summaries and metadata from stored episodic memory sessions.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
terms
(string
) Required
Details
Description
Natural language search query to find relevant episodic memory sessions
Example
sessions about user interface preferences
nMostRecent
(integer
(nullable))
Details
Description
Maximum number of most recent results to return
Example
10
startTime
(object
(nullable))
Details
Description
Start time for temporal filtering
endTime
(object
(nullable))
Details
Description
End time for temporal filtering
entries
(array
)
Details
Description
List of matching episodic memory entries ordered by relevance
pagination
(object
(nullable))
Details
Description
Pagination information for the search results
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const response = await client.query.episodicMemory.search({ smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } }, terms: 'sessions about user interface preferences',});
console.log(response.entries);
from raindrop import Raindrop
client = Raindrop()response = client.query.episodic_memory.search( smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } }, terms="sessions about user interface preferences",)print(response.entries)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.Query.EpisodicMemory.Search(context.TODO(), raindrop.QueryEpisodicMemorySearchParams{ SmartMemoryLocation: raindrop.QueryEpisodicMemorySearchParamsSmartMemoryLocation{SmartMemory: raindrop.QueryEpisodicMemorySearchParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, Terms: "sessions about user interface preferences", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Entries)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.query.episodicmemory.EpisodicMemorySearchParams;import com.raindrop.api.models.query.episodicmemory.EpisodicMemorySearchResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
EpisodicMemorySearchParams params = EpisodicMemorySearchParams.builder() .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .terms("sessions about user interface preferences") .build(); EpisodicMemorySearchResponse response = client.query().episodicMemory().search(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/search_episodic_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "terms": "sessions about user interface preferences"}'
Response Examples
{ "entries": [ { "sessionId": "01jxanr45haeswhay4n0q8340y", "summary": "User discussed interface preferences and requested dark theme support", "agent": "assistant-v1", "entryCount": 25, "timelineCount": 3, "duration": 1800000, "createdAt": "2025-05-05T18:36:43.029Z", "score": 0.85 } ], "pagination": { "total": 123, "page": 123, "pageSize": 123, "totalPages": 123, "hasMore": true }}
POST /v1/put_procedure
Stores a new procedure in the agent’s procedural memory. Procedures are reusable knowledge artifacts like system prompts, templates, workflows, or instructions that can be retrieved and applied across different sessions and contexts.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
key
(string
) Required
Details
Description
Unique key to identify this procedure
Example
TechnicalReportSystemPrompt
value
(string
) Required
Details
Description
The procedure content (prompt, template, instructions, etc.)
Example
You are a technical documentation assistant...
proceduralMemoryId
(string
(nullable))
Details
Description
Optional procedural memory ID to use for actor isolation
Example
demo-smartmemory
success
(boolean
)
Details
Description
Indicates whether the procedure was stored successfully
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const putProcedure = await client.putProcedure.create({ key: 'TechnicalReportSystemPrompt', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } }, value: 'You are a technical documentation assistant...',});
console.log(putProcedure.success);
from raindrop import Raindrop
client = Raindrop()put_procedure = client.put_procedure.create( key="TechnicalReportSystemPrompt", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } }, value="You are a technical documentation assistant...",)print(put_procedure.success)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) putProcedure, err := client.PutProcedure.New(context.TODO(), raindrop.PutProcedureNewParams{ Key: "TechnicalReportSystemPrompt", SmartMemoryLocation: raindrop.PutProcedureNewParamsSmartMemoryLocation{SmartMemory: raindrop.PutProcedureNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, Value: "You are a technical documentation assistant...", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", putProcedure.Success)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.putprocedure.PutProcedureCreateParams;import com.raindrop.api.models.putprocedure.PutProcedureCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
PutProcedureCreateParams params = PutProcedureCreateParams.builder() .key("TechnicalReportSystemPrompt") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .value("You are a technical documentation assistant...") .build(); PutProcedureCreateResponse putProcedure = client.putProcedure().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/put_procedure" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "key": "TechnicalReportSystemPrompt", "value": "You are a technical documentation assistant..."}'
Response Examples
{ "success": true}
POST /v1/get_procedure
Retrieves a specific procedure by key from procedural memory. Procedures are persistent knowledge artifacts that remain available across all sessions and can be shared between different agent instances.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
key
(string
) Required
Details
Description
Unique key of the procedure to retrieve
Example
TechnicalReportSystemPrompt
proceduralMemoryId
(string
(nullable))
Details
Description
Optional procedural memory ID to use for actor isolation
Example
demo-smartmemory
value
(string
(nullable))
Details
Description
The procedure content, or empty if not found
Example
You are a technical documentation assistant...
found
(boolean
)
Details
Description
Indicates whether the procedure was found
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const getProcedure = await client.getProcedure.create({ key: 'TechnicalReportSystemPrompt', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(getProcedure.found);
from raindrop import Raindrop
client = Raindrop()get_procedure = client.get_procedure.create( key="TechnicalReportSystemPrompt", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(get_procedure.found)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) getProcedure, err := client.GetProcedure.New(context.TODO(), raindrop.GetProcedureNewParams{ Key: "TechnicalReportSystemPrompt", SmartMemoryLocation: raindrop.GetProcedureNewParamsSmartMemoryLocation{SmartMemory: raindrop.GetProcedureNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", getProcedure.Found)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.getprocedure.GetProcedureCreateParams;import com.raindrop.api.models.getprocedure.GetProcedureCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
GetProcedureCreateParams params = GetProcedureCreateParams.builder() .key("TechnicalReportSystemPrompt") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); GetProcedureCreateResponse getProcedure = client.getProcedure().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/get_procedure" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "key": "TechnicalReportSystemPrompt"}'
Response Examples
{ "value": "You are a technical documentation assistant...", "found": true}
POST /v1/delete_procedure
Removes a specific procedure from procedural memory. This operation is permanent and affects all future sessions.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
key
(string
) Required
Details
Description
Unique key of the procedure to delete
Example
TechnicalReportSystemPrompt
proceduralMemoryId
(string
(nullable))
Details
Description
Optional procedural memory ID to use for actor isolation
Example
demo-smartmemory
success
(boolean
)
Details
Description
Indicates whether the procedure was deleted successfully
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const deleteProcedure = await client.deleteProcedure.create({ key: 'TechnicalReportSystemPrompt', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(deleteProcedure.success);
from raindrop import Raindrop
client = Raindrop()delete_procedure = client.delete_procedure.create( key="TechnicalReportSystemPrompt", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(delete_procedure.success)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) deleteProcedure, err := client.DeleteProcedure.New(context.TODO(), raindrop.DeleteProcedureNewParams{ Key: "TechnicalReportSystemPrompt", SmartMemoryLocation: raindrop.DeleteProcedureNewParamsSmartMemoryLocation{SmartMemory: raindrop.DeleteProcedureNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", deleteProcedure.Success)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.deleteprocedure.DeleteProcedureCreateParams;import com.raindrop.api.models.deleteprocedure.DeleteProcedureCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
DeleteProcedureCreateParams params = DeleteProcedureCreateParams.builder() .key("TechnicalReportSystemPrompt") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); DeleteProcedureCreateResponse deleteProcedure = client.deleteProcedure().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/delete_procedure" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "key": "TechnicalReportSystemPrompt"}'
Response Examples
{ "success": true}
POST /v1/list_procedures
Lists all procedures stored in procedural memory. Returns metadata about each procedure including creation and modification times.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
proceduralMemoryId
(string
(nullable))
Details
Description
Optional procedural memory ID to use for actor isolation
Example
demo-smartmemory
procedures
(array
)
Details
Description
List of all stored procedures
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const listProcedure = await client.listProcedures.create({ smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(listProcedure.procedures);
from raindrop import Raindrop
client = Raindrop()list_procedure = client.list_procedures.create( smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(list_procedure.procedures)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) listProcedure, err := client.ListProcedures.New(context.TODO(), raindrop.ListProcedureNewParams{ SmartMemoryLocation: raindrop.ListProcedureNewParamsSmartMemoryLocation{SmartMemory: raindrop.ListProcedureNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", listProcedure.Procedures)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.listprocedures.ListProcedureCreateParams;import com.raindrop.api.models.listprocedures.ListProcedureCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
ListProcedureCreateParams params = ListProcedureCreateParams.builder() .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); ListProcedureCreateResponse listProcedure = client.listProcedures().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/list_procedures" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }}'
Response Examples
{ "procedures": [ { "key": "TechnicalReportSystemPrompt", "value": "You are a technical documentation assistant...", "createdAt": "2025-05-05T18:36:43.029Z", "updatedAt": "2025-05-05T18:36:43.029Z" } ]}
POST /v1/search_procedures
Searches procedures using text matching across keys and values. Supports filtering by procedure keys, values, or both with fuzzy matching and relevance scoring.
TODO: Future enhancement will include vector search for semantic similarity.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
terms
(string
) Required
Details
Description
Search terms to match against procedure keys and values
Example
system prompt
nMostRecent
(integer
(nullable))
Details
Description
Maximum number of results to return
Example
10
searchKeys
(boolean
(nullable))
Details
Description
Whether to search in procedure keys
Example
true
searchValues
(boolean
(nullable))
Details
Description
Whether to search in procedure values
Example
true
proceduralMemoryId
(string
(nullable))
Details
Description
Optional procedural memory ID to use for actor isolation
Example
demo-smartmemory
procedures
(array
)
Details
Description
List of matching procedures ordered by relevance
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const response = await client.query.procedures.search({ smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } }, terms: 'system prompt',});
console.log(response.procedures);
from raindrop import Raindrop
client = Raindrop()response = client.query.procedures.search( smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } }, terms="system prompt",)print(response.procedures)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.Query.Procedures.Search(context.TODO(), raindrop.QueryProcedureSearchParams{ SmartMemoryLocation: raindrop.QueryProcedureSearchParamsSmartMemoryLocation{SmartMemory: raindrop.QueryProcedureSearchParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, Terms: "system prompt", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Procedures)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.query.procedures.ProcedureSearchParams;import com.raindrop.api.models.query.procedures.ProcedureSearchResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
ProcedureSearchParams params = ProcedureSearchParams.builder() .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .terms("system prompt") .build(); ProcedureSearchResponse response = client.query().procedures().search(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/search_procedures" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "terms": "system prompt"}'
Response Examples
{ "procedures": [ { "key": "TechnicalReportSystemPrompt", "value": "You are a technical documentation assistant...", "createdAt": "2025-05-05T18:36:43.029Z", "updatedAt": "2025-05-05T18:36:43.029Z" } ]}
POST /v1/put_semantic_memory
Stores a semantic memory document for long-term knowledge retrieval. Semantic memory is used for storing structured knowledge, facts, and information that can be searched and retrieved across different sessions.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
document
(string
) Required
Details
Description
JSON-encoded document content to store in semantic memory
Example
{ "title": "AI Best Practices", "content": "...", "category": "development"}
success
(boolean
)
Details
Description
Indicates whether the document was stored successfully
objectId
(string
(nullable))
Details
Description
Unique object identifier for the stored document
Example
01jxanr45haeswhay4n0q8340y
error
(string
(nullable))
Details
Description
Error message if the operation failed
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const putSemanticMemory = await client.putSemanticMemory.create({ document: 'document', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(putSemanticMemory.error);
from raindrop import Raindrop
client = Raindrop()put_semantic_memory = client.put_semantic_memory.create( document="document", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(put_semantic_memory.error)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) putSemanticMemory, err := client.PutSemanticMemory.New(context.TODO(), raindrop.PutSemanticMemoryNewParams{ Document: "document", SmartMemoryLocation: raindrop.PutSemanticMemoryNewParamsSmartMemoryLocation{SmartMemory: raindrop.PutSemanticMemoryNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", putSemanticMemory.Error)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.putsemanticmemory.PutSemanticMemoryCreateParams;import com.raindrop.api.models.putsemanticmemory.PutSemanticMemoryCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
PutSemanticMemoryCreateParams params = PutSemanticMemoryCreateParams.builder() .document("document") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); PutSemanticMemoryCreateResponse putSemanticMemory = client.putSemanticMemory().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/put_semantic_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "document": { "title": "AI Best Practices", "content": "...", "category": "development" }}'
Response Examples
{ "success": true, "objectId": "01jxanr45haeswhay4n0q8340y", "error": "example"}
POST /v1/get_semantic_memory
Retrieves a specific semantic memory document by its object ID. Returns the complete document with all its stored properties and metadata.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
objectId
(string
) Required
Details
Description
Unique object identifier of the document to retrieve
Example
01jxanr45haeswhay4n0q8340y
success
(boolean
)
Details
Description
Indicates whether the document was retrieved successfully
document
(string
(nullable))
Details
Description
JSON-encoded document content if found
Example
{ "title": "AI Best Practices", "content": "...", "category": "development"}
error
(string
(nullable))
Details
Description
Error message if the operation failed
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const getSemanticMemory = await client.getSemanticMemory.create({ objectId: '01jxanr45haeswhay4n0q8340y', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(getSemanticMemory.document);
from raindrop import Raindrop
client = Raindrop()get_semantic_memory = client.get_semantic_memory.create( object_id="01jxanr45haeswhay4n0q8340y", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(get_semantic_memory.document)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) getSemanticMemory, err := client.GetSemanticMemory.New(context.TODO(), raindrop.GetSemanticMemoryNewParams{ ObjectID: "01jxanr45haeswhay4n0q8340y", SmartMemoryLocation: raindrop.GetSemanticMemoryNewParamsSmartMemoryLocation{SmartMemory: raindrop.GetSemanticMemoryNewParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", getSemanticMemory.Document)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.getsemanticmemory.GetSemanticMemoryCreateParams;import com.raindrop.api.models.getsemanticmemory.GetSemanticMemoryCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
GetSemanticMemoryCreateParams params = GetSemanticMemoryCreateParams.builder() .objectId("01jxanr45haeswhay4n0q8340y") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); GetSemanticMemoryCreateResponse getSemanticMemory = client.getSemanticMemory().create(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/get_semantic_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "object_id": "01jxanr45haeswhay4n0q8340y"}'
Response Examples
{ "success": true, "document": { "title": "AI Best Practices", "content": "...", "category": "development" }, "error": "example"}
POST /v1/search_semantic_memory
Searches across semantic memory documents using natural language queries. Uses vector embeddings and semantic similarity to find relevant knowledge documents regardless of exact keyword matches.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
needle
(string
) Required
Details
Description
Natural language search query to find relevant documents
Example
AI development best practices
success
(boolean
)
Details
Description
Indicates whether the search was performed successfully
documentSearchResponse
(object
(nullable))
Details
Description
Search results with matching documents
error
(string
(nullable))
Details
Description
Error message if the search failed
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const response = await client.query.semanticMemory.search({ needle: 'AI development best practices', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(response.documentSearchResponse);
from raindrop import Raindrop
client = Raindrop()response = client.query.semantic_memory.search( needle="AI development best practices", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(response.document_search_response)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.Query.SemanticMemory.Search(context.TODO(), raindrop.QuerySemanticMemorySearchParams{ Needle: "AI development best practices", SmartMemoryLocation: raindrop.QuerySemanticMemorySearchParamsSmartMemoryLocation{SmartMemory: raindrop.QuerySemanticMemorySearchParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.DocumentSearchResponse)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.query.semanticmemory.SemanticMemorySearchParams;import com.raindrop.api.models.query.semanticmemory.SemanticMemorySearchResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
SemanticMemorySearchParams params = SemanticMemorySearchParams.builder() .needle("AI development best practices") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); SemanticMemorySearchResponse response = client.query().semanticMemory().search(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/search_semantic_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "needle": "AI development best practices"}'
Response Examples
{ "success": true, "documentSearchResponse": { "results": [ { "chunkSignature": "example", "text": "example", "source": "example", "payloadSignature": "example", "score": 0.85, "embed": "example", "type": "example" } ] }, "error": "example"}
POST /v1/delete_semantic_memory
Removes a specific semantic memory document by its object ID. This operation permanently deletes the document and is irreversible.
Schema Reference
Request Body
smartMemoryLocation
(object
) Required
Details
Description
Smart memory locator for targeting the correct smart memory instance
Example
{ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" }}
objectId
(string
) Required
Details
Description
Unique object identifier of the document to delete
Example
01jxanr45haeswhay4n0q8340y
success
(boolean
)
Details
Description
Indicates whether the document was deleted successfully
error
(string
(nullable))
Details
Description
Error message if the operation failed
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const deleteSemanticMemory = await client.deleteSemanticMemory.delete({ objectId: '01jxanr45haeswhay4n0q8340y', smartMemoryLocation: { smart_memory: { name: 'memory-name', application_name: 'demo', version: '1234' } },});
console.log(deleteSemanticMemory.error);
from raindrop import Raindrop
client = Raindrop()delete_semantic_memory = client.delete_semantic_memory.delete( object_id="01jxanr45haeswhay4n0q8340y", smart_memory_location={ "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234", } },)print(delete_semantic_memory.error)
package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) deleteSemanticMemory, err := client.DeleteSemanticMemory.Delete(context.TODO(), raindrop.DeleteSemanticMemoryDeleteParams{ ObjectID: "01jxanr45haeswhay4n0q8340y", SmartMemoryLocation: raindrop.DeleteSemanticMemoryDeleteParamsSmartMemoryLocation{SmartMemory: raindrop.DeleteSemanticMemoryDeleteParamsSmartMemoryLocationSmartMemory{Name: "memory-name", ApplicationName: raindrop.String("my-app"), Version: raindrop.String("1234")}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", deleteSemanticMemory.Error)}
package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.deletesemanticmemory.DeleteSemanticMemoryDeleteParams;import com.raindrop.api.models.deletesemanticmemory.DeleteSemanticMemoryDeleteResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
DeleteSemanticMemoryDeleteParams params = DeleteSemanticMemoryDeleteParams.builder() .objectId("01jxanr45haeswhay4n0q8340y") .smartMemoryLocation(JsonValue.from(Map.of( "smart_memory", Map.of( "name", "memory-name", "application_name", "demo", "version", "1234" ) ))) .build(); DeleteSemanticMemoryDeleteResponse deleteSemanticMemory = client.deleteSemanticMemory().delete(params); }}
# coming soon
curl -X POST "https://api.raindrop.run/v1/delete_semantic_memory" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "smart_memory_location": { "smart_memory": { "name": "memory-name", "application_name": "demo", "version": "1234" } }, "object_id": "01jxanr45haeswhay4n0q8340y"}'
Response Examples
{ "success": true, "error": "example"}