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
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 various search methods with optional filters:Search Methods
SearchMethodChunkVectorSearch- Semantic search on memo chunks for detailed content searchSearchMethodTitleContains- Case-insensitive substring match on memo titlesSearchMethodTitleStartsWith- Case-insensitive prefix match on memo titles
Search Parameters
Query(string, required) - The search querySearchMethod(SearchMethod, required) - One of the search methods aboveLimit(*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 when using semantic search (SearchMethodChunkVectorSearch). The closer to 0 the more related the content is to the query.nilif usingSearchMethodTitleContainsorSearchMethodTitleStartsWith.
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 askfilters([]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 answer with inline citations in format[[N]]IntermediateSteps([]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
Generate Documents
Generate documents based on prompts and retrieved context from your knowledge base. Similar to chat but optimized for document generation with optional style/format rules.Non-Streaming Document Generation
Streaming Document Generation
For real-time document generation, use streaming:Generate Document Parameters
prompt(string, required) - The prompt describing what document to generaterules(*string, optional) - Optional style/format rules (e.g., “Use formal language. Include sections: X, Y, Z”)filters([]Filter, optional) - Array of filter objects to control which memos are used for generation (see Filters section below)
Generate Document Response
Non-streaming responses include:OK(bool) - Success statusResponse(string) - The generated document with inline citations in format[[N]]IntermediateSteps([]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(), GenerateDoc(), 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)