SDK
Introduction to the SDK
An overview of the Agentsmith TypeScript SDK for integrating prompts into your application.
The Agentsmith SDK is a TypeScript library designed for reliability, and ease of use. It utilizes the agentsmith folder to enforce type safety and versioning when compiling and executing prompts.
Key Features
- Type Safety: The SDK uses generated TypeScript types from your prompt definitions, ensuring you use the correct variables and preventing runtime errors.
- File-Native: It's designed to read prompts directly from the files in your local repository, limiting network requests to the cloud.
- Flexible Fetching: While it prioritizes local files, the SDK can fall back to fetching from the Agentsmith API, ensuring your application can always get the latest prompts.
- DX: The SDK provides easy shortcuts for common use-cases such as streaming or logging completions to local files.
- Detailed Observability: Every execution is logged, providing a
logUuid
that you can use to trace and debug prompt behavior in the Studio.
Ready to dive in?
Check out the Basic Usage guide to get the SDK up and running in minutes.