πŸ—οΈArchitecture

Synthesise AI is built on a composable, microservice-driven infrastructure written in Rust, deployed via Kubernetes, and optimized for low-latency AI orchestration. Its design prioritizes modularity, resilience, and high-throughput LLM interaction.


1. Core Flow Engine

Purpose

Responsible for coordinating execution across agents, prompts, memory layers, and UI responses. It ensures every user action in a product flow is context-aware and state-consistent.

Internal Logic

  • Pulls agent responses via async Rust tasks

  • Routes payloads between system modules (UVZ, charter, chatbots)

  • Writes flow data to Redis for short-term caching, Postgres for history

struct FlowRequest {
    user_id: String,
    input: String,
}

fn handle_flow(request: FlowRequest) -> String {
    format!("Processing flow for {}: {}", request.user_id, request.input)
}

2. Agent Runtime Layer

Purpose

Executes autonomous agent logic across multiple threads, often using pre-trained transformers (e.g., GPT-4, Claude, or local models).

Capabilities

  • Custom toolchains for SEO, structure generation, pricing logic

  • Multi-agent collaboration on a shared product state

  • Streaming response mode for real-time frontends

trait Agent {
    fn act(&self, input: &str) -> String;
}

struct BlueprintAgent;

impl Agent for BlueprintAgent {
    fn act(&self, input: &str) -> String {
        format!("Generated outline for '{}'", input)
    }
}

3. State & Memory Layer

Purpose

Combines fast-access state (Redis) with persistent product memory (PostgreSQL). Every product flow generates a state tree, enabling rollback, simulation, and audit.

Design Notes

  • Each module (e.g., UVZ, Automation) has its own schema

  • Redis used for ephemeral chatbot context and rate-limiting

  • Database holds: charter drafts, agent logs, API results, user sessions

struct ProductMemory {
    id: u64,
    key: String,
    value: String,
}

fn save_memory(mem: ProductMemory) {
    println!("Saved {}: {}", mem.key, mem.value);
}

4. Monetise + Subscription Engine

Purpose

Integrates real-time access control, usage tracking, and revenue metrics. Synthesise AI’s billing logic is tightly bound to the build credit system.

Key Components

  • Stripe webhook processor for payments, renewals, plan upgrades

  • Runtime gatekeeping that checks tier permissions and deducts credits

struct User {
    tier: String,
    credits: u8,
}

fn use_credit(user: &mut User) -> Result<(), &'static str> {
    if user.credits > 0 {
        user.credits -= 1;
        Ok(())
    } else {
        Err("No credits left")
    }
}

5. Automation + Event Router

Purpose

Translates product actions (e.g. purchase, completion) into automated system behaviors using a rule-based event engine.

Architecture

  • Event queue processed via background workers

  • Rules stored as JSON, parsed and compiled at runtime

  • Can call email APIs, trigger NFT minting, send Stripe webhooks, or assign rewards

enum Trigger {
    OnPurchase(String),
    OnDropoff,
    OnSuccess,
}

fn dispatch(trigger: Trigger) {
    match trigger {
        Trigger::OnPurchase(p) => println!("Delivering product {}", p),
        Trigger::OnDropoff => println!("Reminder sequence triggered"),
        Trigger::OnSuccess => println!("Badge minted"),
    }
}

Last updated