Concepts

SDK Design

Principles for designing development kits that are intuitive, consistent, and facilitate service integration across multiple programming languages.

seed#sdk#api#design#developer-experience#libraries#integration

What it is

An SDK (Software Development Kit) is a library that abstracts the complexity of interacting with a service, providing an idiomatic interface in the developer's language. A good SDK makes integration feel natural.

Design principles

  • Idiomatic: follow target language conventions
  • Consistent: predictable patterns across methods
  • Typed: leverage the language's type system
  • Documented: examples for each operation
  • Versioned: semver, backward compatibility

SDK layers

LayerResponsibilityExample
HTTP clientAPI communicationfetch, axios, httpx
SerializationJSON ↔ language objectsZod, Pydantic, Jackson
AuthenticationToken/key managementOAuth refresh, API key headers
Retry/Error handlingRetries and typed errorsExponential backoff, error codes
Public interfaceMethods the developer usesclient.users.list()

Automatic generation

ToolInputOutputTradeoff
OpenAPI GeneratorOpenAPI specMulti-language SDKsGeneric code, not idiomatic
SmithySmithy modelAWS-style SDKsMore control, more setup
StainlessOpenAPI specIdiomatic SDKsCommercial, high quality

Why it matters

A well-designed SDK multiplies your API's adoption. It reduces integration friction, handles errors idiomatically, and provides types that guide the developer. A poorly designed SDK generates support tickets and frustration.

References

Concepts