Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hyperterse.com/llms.txt

Use this file to discover all available pages before exploring further.

An adapter is a named binding between Hyperterse and your database. You declare the connector and connection string in an adapter config file; tools point at adapters by name with the use field. The framework handles pooling, health checks, and graceful shutdown.

Defining an adapter

Each adapter file declares a connector type and a connection string:
name: primary-db
connector: postgres
connection_string: '{{ env.DATABASE_URL }}'
options:
  sslmode: require
The connector field selects the database engine. The connection_string accepts {{ env.VAR }} placeholders, which Hyperterse resolves from environment variables when the server starts. Never commit plaintext credentials — always use environment variables or a secrets manager.

Supported connectors

Hyperterse ships with many built-in connectors:

PostgreSQL

SQL queries via postgresql:// connection strings.

MySQL

SQL queries via DSN-format connection strings.

SQLite

Local SQLite files and remote libSQL/Turso over HTTP.

MongoDB

JSON command payloads via mongodb:// connection strings.

Redis

Key-value operations via redis:// connection strings.

Referencing adapters from tools

Tools point to an adapter by name:
# excerpt from a tool definition
use: primary-db
statement: 'SELECT * FROM users WHERE id = {{ inputs.user_id }}'
A project can define multiple adapters, and different tools can reference different ones:
app
adapters
users-db.terse
analytics-db.terse
cache.terse

Lifecycle

Every adapter your tools use starts in parallel when the server boots. Each connector opens its pool and checks connectivity. If any check fails (bad host, credentials, timeout), Hyperterse exits so you do not serve tools that would fail every call. On shutdown (SIGINT / SIGTERM), all connectors close concurrently after in-flight queries complete.

Further reading

See Adapter configuration reference for the complete field specification, including driver-specific options for each connector.