From 747995416d62ef2dd48040045abbc99f0f36cb28 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Sun, 4 Aug 2024 07:14:34 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/readme.md b/readme.md index 890e83d..f2e2763 100644 --- a/readme.md +++ b/readme.md @@ -17,6 +17,7 @@ - [Intro](#intro) - [Install](#install) + - [Optimized Imports](#optimized-imports) - [AI SDKs](#ai-sdks) - [Vercel AI SDk](#vercel-ai-sdk) - [LangChain](#langchain) @@ -24,7 +25,6 @@ - [Firebase Genkit](#firebase-genkit) - [Dexa Dexter](#dexa-dexter) - [OpenAI SDK](#openai-sdk) - - [Optimized Imports](#optimized-imports) - [Services](#services) - [Client Design Philosophy](#client-design-philosophy) - [TODO](#todo) @@ -128,9 +128,24 @@ npm install @agentic/stdlib @agentic/core zod This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) and requires `Node.js >= 18` or an equivalent environment (bun, deno, CF workers, etc). +### Optimized Imports + +`@agentic/stdlib` is just a convenience package which re-exports all of the built-in AI tool packages. If you want to optimize your imports, you can replace `@agentic/stdlib` with the specific AI tools you want. For example: + +```sh +npm install @agentic/weather @agentic/core zod +``` + +```ts +import { WeatherClient } from '@agentic/weather' +``` + +> [!NOTE] +> There is no functional difference between using `@agentic/stdlib` versus using the individual packages directly. The only difference is if you want to optimize your install size (when running on serverless functions, for instance), in which case installing and using the individual packages directly will be more efficient. The default examples use `@agentic/stdlib` because it provides a simpler DX. + ### AI SDKs -Each AI SDK adapter has its own package which needs to be installed. +To use Agentic with one of the supported AI SDKs, you'll also need to install its (_really lightweight_) adapter package. #### Vercel AI SDk @@ -265,21 +280,6 @@ See [examples/openai](./examples/openai) for a full example. -### Optimized Imports - -`@agentic/stdlib` is just a convenience wrapper which re-exports all of the built-in AI tool packages. If you want to optimize your imports, you can replace `@agentic/stdlib` with the specific AI tools you want. For example: - -```sh -npm install @agentic/weather @agentic/core zod -``` - -```ts -import { WeatherClient } from '@agentic/weather' -``` - -> [!NOTE] -> There is no functional difference between using `@agentic/stdlib` versus using the individual packages directly. The only difference is if you want to optimize your install size (when running on serverless functions, for instance), in which case installing and using the individual packages directly will be more efficient. The default examples use `@agentic/stdlib` because it provides a simpler DX. - ## Services | Service | Package | Named export | Description |