effect-ai-language-model

Generate type-safe text, streamed responses, and schema-validated outputs from Effect AI LanguageModel.

22|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-ai-language-model-mpsuesser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-ai-language-model
Source: https://github.com/mpsuesser/pi-effect-harness/tree/main/harnesses/effect/skills/effect-ai-language-model
Command: npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-ai-language-model-mpsuesser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Effect AI LanguageModel skills remove the friction of writing LLM integrations by giving a consistent, type-safe way to generate text, stream responses, validate structured output, and coordinate tool calling.

Core Features & Use Cases

  • Text generation: Produce completions from prompts (optionally with conversation history).
  • Structured output: Force schema-validated results using Effect's Schema support.
  • Streaming: Handle incremental output via Stream parts for real-time UIs.
  • Tool calling: Integrate with Toolkits to let models request tool invocations and consume tool results.
  • Error handling: Catch and branch on AiError tags instead of ad-hoc promise handling.

Quick Start

Use this skill to generate structured JSON by calling LanguageModel.generateObject with your Schema and a clear prompt describing the data you want extracted.

Frequently Asked Questions about effect-ai-language-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate structured output from an LLM using Effect-TS?

You generate structured output by calling LanguageModel.generateObject with an Effect Schema, which enforces schema validation and returns type-safe, predictable JSON objects.

Can I stream text responses with the Effect AI LanguageModel service?

Yes, you can stream text responses using LanguageModel.streamText, processing incremental output via StreamPart objects to support real-time UI updates and chat-style interactions.

How does tool calling work in Effect-TS language model workflows?

Tool calling in Effect-TS integrates with Toolkits to let models request tool invocations and consume tool results, allowing the language model to execute external functions during multi-turn prompting.

What is the best way to handle AI errors in Effect-TS instead of ad-hoc promises?

The best way to handle AI errors in Effect-TS is using robust AiError-based error handling, which allows you to catch and branch on specific AiError tags instead of relying on ad-hoc promise handling.

Does schema validation support truncation handling for extracted data?

Yes, schema validation supports extraction and transform tasks that require predictable shapes and truncation handling, ensuring generated objects conform to your defined Schema constraints.