Elysia
TypeScript-first web framework built exclusively for Bun. Elysia leverages Bun's native HTTP APIs for performance exceeding Express by 20-30x. Key feature is end-to-end type safety via Eden Treaty — the client SDK is generated from the server's type definitions, providing RPC-like TypeScript safety across network calls without code generation. Built-in OpenAPI/Swagger documentation generation from TypeScript types.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
TypeBox validation prevents malformed input. Bun's security model inherits Node.js limitations. MIT licensed. Relatively young ecosystem — audit dependencies carefully.
⚡ Reliability
Best When
You're building a TypeScript-first API on Bun and want maximum performance, automatic OpenAPI docs, and end-to-end type safety between server and client without a separate schema language.
Avoid When
You need Node.js compatibility, multi-runtime support, or are not using TypeScript. Use Hono for multi-runtime TypeScript APIs.
Use Cases
- • Build high-throughput REST APIs on Bun runtime with 20-30x Express performance for agent-serving infrastructure requiring low latency
- • Create type-safe full-stack TypeScript applications using Eden Treaty for zero-overhead type sharing between Elysia server and TypeScript clients
- • Generate OpenAPI documentation automatically from TypeScript type definitions using Elysia's built-in Swagger plugin
- • Build microservices that leverage Bun's native SQLite binding and fast HTTP for lightweight, self-contained agent tools
- • Implement streaming APIs for AI/LLM responses using Elysia's built-in SSE (Server-Sent Events) and streaming response support
Not For
- • Node.js environments — Elysia requires Bun; it does not run on Node.js (unlike Hono which is multi-runtime)
- • Production environments where Bun maturity is a concern — Bun 1.0+ is production-ready but has less ecosystem history than Node.js
- • Teams not using TypeScript — Elysia's primary advantage (end-to-end typing) is lost without TypeScript
Interface
Authentication
Auth implemented via Elysia's before-handle lifecycle hooks or dedicated auth plugins. JWT, Bearer, and session auth are implemented as middleware.
Pricing
Elysia is MIT open source. Free for personal and commercial use.
Agent Metadata
Known Gotchas
- ⚠ Elysia runs ONLY on Bun — attempting to run on Node.js or Deno will fail; this is a hard runtime dependency that eliminates portability
- ⚠ Eden Treaty type sharing requires the server app to be exported as a type — circular imports or dynamic route generation can break type inference
- ⚠ Elysia 1.x made breaking changes from 0.x — route handler signature and plugin API changed; check version when reading tutorials
- ⚠ Bun's module resolution differs slightly from Node.js — some npm packages may not work correctly on Bun; check Bun compatibility before adding dependencies
- ⚠ Elysia's validation uses TypeBox under the hood — schema types use t.Object(), t.String() patterns from @sinclair/typebox, not Zod; agents must use TypeBox schema syntax
- ⚠ SSE streaming responses require specific response handling — returning a generator function or ReadableStream; incorrect response type causes connection drops
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Elysia.
Scores are editorial opinions as of 2026-03-06.