Skip to content

Swift SDK: threads (threaded conversations) (TS participant SDK parity) #1150

Description

@willwashburn

What the TS participant SDK provides

AgentRelay.threads (packages/sdk/src/agent-relay.ts) exposes the RelayMessaging['threads'] surface (packages/sdk/src/messaging/types.ts, readonly threads):

  • get(messageId, options?): Promise<RelayThread> — fetch a threaded conversation and its replies.
  • reply(input): Promise<RelayMessage> — post a reply into a thread.

What the Swift AgentRelaySDK lacks

The Swift AgentClient (AgentRelayClient.swift) has no thread surface. It can post/dm and stream events, but there is no way to fetch a thread or post a threaded reply to a specific parent message.

Proposed Swift API sketch

public struct RelayThread: Decodable, Sendable { /* root + replies */ }

extension AgentClient {
    public func thread(_ messageId: String, limit: Int? = nil) async throws -> RelayThread
    public func reply(to messageId: String, message: String) async throws -> RelayMessage
}

Part of bringing the Swift AgentRelaySDK to parity with the TS participant SDK (follow-up to #1143 / #1147).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions