SurrealDB Compatibility
SurrealDB Compatibility
Section titled “SurrealDB Compatibility”AgentCTX uses SurrealDB as its primary database. This page documents the license compatibility between the two projects.
SurrealDB License
Section titled “SurrealDB License”SurrealDB is licensed under the Business Source License 1.1 (BSL 1.1), the same license model AgentCTX uses for its enterprise features.
| Property | SurrealDB |
|---|---|
| License | BSL 1.1 |
| Change date | 4 years from each release |
| Change license | Apache 2.0 |
| Production use | Requires SurrealDB commercial license for certain use cases |
Compatibility Matrix
Section titled “Compatibility Matrix”| Deployment | AgentCTX License | SurrealDB License | Notes |
|---|---|---|---|
| Local development | Apache 2.0 | BSL 1.1 (permitted) | ✅ No restrictions |
| Self-hosted (internal) | Apache 2.0 | BSL 1.1 | ✅ Permitted for internal use |
| SaaS (multi-tenant) | BSL 1.1 | Check SurrealDB terms | 🔶 May require SurrealDB license |
| After change date | Apache 2.0 | Apache 2.0 | ✅ Fully open source |
Alternatives
Section titled “Alternatives”If SurrealDB’s licensing doesn’t fit your deployment:
| Alternative | Compatibility | Trade-offs |
|---|---|---|
| PostgreSQL | Apache 2.0 compatible | No built-in vectors, graph, or LIVE SELECT |
| SQLite | Public domain | No clustering, limited vectors |
| Custom adapter | Write your own | Full control, more development effort |
AgentCTX’s storage layer uses an adapter pattern, making it possible to swap the database backend.
Recommendations
Section titled “Recommendations”- Development and internal tools: Use SurrealDB freely — no license restrictions
- External-facing SaaS: Review SurrealDB’s commercial terms
- Regulated environments: Both BSL 1.1 licenses guarantee source availability and eventual Apache 2.0 conversion
See Also
Section titled “See Also”- Apache 2.0 (Core) — AgentCTX core license
- BSL 1.1 (Enterprise) — enterprise features license
- Storage Model — how SurrealDB is used