Skip to content

Teff

Workflow as data. Agents as graphs.

Teff is a Python framework for building durable AI agents and workflows — an embeddable async library. Inspired by LangGraph and LangChain, it brings graph-based, stateful agents to Python with minimal dependencies and zero runtime magic.

  • Async by default — nodes, tools, and LLM calls are all async.
  • Workflow as data — the canonical graph is YAML/JSON; code is optional.
  • Durable — checkpoint/resume across file, SQLite, and PostgreSQL backends.
  • Embeddable — a library, not a platform. You import us; we never import you.

What you can build

Need Do this Docs
A data pipeline Describe nodes + edges in YAML YAML workflows
Build a graph in code The full Flow builder Flow builder
An LLM call LLM node with prompt templates Nodes
Guaranteed JSON output_type / json_schema Structured output
A tool-calling agent flow.react() / harness() Agents
A multi-agent supervisor flow.route() + agent_step() Supervisors
Conditional routing flow.branch() + Case Flow builder
Parallel work Flow.parallel() / Parallel State
Dynamic fan-out Flow.map() over a state list State
Durable / resumable runs Checkpointers (file/sqlite/pg) Durable
Human approval Interrupt + resume Durable
Retrieval RAGTool over 10+ vector stores RAG
Tool scoping Skills (SKILL.md) Skills
Custom node/tool types Plugins (decorators or classes) Plugins
Streaming graph.stream() events Streaming
Guaranteed JSON output_type / json_schema Agents
Evaluation teff eval / run_eval Evaluation
Observability RunTracer / cost reports Streaming
Deployable workflows Flow.to_yaml() export YAML workflows
Scaffold an app teff new (fastapi/cli/daemon) CLI

Getting started

Reference

  • Nodes — every built-in node type and its config keys.
  • Tools — every built-in tool, config, and security notes.
  • Providers — LLM providers, keys, caching, pricing.
  • API Reference — the full public surface, generated from docstrings.
  • Examples — a runnable example for every feature.

Development

uv sync                        # install deps
uv run pytest tests/ -q        # tests
uv run ruff check .            # lint
uv run ruff format --check .   # formatting
uv run mypy .                  # types