Installation
Requirements
- Go 1.18 or higher
Usage
Initialize the client
Memo Management
Create a Memo
Create a new memo that will be automatically processed (summarized, tagged, chunked, and indexed for search):Title(string, max 255 chars) - The title of the memoContent(string) - The full content of the memo
Metadata(map[string]interface) - Custom JSON metadataReferenceID(*string, max 255 chars) - An ID from your side that you can use to match Skald memo UUIDs with e.g. documents on your endTags([]string) - Tags for categorizationSource(*string, max 255 chars) - An indication from your side of the source of this content, useful when building integrationsExpirationDate(*time.Time) - Timestamp for automatic memo expiration
Create a Memo from File
Upload a document file to create a memo. Supported formats include PDF, DOC, DOCX, and PPTX (max 100MB):filePath(string, required) - Path to the file to uploadmemoData(*MemoFileData, optional) - Optional metadata for the memo
Title(*string, max 255 chars) - The title of the memoSource(*string, max 255 chars) - Source identifierReferenceID(*string, max 255 chars) - Your external reference IDTags([]string) - Tags for categorizationMetadata(map[string]interface) - Custom JSON metadataExpirationDate(*time.Time) - Timestamp for automatic memo expiration
CheckMemoStatus() to monitor processing status.
Check Memo Processing Status
Monitor the processing status of a memo, especially useful after uploading files:MemoStatusProcessing- The memo is currently being processedMemoStatusProcessed- The memo has been successfully processed and is readyMemoStatusError- Processing failed (checkErrorReasonfield for details)
Get a Memo
Retrieve a memo by its UUID or your reference ID:GetMemo() method returns complete memo details including content, AI-generated summary, tags, and content chunks.
List Memos
List all memos with pagination:Page(*int, optional) - Page number (default: 1)PageSize(*int, optional) - Results per page (default: 20, max: 100)
Update a Memo
Update an existing memo by UUID or reference ID:Content field, the memo will be automatically reprocessed (summary, tags, and chunks regenerated).
Updatable Fields:
Title(*string)Content(*string)Metadata(map[string]interface)ClientReferenceID(*string)Source(*string)ExpirationDate(*time.Time)
Delete a Memo
Permanently delete a memo and all associated data:Search Memos
Search through your memos using semantic search with optional filters:Search Parameters
Query(string, required) - The search queryLimit(*int, optional) - Maximum results to return (1-50, default 10)Filters([]Filter, optional) - Array of filter objects to narrow results (see Filters section below)
Search Response
UUID- Unique identifier for the memoTitle- Memo titleSummary- Auto-generated summary for the memoContentSnippet- A snippet containing the beginning of the memoDistance- A decimal from 0 to 2 determining how close the result was deemed to be to the query.
Chat with Your Knowledge Base
Ask questions about your memos using an AI agent. The agent retrieves relevant context and generates answers with inline citations.Non-Streaming Chat
Streaming Chat
For real-time responses, use streaming chat:Chat Parameters
query(string, required) - The question to asksystem_prompt(string, optional) - A system prompt to guide the chat agent’s behaviorfilters([]Filter, optional) - Array of filter objects to focus chat context on specific sources (see Filters section below)
Chat Response
Non-streaming responses include:OK(bool) - Success statusResponse(string) - The AI’s answerIntermediateSteps([]interface) - Steps taken by the agent (for debugging)
{ Type: "token", Content: *string }- Each text token as it’s generated{ Type: "done" }- Indicates the stream has finished
Filters
Filters allow you to narrow down results based on memo metadata. You can filter by native fields or custom metadata fields. Filters are supported inSearch(), Chat(), and their streaming variants.
See Filters for complete documentation.
Filter Structure
Native Fields
Native fields are built-in memo properties:title- Memo titlesource- Source system (e.g., “notion”, “confluence”)client_reference_id- Your external reference IDtags- Memo tags (array)
Custom Metadata Fields
You can filter on any field from theMetadata map you provided when creating the memo.
Filter Operators
FilterOperatorEq- Equals (exact match)FilterOperatorNeq- Not equalsFilterOperatorContains- Contains substring (case-insensitive)FilterOperatorStartsWith- Starts with prefix (case-insensitive)FilterOperatorEndsWith- Ends with suffix (case-insensitive)FilterOperatorIn- Value is in array (requires array value)FilterOperatorNotIn- Value is not in array (requires array value)