@effect-uai/core
Low-level primitives for building AI agents with Effect.
The core thesis: the user owns the loop. State is a plain record;
Loop events control iteration; the body is a Stream. There is no
agent runtime, no orchestrator, no provider lock-in.
Capabilities
Each is a service tag that provider packages implement, so switching provider is swapping a Layer:
- Language models -
LanguageModel, withLoop,Items,Turn,Tool,ToolkitandStructuredFormat - Speech -
Transcriber(file and streaming STT),SpeechSynthesizer(finished and incremental TTS) - Realtime -
RealtimeSession: a live conversation with a realtime model, voice both ways and camera frames where the provider takes them - Embeddings and retrieval -
EmbeddingModel,Reranker,Chunker,Tokenizer - Images and music -
ImageGenerator,MusicGenerator - Web -
WebSearch,WebRead,DeepResearch,Browser - Runtime -
Sandboxfor running model-written code - Messaging -
Messenger: the agent as a Telegram, Discord or Slack bot
Plus the pieces underneath: AiError (typed failures across every
capability), streaming codecs (SSE, JSONL, Lines), Settle for
acting on a pause in a stream of arrivals, Metrics, and a mock layer
per capability under testing/.
No provider deps. Pair with one or more provider packages:
@effect-uai/openai,
@effect-uai/anthropic,
@effect-uai/google,
@effect-uai/mistral
and the rest.
Install
pnpm add @effect-uai/core effect
ESM-only. Requires effect@>=4.0.1 (Effect 4.0 stable) as a peer.
Docs
Full docs: https://effect-uai.com
Start with One turn is a stream and then Basic usage.
License
MIT