feat: Update SDK API to use Agent and Conversation aliases with explicit workspace creation #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the TypeScript SDK to provide a cleaner, more intuitive API that aligns closely with the Python SDK architecture. The changes introduce user-friendly aliases and require explicit workspace creation, making the API more consistent and easier to use.
Changes Made
1. User-Friendly Type Aliases
Agenttype alias forAgentBaseto provide a cleaner user-facing APIConversationconst alias forRemoteConversationfor consistency with Python SDKsrc/index.tsto include both new aliases2. Explicit Workspace Creation
RemoteConversation.create()andRemoteConversation.load()methods to require aRemoteWorkspaceparameterConversationManagermethods to createRemoteWorkspaceinstances explicitly3. Updated Examples and Documentation
RemoteWorkspaceinstances4. API Pattern Changes
Before:
After:
Backward Compatibility
RemoteConversation,AgentBase) are maintainedTesting
Benefits
AgentandConversationare more intuitive thanAgentBaseandRemoteConversationThis change makes the TypeScript SDK more approachable for developers familiar with the Python SDK while maintaining full backward compatibility.
@rbren can click here to continue refining the PR