Spectra is an open-source AI agent framework developed by codex-mohan, providing distinct SDKs for TypeScript and Rust. The project prioritizes a minimal and fast approach, aiming to offer core primitives that enable developers to build complex AI agent functionalities without framework limitations. Both the TypeScript and Rust SDKs are complete, independent native implementations, ensuring identical API surfaces and behaviors without relying on shared runtimes, bindings, or Foreign Function Interfaces (FFI).
The framework includes features such as an LLM abstraction for streaming and completion, multi-turn tool dispatch with Zod validation, hooks, and retry mechanisms. The TypeScript SDK further provides production runtime infrastructure like SessionEngine for lifecycle orchestration, various SessionStore options (in-memory, filesystem, SQLite, Redis), and distributed rate limiting with RedisRateLimiter and CompositeRateLimiter. It also features a CircuitBreaker for resilience and SseBridge for SSE streaming. The Rust SDK includes core types, agent, tools, events, and HTTP clients for various LLM providers, with a focus on zero unsafe code and rustls for security.
Spectra supports a range of LLM providers including Anthropic, OpenAI, and Groq, with streaming and tool use capabilities across both TypeScript and Rust implementations. The project's architecture is designed to scale from local CLI applications to distributed cloud deployments, offering different configurations for session management and rate limiting based on deployment needs. The latest release, v0.4.0, includes updates such as an npm scope migration, a new model registry supporting 158 providers and 4039 models, a mode-switching agent system, and a full rewrite of the TUI with @opentui/react.
Sources
Claim check: 6/6 supported claims - 6 evidence links - 88% avg confidence
- Spectra is a fast and minimal AI agent library available for TypeScript and Rust.supported - github.com
- The project provides independent native SDKs for TypeScript and Rust, ensuring the same API surface and behavior without shared runtimes or FFI.supported - github.com
- Spectra's latest release is v0.4.0, which includes updates like an npm scope migration, a new model registry, and a rewritten TUI.supported - github.com
- The framework supports 158 providers and 4039 models through its new `generate-models` script, fetching data from OpenRouter and models.dev.supported - github.com
- Spectra includes features such as multi-turn tool dispatch with Zod validation, retry with backoff, and support for parallel/sequential execution.supported - github.com
- The TypeScript SDK offers production runtime infrastructure including `SessionEngine`, `RedisRateLimiter`, `CompositeRateLimiter`, and `CircuitBreaker`.supported - github.com
Caveats
- The exact number of models and providers is stated in the release notes, but the functionality of the `generate-models` script is a claim from the author.
- Single-source caution: verify critical details at the linked source.
Radar score 87/100 - how it was calculated
- Reliability 82: GitHub metadata supports source trust
- Freshness 92: Fresh GitHub activity
- Novelty 77: Fresh GitHub release
- Technical 87: Repository technical metadata
- Developer 96: Developer tooling signals
- Ecosystem 72: Fresh GitHub release
- Confidence 93: Claims have reliable evidence
Discussion
Loading comments...