Overview
The Platform Service is built on FastAPI and provides:- RESTful API for management operations
- Database persistence for configuration data
- OAuth2 authentication for secure access
- RBAC authorization for fine-grained permissions
- Agent discovery integration via Solace Event Mesh
The Platform Service is optional for open-source deployments but required when using Agent Mesh Enterprise features.
Architecture
Configuration
The Platform Service is configured through a YAML file:Configuration Parameters
Core Settings
The A2A namespace for agent discovery and communication.
Database connection string. Supports:
- PostgreSQL:
postgresql://user:pass@host:5432/dbname - MySQL:
mysql://user:pass@host:3306/dbname - SQLite:
sqlite:///platform.db
Server Settings
Host address for the FastAPI server. Use
0.0.0.0 to accept connections from all interfaces.Port for HTTP connections.
Port for HTTPS connections (when SSL is enabled).
SSL Configuration
Path to SSL private key file (PEM format).
Path to SSL certificate file (PEM format).
Password for encrypted private key (if applicable).
CORS Settings
List of allowed origins for CORS requests:
Regex pattern for dynamic origin matching:
Authentication (Enterprise)
URL of the OAuth2 authentication service for token validation.
Whether to enforce authentication. Set to
false for development only.Default user identity when authentication is disabled (development only).
Running the Platform Service
Initialize Configuration
Thesam init --gui command automatically creates a Platform Service configuration:
configs/services/platform.yaml.
Start the Service
Verify Service Health
API Endpoints
The Platform Service exposes the following API groups:Health Check
Agent Management (Enterprise)
Connector Management (Enterprise)
Deployment Management (Enterprise)
Enterprise endpoints require valid OAuth2 bearer tokens and appropriate RBAC permissions.
Authentication and Authorization
The Platform Service uses a shared authentication model with the WebUI Gateway:OAuth2 Token Validation
All authenticated requests require a bearer token:external_auth_service_url.
RBAC Configuration
Role-based access control is configured via theSAM_AUTHORIZATION_CONFIG environment variable:
Database Setup
PostgreSQL
MySQL
SQLite (Development)
The Platform Service automatically creates required tables on first startup using Alembic migrations.
Agent Discovery Integration
The Platform Service subscribes to agent discovery messages on the event mesh:- Real-time agent availability tracking
- Capability-based agent lookup
- Health monitoring for deployed agents
Example Deployment
Production Configuration
Production Configuration
Development Configuration
Development Configuration
Docker Deployment
Exampledocker-compose.yml:
Troubleshooting
Service won't start
Service won't start
Check:
- Database is accessible and connection string is correct
- Port 8001 is not already in use
- Broker connection parameters are valid
- All required environment variables are set
Authentication failures
Authentication failures
Check:
external_auth_service_urlis correct and reachable- OAuth2 tokens are valid and not expired
SAM_AUTHORIZATION_CONFIGenvironment variable is set- RBAC configuration is loaded correctly
CORS errors in browser
CORS errors in browser
Check:
- Origin is included in
cors_allowed_origins - Origin matches
cors_allowed_origin_regex(if using regex) - Protocol (http/https) matches configuration
Database migration errors
Database migration errors
Check:
- Database user has CREATE TABLE permissions
- Database exists and is accessible
- No conflicting schema versions
Performance Tuning
Database Connection Pooling
For PostgreSQL/MySQL, configure connection pooling:Worker Processes
For high-traffic deployments, run with multiple workers:Caching
Enable Redis caching for agent discovery data:Security Best Practices
Production Deployment
Production Deployment
- Always use HTTPS with valid certificates
- Enable authentication (
enforce_authentication: true) - Use PostgreSQL or MySQL (not SQLite)
- Restrict
cors_allowed_originsto known domains - Use strong database passwords
- Keep OAuth2 tokens short-lived
Network Security
Network Security
- Run behind a reverse proxy (nginx, Traefik)
- Use firewall rules to restrict database access
- Enable TLS for broker connections (
tcps://) - Consider API rate limiting
RBAC Configuration
RBAC Configuration
- Follow principle of least privilege
- Regularly audit user permissions
- Use specific permissions (avoid wildcards)
- Separate admin and developer roles
Next Steps
WebUI Gateway
Configure the web interface
Authentication
Set up OAuth2 and RBAC
Agent Builder
Use the visual agent builder
Deployment
Deploy to Kubernetes