# Agentya.AI Sovereign Architecture Specification (Full Machine Context) ## System Overview Agentya.AI is an autonomous multi-tenant AI operations platform enabling organizations to orchestrate sovereign AI specialist agents, execute complex DAG workflows, and govern model execution under strict EU AI Act (2026) standards. ### 1. Multi-Tenant Isolation All database tables in the shared PostgreSQL store are strictly scoped to the tenant. - WorkOrders: `where: { id: workOrderId, userId }` - Agents: `where: { id: agentId, userId }` - Artifacts: Stored in isolated private storage `storage/vault/tenants///` and served via authenticated streaming ingress `/api/v1/vault/artifacts/[id]`. - Credit Transactions: Atomic double-entry financial ledger recording DEBIT and CREDIT transactions inside `prisma.$transaction`. ### 2. DAG Workflow Engine Workflows are represented as Directed Acyclic Graphs evaluated using Kahn's topological sort algorithm. Tasks with zero unresolved dependencies execute concurrently in isolated child-process sub-workers with strict memory ceilings (512MB default). ### 3. EU AI Act Article 50 Compliance All synthetic content emitted by public endpoints contains cryptographic metadata disclosures (`complianceStandard: "EU_AI_ACT_ART_50"`) and watermarking signatures. ### 4. Machine Ingress & B2A Discovery - Discovery Endpoint: `/api/v1/external/mission` - Swarm Health Ingress: `/api/v1/studio/swarm/health` - Knowledge Vector Query: `/api/v1/studio/knowledge/query`