Skip to content

MadsRC/trustedai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

64 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TrustedAI

TrustedAI Logo

Enterprise-Grade LLM Gateway for Secure AI Adoption

License: AGPL v3 Go React Status

Bringing enterprise security and governance to Large Language Model deployments

๐Ÿš€ Why TrustedAI?

Organizations adopting AI face a critical challenge: How do you harness the power of LLMs while maintaining enterprise security, compliance, and cost control?

TrustedAI solves this by providing a secure, observable, and governable gateway between your organization and LLM providers. No more shadow IT, ungoverned API keys, or compliance nightmares.

The Problem We Solve

  • ๐Ÿ”’ Security Gaps: Direct API access bypasses enterprise security controls
  • ๐Ÿ’ธ Cost Overruns: No visibility into usage patterns or cost attribution
  • ๐Ÿ“Š Compliance Blind Spots: Lack of audit trails and usage monitoring
  • ๐Ÿข Governance Challenges: Scattered API keys and ungoverned access
  • ๐Ÿ”ง Developer Friction: Complex integration patterns for enterprise features

โœจ Key Features

๐Ÿ›ก๏ธ Enterprise Security First

  • SSO-Only Authentication: OIDC/SAML integration with Okta, EntraID, Keycloak
  • Zero Local Passwords: Eliminate credential vulnerabilities
  • Session Management: Secure token-based access with easy revocation
  • Multi-Tenant Architecture: Organization-level isolation and controls

๐Ÿ“Š Complete Observability

  • Real-Time Analytics: Usage patterns, cost tracking, and performance metrics
  • OpenTelemetry Integration: Seamless monitoring stack integration
  • Detailed Audit Trails: Full request/response logging for compliance
  • Cost Attribution: Per-user, per-model billing and quota management

๐Ÿ—๏ธ Production-Ready Architecture

  • Dual-Plane Design:
    • Control Plane: Management APIs, user interface, and administration
    • Data Plane: High-performance LLM request routing and processing
  • Multi-Provider Support:
    • Frontend APIs: OpenAI, Anthropic (Gemini planned)
    • Backend Routing: OpenRouter with planned support for Bedrock, Vertex AI
  • Database-Driven: PostgreSQL-backed configuration and state management

โšก Developer Experience

  • Modern Web UI: React/TypeScript dashboard with real-time updates
  • ConnectRPC APIs: Type-safe, high-performance API layer with HTTP/2
  • Comprehensive Testing: Unit, integration, and acceptance test suites
  • Docker Compose: Simple local development setup

๐Ÿ”ฎ Roadmap

We're actively developing these enterprise-critical features:

  • ๐Ÿ›ก๏ธ AI Guardrails: Content filtering, safety controls, and policy enforcement
  • ๐Ÿ“ Prompt Management: Centralized prompt templates and version control
  • ๐ŸŽฏ Advanced Routing: Load balancing, failover, and A/B testing
  • ๐Ÿ“Š Enhanced Analytics: Custom dashboards and reporting
  • ๐Ÿ”— More Integrations: Bedrock, Vertex AI, Azure OpenAI Service

๐Ÿš€ Quick Start

Prerequisites

1. Clone and Setup

git clone https://github.com/MadsRC/trustedai.git
cd trustedai

# Install tools and dependencies
mise install
mise run dev/bootstrap.sh

2. Start Infrastructure

# Start PostgreSQL, Keycloak, and OTEL Collector
docker compose up -d

# Wait for services to be ready (especially database)
docker compose ps

3. Run TrustedAI

# Start the backend (control plane + data plane)
DATABASE_URL="postgres://postgres:postgres@localhost:5432/postgres" \
LLMGW_BASE_URL="http://localhost:5173" \
go run cmd/trustedai/main.go

# In another terminal, start the frontend
cd frontend
npm run dev

4. Access the Dashboard

Open http://localhost:5173 and sign in using:

๐Ÿ“š Documentation

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   React App     โ”‚    โ”‚  Control Plane  โ”‚
โ”‚  (Port 5173)    โ”‚โ—„โ”€โ”€โ–บโ”‚   (Port 9999)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                                โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚   Data Plane    โ”‚
                       โ”‚   (Port 8081)   โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                                โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚    LLM Providers        โ”‚
                    โ”‚ OpenAI โ”‚ Anthropic โ”‚... โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Control Plane: User management, configuration, analytics, and web UI Data Plane: High-performance LLM request routing and response handling

๐Ÿค Contributing

We welcome contributions! TrustedAI is in active development and we're looking for:

  • ๐Ÿ› Bug Reports: Help us identify and fix issues
  • ๐Ÿ’ก Feature Requests: Share your enterprise AI governance needs
  • ๐Ÿ”ง Code Contributions: Check our issues for good first contributions
  • ๐Ÿ“– Documentation: Help improve our guides and examples

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Follow our conventions: Read CLAUDE.md for coding standards
  4. Test your changes: mise run test:unit
  5. Format code: mise run format
  6. Lint code: mise run lint
  7. Commit with conventional commits: feat: add amazing feature
  8. Open a Pull Request

๐Ÿ“‹ Requirements

  • Go: 1.24.4+
  • Node.js: 24.2.0+
  • PostgreSQL: 17+
  • Docker: For local development

๐Ÿ“„ License

TrustedAI is licensed under the GNU Affero General Public License v3.0.

We chose AGPL-3.0 because we believe enterprise AI infrastructure should be transparent, auditable, and community-driven. This ensures that improvements to TrustedAI benefit everyone in the ecosystem.

๐Ÿšง Project Status

TrustedAI is currently in Alpha. We're actively developing core features and welcome feedback from enterprise teams tackling AI governance challenges.

  • โœ… Core Architecture: Control/Data plane separation
  • โœ… Authentication: SSO integration with OIDC
  • โœ… Multi-Provider: OpenAI, Anthropic, OpenRouter support
  • โœ… Observability: Usage tracking and metrics
  • ๐Ÿšง Guardrails: In development
  • ๐Ÿšง Prompt Management: Planned
  • ๐Ÿšง Advanced Routing: Planned

๐Ÿ’ฌ Community & Support


Ready to bring enterprise security to your AI deployment?

โญ Star this repo if TrustedAI solves a problem you're facing!

Get Started โ€ข View Issues โ€ข Join Discussions

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published