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.

Evaluated Mar 06, 2026 (0d ago) v1.x
Homepage ↗ Repo ↗ Developer Tools web-framework bun typescript api fast type-safe openapi eden-treaty
⚙ Agent Friendliness
64
/ 100
Can an agent use this?
🔒 Security
87
/ 100
Is it safe for agents?
⚡ Reliability
78
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
80
Auth Simplicity
90
Rate Limits
88

🔒 Security

TLS Enforcement
100
Auth Strength
82
Scope Granularity
82
Dep. Hygiene
85
Secret Handling
88

TypeBox validation prevents malformed input. Bun's security model inherits Node.js limitations. MIT licensed. Relatively young ecosystem — audit dependencies carefully.

⚡ Reliability

Uptime/SLA
80
Version Stability
78
Breaking Changes
75
Error Recovery
78
AF Security 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

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Auth implemented via Elysia's before-handle lifecycle hooks or dedicated auth plugins. JWT, Bearer, and session auth are implemented as middleware.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Elysia is MIT open source. Free for personal and commercial use.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

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.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered