Skip to content

Release Notes: v0.4.0

Release Date: 2026-03-22

Overview

AgentComms v0.4.0 adds PostgreSQL support with Row-Level Security for multi-tenancy, SMS as a chat transport, and a webhook server for inbound Twilio/Telnyx callbacks.

Highlights

  • PostgreSQL with Multi-Tenancy: Database abstraction supporting both SQLite and PostgreSQL with RLS-based tenant isolation
  • SMS Chat Provider: Send and receive SMS messages through Twilio or Telnyx
  • Webhook Server: HTTP server for receiving inbound SMS and voice status callbacks
  • Updated Dependencies: omnichat v0.4.0 (Slack, Gmail) and omnivoice v0.7.0

New Features

PostgreSQL + Row-Level Security

Multi-tenant deployments can now use PostgreSQL with Row-Level Security for database-level isolation:

{
  "database": {
    "driver": "postgres",
    "dsn": "postgres://user:pass@localhost:5432/agentcomms?sslmode=disable",
    "multi_tenant": true,
    "use_rls": true
  }
}

Two-layer isolation:

  1. Application-level - Ent privacy rules filter all queries by tenant_id
  2. Database-level - PostgreSQL RLS policies enforce isolation at the database

SMS Chat Provider

SMS is now available as a chat transport alongside Discord, Slack, Telegram, WhatsApp, and Gmail:

{
  "chat": {
    "sms": {
      "enabled": true
    }
  }
}

SMS uses your configured phone provider (Twilio or Telnyx) and integrates with the existing channel mapping system.

Webhook Server

A dedicated webhook server receives callbacks from Twilio and Telnyx:

{
  "webhook": {
    "enabled": true,
    "port": 3334
  }
}
Endpoint Description
/webhook/twilio/sms Incoming SMS from Twilio
/webhook/twilio/voice Voice status callbacks
/webhook/telnyx/sms Incoming SMS from Telnyx
/webhook/telnyx/voice Voice status callbacks
/health Health check

Architecture Changes

Tenant Context

New internal/tenant package manages tenant context propagation:

ctx = tenant.WithTenantID(ctx, "tenant-123")
tenantID := tenant.FromContext(ctx)  // Returns "local" if not set

Database Abstraction

The internal/database package provides driver-agnostic database operations:

  • database.Open(cfg) - Opens SQLite or PostgreSQL based on config
  • ApplyRLSPolicies(db) - Creates RLS policies for PostgreSQL
  • PostgreSQL driver wrapper sets app.current_tenant per transaction

Ent Privacy Policies

Agent and Event schemas now include privacy policies for tenant filtering:

func (Agent) Policy() ent.Policy {
    return privacy.Policy{
        Query: privacy.QueryPolicy{rule.FilterTenantRule()},
        Mutation: privacy.MutationPolicy{rule.FilterTenantRule()},
    }
}

Documentation

Dependencies

Package Version Change
omnichat v0.4.0 Slack, Gmail providers
omnivoice v0.7.0 Updated voice stack
lib/pq v1.12.0 PostgreSQL driver
modernc.org/sqlite v1.47.0 Updated SQLite driver

Upgrade Guide

This release is backwards compatible. Existing SQLite deployments continue to work without changes.

For PostgreSQL Migration

  1. Create a PostgreSQL database
  2. Update config.json with database settings:
    {
      "database": {
        "driver": "postgres",
        "dsn": "postgres://user:pass@localhost:5432/agentcomms?sslmode=require",
        "multi_tenant": true,
        "use_rls": true
      }
    }
    
  3. Start the daemon - schema migrations run automatically
  4. RLS policies are applied after schema creation

For SMS Integration

  1. Ensure webhook server is enabled
  2. Configure your Twilio/Telnyx number to send SMS webhooks to your server
  3. Enable SMS in chat config

Full Changelog

See CHANGELOG.md for the complete list of changes.