AgileX Recruitment — Deployment Architecture

Cloudflare Edge AI + Huly ATS + Microsoft 365 as the Golden Source of Records

Cloudflare Workers AI Gateway Vectorize Huly v0.7 Microsoft Graph OneDrive SharePoint Teams Resend Hetzner

1 Architecture Overview

CF Cloudflare Edge Layer — Security, CDN, DNS, Intelligence
Tunnel
huly.agilex.co.za
Zero inbound ports
Pages
app.agilex.co.za
Demo + Agent Portal
DNS + CDN
SSL/TLS 1.3
DDoS + WAF
D1
Agent state
Task queue, logs
KV
Sessions, cache
Rate limits
AG A.G.I.L.E. Agent Workers — Autonomous Recruitment Intelligence
A — Acquire
CV parsing, sourcing
Profile creation
G — Gauge
Screening, scoring
Auto-advance
I — Integrate
Scheduling
Calendar sync
L — Leverage
Analytics, reports
Market intel
E — Engage
Email, notifications
Candidate nurture
AI Cloudflare AI Gateway — Multi-Model Inference, Caching, Analytics
Workers AI
Llama 3.3 8B (fast)
bge-base (embeddings)
Anthropic
Claude Opus/Sonnet
Primary reasoning
OpenAI
GPT-4o fallback
Alternative scoring
Google
Gemini Pro
Report generation
Vectorize
Candidate embeddings
Semantic search (RAG)
Cloudflare Tunnel — outbound only
HZ Hetzner VPS — Huly ATS (Minimal Metadata Store)
Huly Services
front, account, transactor
workspace, collaborator
CockroachDB
Pipeline metadata
Links to M365 docs
Elasticsearch
Full-text search
Candidate index
MinIO
Thumbnails only
NOT document store
Resend
SMTP bridge
Transactional email
Microsoft Graph API — OAuth 2.0
MS Microsoft 365 — Golden Source of Records & Evidence of Work
OneDrive
CVs, offers, refs
contracts, ID docs
SharePoint
Document libraries
Metadata + search
Teams
Client channels
Agent activity feed
Entra ID
SSO / OAuth
User management
Outlook
Email sync
Calendar integration

2 Core Design Principle

ATS = Lightweight Metadata Layer

Huly stores the minimum data to manage the pipeline. Every document field is a OneDrive/SharePoint URL, not a binary file.

ATS Stores (Huly)M365 Stores (Golden Source)
Name, email, phoneFull CV / resume PDF
Pipeline stage & statusSigned offer letters
Skills tags (extracted)Reference letters
Vacancy & client linkInterview scorecards
OneDrive URLs to docsID documents & certificates
Agent activity logClient contracts & briefs

Microsoft 365 = Source of Truth

OneDrive and SharePoint are the authoritative record. The ATS links to documents — never duplicates them.

  • Version history — every edit tracked (500+ versions)
  • Compliance — POPIA/retention via Microsoft Purview
  • Search — Microsoft Search indexes all content
  • Access control — M365 permissions, not ATS ACLs
  • Teams — documents surface in client channels
  • Mobile — OneDrive/Teams apps everywhere
  • Co-authoring — real-time collaborative editing

3 Document Flow — CV to Placement

1
Agent Receives CV
Acquire agent parses PDF, extracts name, skills, experience
2
Upload to OneDrive
/Candidates/Active/{Name}/ via Microsoft Graph API
3
Get Sharing Link
Graph API returns view-only or edit URL
4
Store Link in ATS
Huly candidate record holds OneDrive URL
5
Generate Embedding
CV text → vector in Cloudflare Vectorize for semantic search

Viewing documents: Click the link in Huly → opens in Office Online. Browse in SharePoint → filter by stage/client. See in Teams → Files tab in client channel. Mobile → OneDrive or Teams app.

4 AI Gateway — Multi-Model Inference

All AI inference routes through Cloudflare AI Gateway: one endpoint, multiple providers, with caching, analytics, cost tracking, and automatic fallback.

TaskPrimary ModelFallbackReasoning
CV parsing & extractionWorkers AI (Llama 8B)Claude HaikuFast, cheap, structured output at edge
Candidate scoringClaude SonnetGPT-4oNuanced reasoning for fair evaluation
Interview questionsClaude OpusClaude SonnetQuality-critical, candidate-facing output
Offer letter draftingClaude SonnetGPT-4oStrong writing with legal context
CEO / exec reportsClaude SonnetGemini ProData synthesis + clear narrative
Email responsesWorkers AI (Llama 8B)Claude HaikuHigh volume, templated, cost-sensitive
Semantic search / matchingWorkers AI (bge-base)Embedding model, always at edge, zero latency

