@effect-uai/core
v0.3.0
Published
Low-level primitives (loop, conversation, items, tools, streaming codecs) for building AI agents with Effect.
Readme
@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.
This package exposes:
- Domain types -
Items,Turn,AiError - Provider contract -
LanguageModel - Loop primitive -
Loop(loop,loopWithState,value,next,stop,nextAfter,nextAfterFold,onTurnComplete) - Tools -
Tool,Toolkit,Outcome,ToolEvent,Resolvers,HistoryCheck - Streaming codecs -
SSE,JSONL,Lines - Structured output -
StructuredFormat - Observability -
Metrics - Testing -
testing/MockProvider
No provider deps. Pair with one of:
@effect-uai/responses- OpenAI Responses API@effect-uai/anthropic- Anthropic Messages@effect-uai/google- Google Gemini
Install
pnpm add @effect-uai/core effectESM-only. Requires [email protected] as a peer.
Docs
Full docs: https://effect-uai.betalyra.com
Start with One turn is a stream and then Basic usage.
License
MIT
