Database Integration
What you'll accomplish: Connect agents to PostgreSQL, MySQL, and MSSQL databases through integration skills.
Integration model
Agents never connect directly to databases. All data access flows through:
- A skill (declarative tool definition)
- Backed by an integration (runtime process that implements the tool)
This provides credential isolation, audit trail, and permission enforcement.
PostgreSQL
Install and configure
# Install the connector
hoziron catalog install postgresql-connector
# Store credentials
hoziron vault set POSTGRES_CONNECTION_URL
# Enter: postgresql://user:pass@db.internal:5432/claims
# Start the integration
hoziron integration start postgresql-connector
Agent usage
Once the skill is installed and the competency declares it:
Agent: "How many open claims were filed this week?"
→ Invokes: postgresql.query("SELECT COUNT(*) FROM claims WHERE status = 'open' AND filed_at > NOW() - INTERVAL '7 days'")
→ Returns: {"count": 42}
Read-only access (recommended)
For production safety, use read-only credentials:
-- In PostgreSQL:
CREATE ROLE hoziron_reader LOGIN PASSWORD '...' IN ROLE pg_read_all_data;
hoziron vault set POSTGRES_CONNECTION_URL
# Enter: postgresql://hoziron_reader:...@db.internal:5432/claims
MySQL
hoziron catalog install mysql-connector
hoziron vault set MYSQL_CONNECTION_URL
# Enter: mysql://user:pass@db.internal:3306/database
hoziron integration start mysql-connector
MSSQL
hoziron catalog install mssql-connector
hoziron vault set MSSQL_CONNECTION_URL
# Enter: mssql://user:pass@db.internal:1433/database
hoziron integration start mssql-connector
Supported databases
| Database | Integration | Connection env var |
|---|---|---|
| PostgreSQL | postgresql-connector | POSTGRES_CONNECTION_URL |
| MySQL | mysql-connector | MYSQL_CONNECTION_URL |
| MSSQL | mssql-connector | MSSQL_CONNECTION_URL |
| SQLite | Built-in (local) | File path in config |
Testing connectivity
# Test a specific integration
hoziron integration status postgresql-connector
# View exposed tools
hoziron integration tools postgresql-connector
# Output: query, list_tables, describe_table, ...
Next steps
Related: