Libraries

HttpApi AI

An Effect AI toolkit generator that exposes selected HttpApi operations as typed dynamic tools backed by the generated API client.

Install
Add this registry item to your app with shadcn.
bash
bunx --bun shadcn@latest add https://krakstack.net/r/httpapi-ai.json

Overview

httpapi-ai turns operations selected by HttpApiSpec into Effect AI dynamic tools. Read operations run without approval by default, writes require approval, and standard read-only, destructive, idempotent, and open-world annotations are derived from each HTTP method.

Usage

Provide HttpApiSpec and ApiClient, then create or layer the toolkit:

typescript
const httpApiAiLayer = HttpApiAi.layer({ needsApproval: (operation) => operation.method !== "get", }).pipe( Layer.provide(HttpApiSpec.layer({ api: AppApi })), Layer.provide(apiClientLayer), );
Dependencies
Packages and shadcn components required by this registry item.

Dependencies

Registry Dependencies