langfn
v0.0.1
Published
Comprehensive AI Development SDK for LLM-based workflows
Maintainers
Readme
LangFn (TypeScript)
Comprehensive AI Development SDK for LLM-based workflows.
Features
- Model Abstraction: Unified interface for OpenAI, Anthropic, Ollama, and more.
- Orchestration: Sequential, Parallel, and Map-Reduce chains.
- Graph Workflows: Stateful workflows with
StateGraph. - Agents: Functional
ToolAgentandReActAgent. - Structured Output: Type-safe output parsing with Zod.
- RAG: Embeddings and Vector Store support.
- Observability: Built-in tracing.
Usage
import { langfn, models } from "langfn";
const lang = langfn({
model: new models.OpenAIChatModel({
apiKey: process.env.OPENAI_API_KEY
})
});
const response = await lang.complete("Hello world");
console.log(response.content);Documentation
See the main documentation for more details.
