# ai-effect ## Docs - [Introduction](https://ai-effect.fdarian.com/): ai-effect wraps the Vercel AI SDK so its functions return Effects. - [Setup](https://ai-effect.fdarian.com/setup): Provide Ai.layer once at the edge of your app. ## Core - [Generating text](https://ai-effect.fdarian.com/core/generating-text): generateText and streamText as Effects, streaming with Effect Streams, and how cancellation works. - [Tools](https://ai-effect.fdarian.com/core/tools): Define AI SDK tools whose execute is an Effect. - [Agents](https://ai-effect.fdarian.com/core/agents): ToolLoopAgent.make, an AI SDK agent whose callbacks, tools and calls are Effects. - [UI message streams](https://ai-effect.fdarian.com/core/ui-streams): Stream UI messages to a chat client, as Effect Streams you can compose and return as an HTTP response. - [Embeddings](https://ai-effect.fdarian.com/core/embeddings): embed and embedMany as Effects. - [Reranking](https://ai-effect.fdarian.com/core/reranking): rerank as an Effect. ## Concepts - [Schemas](https://ai-effect.fdarian.com/concepts/schemas): Use Effect Schemas for structured output with effectSchema. - [Errors](https://ai-effect.fdarian.com/concepts/errors): The AiError type, its seven reasons, and how to handle and retry them. ## Observability - [Tracing](https://ai-effect.fdarian.com/observability/tracing): The Effect spans every ai-effect call records, and how to see them. - [OpenTelemetry](https://ai-effect.fdarian.com/observability/opentelemetry): Export ai-effect spans to OpenTelemetry and nest the AI SDK's own spans under them. ## Resources - [Changelog](https://ai-effect.fdarian.com/changelog): Release history ## Agent skills - [ai-effect](https://ai-effect.fdarian.com/.well-known/agent-skills/ai-effect/SKILL.md): Read the ai-effect docs instead of answering from memory. Use when a task involves ai-effect: how it works, how to set it up or configure it, or its API. ## Agent resources - [llms-full.txt](https://ai-effect.fdarian.com/llms-full.txt): The full Markdown of every page in one file. - [Page Markdown](https://ai-effect.fdarian.com/index.md): Append `.md` to any page URL to fetch that page as raw Markdown. - [JSON API](https://ai-effect.fdarian.com/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://ai-effect.fdarian.com/openapi.json. - [Agent skills](https://ai-effect.fdarian.com/.well-known/agent-skills/index.json): Agent Skills discovery index of the skills this site publishes. - [API catalog](https://ai-effect.fdarian.com/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here. - [AI catalog](https://ai-effect.fdarian.com/.well-known/ai-catalog.json): ARD manifest of the agent-facing resources on this site (MCP server, skills, APIs). - [agent-readability.json](https://ai-effect.fdarian.com/agent-readability.json): Manifest of every agent-facing artifact on this site. - [Sitemap](https://ai-effect.fdarian.com/sitemap.xml): Every indexable page URL with its last-modified date.