How It Gets Smarter Over Time

🧠

Growing Vector Index

Every CV processed adds an embedding. At 1000+ candidates, the system finds nuanced patterns human recruiters would miss.

Semantic Caching

Similar queries return cached results in <10ms. After 3 months, expect 30-50% cache hits — faster responses at zero cost.

🔄

Feedback Loop

When consultants override agent decisions, the feedback refines scoring prompts. Accuracy improves quarterly.

📊

Analytics-Driven

AI Gateway logs every request. A dashboard shows cost per agent, model performance, and where to optimise.

5 Microsoft 365 Structure

OD OneDrive — Shared Drive
AgileX Recruitment/
├── Candidates/
│   ├── Active/
│   │   └── {Name} — {Role} ({Client})/
│   │       ├── CV.pdf
│   │       ├── Offer_Letter.pdf
│   │       ├── References/
│   │       ├── Scorecards/
│   │       └── ID_Docs/
│   ├── Placed/
│   └── Archived/
├── Clients/
│   └── {Client Name}/
│       ├── Contract.pdf
│       ├── Rate_Card.xlsx
│       ├── Vacancy_Briefs/
│       └── Reports/
├── Staff/
│   ├── Policies/
│   └── Training/
└── Reports/
    ├── Weekly/  (auto-generated)
    ├── Monthly/
    └── Quarterly/
SP SharePoint — Document Libraries

agilex.sharepoint.com/sites/Recruitment

LibraryMetadata Columns
CandidatesName, Vacancy, Stage, Client, Consultant
ClientsClient, Industry, Contract Status
StaffEmployee, Department, Doc Type
TemplatesType, Version, Last Updated
ReportsType, Period, Agent or Human

Content Types: Candidate CV, Offer Letter, Reference, Scorecard, Contract, Vacancy Brief, Pipeline Report

TM Teams — Channels & Tabs
Team: AgileX Recruitment
├── General
├── Leadership
├── Pipeline Reviews
├── Clients/
│   ├── Standard Bank
│   ├── Absa Group
│   ├── Shoprite Holdings
│   ├── Woolworths
│   ├── FirstRand
│   ├── Nedbank
│   ├── Capitec
│   ├── Pick n Pay
│   ├── TFG
│   └── Mr Price
├── Agent Activity
│   ├── Tab: Dashboard
│   ├── Tab: Pipeline Board
│   └── Tab: AI Usage Stats
└── Templates & Training

Agents post to channels automatically via Microsoft Graph API.

6 Monthly Cost Estimate

ComponentSpecificationCost (ZAR)Tier
Hetzner VPS (CPX31)4 vCPU, 8 GB RAM, 160 GB NVMe~R280Paid
Cloudflare (Tunnel, DNS, CDN, WAF)Free plan — all includedR0Free
Cloudflare WorkersFree: 100K requests/dayR0Free
Cloudflare D1 + KV + VectorizeFree tiers are generousR0Free
Cloudflare AI GatewayMetering, caching, analyticsR0Free
Workers AI (edge inference)CV parsing, embeddings (~$5-20)~R90 – R360Usage
Claude API (via AI Gateway)Scoring, drafting, reports (~$20-50)~R360 – R900Usage
Resend (transactional email)Free: 100 emails/dayR0Free
Microsoft 365 Business BasicPer user (if not existing)~R110/userPer user
Total (excl. M365 licenses)R730 – R1,540

7 Security Model

LayerMechanismProvider
Edge protectionWAF rules, DDoS mitigation, bot management, rate limitingCloudflare
TransportTLS 1.3 — Full (Strict) SSL modeCloudflare
AuthenticationOpenID Connect SSO via Microsoft Entra ID; JWT for agent-to-serviceMicrosoft + CF
AuthorizationHuly workspace roles (Owner / Maintainer / User) + M365 permissionsHuly + Microsoft
Data at restCockroachDB encrypted; M365 BitLocker; CF Workers encryptedAll providers
API throttlingAI Gateway rate limits; KV per-user counters; CORS policiesCloudflare
SecretsCloudflare Workers secrets (encrypted); never in code or logsCloudflare
Email authDKIM + SPF + DMARC via Resend + Cloudflare DNSResend + CF
CompliancePOPIA — Hetzner EU + M365 data residency + Microsoft Purview retentionAll

8 Implementation Phases

Completed Done

Week 1 — Infrastructure Hetzner + Cloudflare

Week 2 — Intelligence AI + Agents

Week 3 — Documents Microsoft 365

Week 4 — Integration Full Testing