Skip to content

[api-sync] Java 2.0.0 adds memory, file, knowledge base and note operations - #40

Merged
twindebank merged 2 commits into
mainfrom
api-sync/full-8572e0700a86
Nov 27, 2026
Merged

twindebank merged 2 commits into
mainfrom
api-sync/full-8572e0700a86

Conversation

@twindebank

@twindebank twindebank commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Updates the Java SDK from 1.0.2 to 2.0.0 for API version 3e9c6fa0a27454d8d5300c42e4215c475c3954b085dae9901f429d0c531e50f3. Includes the customer memory support from #34.

Migrating to 2.0.0

Area Changes for callers
Participants and attachments Replace ParticipantType.HUMAN with AGENT. Use AttachmentType.FILE for documents, video and audio.
Conversations Remove metadata from conversation-start and message requests. Conversation responses omit metadata. Message responses omit metadata, conversation ID, subject and conversation token. Use supportPlatform when reading a conversation. The includeMessages option is gone.
Tools Supply a name, description and HTTP, webhook, async or draft configuration on creation. Read the assigned ID from the response. Use parameter definitions and parameter sets to describe inputs. Tool responses omit the old schema and creation and update timestamps. Tool updates accept a partial definition and cannot rename a tool.
Memory and arbitrary JSON Supply a custom type on the deprecated v1 memory builder. For new batches use batchCreateCustomerMemoriesV2. Memory data, article and topic data, task input and async tool results accept any JSON value. Topic.getData() returns the decoded bytes.
Pagination File and note lists expose the next cursor. Procedure lists expose both cursors.
Resources and secrets Use ResourceSourceSchemaUpdate to send a raw JSON schema. Use SecretRefreshRequest to configure an HTTP refresh, with SecretRefreshRetry for the timeout per attempt.
Responses Procedure responses omit author details. Back-office task attachments expose their download URL.
Webhooks Handle resource fetches through action.execute. The legacy resource.pull helpers are deprecated.

New operations

  • List customer memories and create memory batches. These operations are experimental.
  • Begin uploads, create files and list files.
  • List, create, read and update knowledge bases.
  • List and read notes.
  • Read conversations with readConversation. The older route remains available as readConversationDeprecated.
  • Read a tool version with readTool(String, Long).
  • Handle conversation.start and back-office task completion, failure and hand-off events. Unknown webhook types retain their raw JSON payload.

Requests use the configured base URL, encode path and query parameters, and send timestamps as RFC 3339 strings. Tool and terminology lists now read the returned lists, and setting a procedure limit returns the updated procedure. Topic reads accept an omitted support platform. Traffic group target creation and resource source schema updates accept the path ID as a separate argument.

Verification

The client methods match all 88 customer API operations by HTTP method and path. Both Maven modules passed mvn --no-transfer-progress clean verify with 46 tests and zero failures.

Brings the client in line with public API contract
3e9c6fa0a27454d8d5300c42e4215c475c3954b085dae9901f429d0c531e50f3 and records it in
PUBLIC_API_VERSION.

New operations: customer memories (list, batch create v2, deprecated v1 batch
create), files (begin upload, create, list), knowledge bases (list, create, read,
update), notes (list, read), the conversation read endpoint, and reading a given
tool version. New webhook events: conversation.start and the three back-office
task events; unknown event types now come back as UNKNOWN instead of throwing.

Fixes on main: requests now go to the configured base URL, query parameters are
sent and encoded, readConversation uses the /read endpoint, the tool and
terminology substitution lists read their wrapped responses, deleting a hand-off
target sends its ID as a query parameter, timestamps are sent as RFC 3339
strings, participant types use the API's values, unknown response fields no
longer fail parsing, and conversation.hand_off webhooks parse again.

Carries over the customer memories batch-create work from #34.
@twindebank
twindebank force-pushed the api-sync/full-8572e0700a86 branch from 98c6b90 to 87ebf15 Compare November 27, 2026 10:47
@twindebank twindebank changed the title [api-sync full] gradientlabs-java: sync to the public API [api-sync] Java 2.0.0 adds memory, file, knowledge base and note operations Nov 27, 2026
@twindebank
twindebank marked this pull request as ready for review November 27, 2026 11:21
@twindebank
twindebank requested a review from a team November 27, 2026 11:21
@twindebank
twindebank merged commit ec85c6e into main Nov 27, 2026
1 check passed
@twindebank
twindebank deleted the api-sync/full-8572e0700a86 branch November 27, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants