Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Backend Services Overview

NeuAIs provides a complete suite of backend services to power your agent infrastructure. All services are production-ready, highly available, and designed to scale automatically.

Service Architecture

┌─────────────────────────────────────────────┐
│          API Gateway & Load Balancer         │
├─────────────────────────────────────────────┤
│  Auth  │  IAM  │  KMS  │  Billing  │  More  │
├─────────────────────────────────────────────┤
│       Service Mesh (gRPC + REST)            │
├─────────────────────────────────────────────┤
│     Distributed Storage & Databases          │
└─────────────────────────────────────────────┘

Core Services

Authentication

OAuth2, JWT, API keys, and session management with support for SSO and MFA.

Learn more →

IAM

Fine-grained identity and access management with roles, policies, and permissions.

Learn more →

KMS

Key management service for encryption, signing, and secure credential storage.

Learn more →

Billing

Usage tracking, billing, invoicing, and cost analysis for your agent infrastructure.

Learn more →

Compute

Distributed execution environment for agents with auto-scaling and load balancing.

Learn more →

Storage

S3-compatible object storage with built-in CDN and global replication.

Learn more →

Database

Managed PostgreSQL, Redis, and time-series databases optimized for agent workloads.

Learn more →

AI Network

High-performance message bus for agent-to-agent communication and coordination.

Learn more →

Service Status

All services include built-in health checks, metrics, and monitoring.

ServiceStatusUptimeLatency
AuthOperational99.99%12ms
IAMOperational99.99%8ms
KMSOperational99.98%15ms
BillingOperational99.95%25ms
ComputeOperational99.97%45ms
StorageOperational99.99%18ms
DatabaseOperational99.96%22ms
AI NetworkOperational99.98%6ms

Last updated: 5 minutes ago

Quick Start with Services

Using the Authentication Service

# Get an access token
curl -X POST https://api.neuais.com/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "your-password"
  }'

Response:

{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "Bearer",
  "expires_in": 3600
}

Using the Storage Service

# Upload a file
curl -X PUT https://storage.neuais.com/my-bucket/file.txt \
  -H "Authorization: Bearer $TOKEN" \
  -T file.txt

# Download a file
curl https://storage.neuais.com/my-bucket/file.txt \
  -H "Authorization: Bearer $TOKEN" \
  -o downloaded.txt

Using the Compute Service

use neuais_sdk::compute::*;

#[tokio::main]
async fn main() -> Result<()> {
    let client = ComputeClient::new()?;
    
    // Create a task
    let task = client
        .create_task("my-task")
        .image("my-agent:latest")
        .replicas(5)
        .region("us-west-2")
        .send()
        .await?;
    
    println!("Task created: {}", task.id);
    Ok(())
}

Service Guarantees

Availability

All services are deployed across multiple availability zones with automatic failover:

  • 99.99% uptime SLA for Auth, IAM, Storage
  • 99.95% uptime SLA for Billing, Compute, Database, AI Network
  • 99.9% uptime SLA for KMS

Performance

Target latencies at p99:

  • Auth: < 50ms
  • IAM: < 30ms
  • KMS: < 100ms
  • Storage: < 200ms
  • Compute: < 500ms
  • Database: < 100ms
  • AI Network: < 20ms

Security

All services include:

  • TLS 1.3 for all connections
  • Encryption at rest
  • Encryption in transit
  • Regular security audits
  • Compliance: SOC 2, ISO 27001, GDPR

Service Discovery

Services are automatically discoverable via DNS or the service registry:

# Via DNS
curl https://auth.neuais.com/health

# Via service registry
neuais service discover auth

Monitoring & Observability

All services expose:

  • Prometheus metrics at /metrics
  • Health checks at /health
  • OpenTelemetry traces
  • Structured JSON logs

View service metrics in Observatory:

neuais observatory --service auth

Development

Local Development

Run services locally with Docker Compose:

git clone https://github.com/neuais/platform
cd platform/services
docker-compose up -d

Services will be available at:

  • Auth: http://localhost:8001
  • IAM: http://localhost:8002
  • KMS: http://localhost:8003
  • Storage: http://localhost:9000
  • Database: postgresql://localhost:5432

Testing

Each service includes a comprehensive test suite:

cd services/auth
cargo test --all-features

Further Reading