Architecture.
The full blueprint of Pyxym's autonomous revenue infrastructure. AgenticCore orchestration, NuclearPolicyEngine governance, public MCP endpoint, post-to-invoice attribution.
Architecture at a glance.
Authentication flows
Three auth modes : Bearer ApiKey (Stripe pattern, default), OAuth client_credentials (M2M), OAuth password grant (legacy, deprecated). Identity store enforces workspace context + scopes per request.
Webhook delivery
Outbox pattern : every resource mutation writes a webhook row in same transaction. Delivery worker picks rows, signs payload HMAC SHA-256, posts to customer endpoint. Exponential retry 7× over 32h on non-2xx.
Streaming SSE flow
Native token-by-token streaming via Server-Sent Events. X-Accel-Buffering: no disables nginx buffering. Events : meta.start (request_id + model), content.delta (tokens), meta.complete (usage + finish_reason).
Workspace hierarchy + permissions
Organization owns billing + SSO + admin policy. Multiple workspaces per organization (sandbox + live per workspace). Five role-based permissions sets : admin, operator, analyst, developer, guest.
Sandbox vs Live isolation
Strict separation : sandbox keys (pyx_test_*) only access sandbox DB schema with mock connectors and no real outbound traffic. Live keys (pyx_live_*) target production DB with audit trail and real connectors. No cross-tier reads ever.
MCP architecture
Native Model Context Protocol endpoint at mcp.pyxym.ad. 12 AI clients (Claude Desktop, Cursor, Windsurf, ChatGPT Dev, Gemini CLI, Mistral Le Chat, Claude Code, Cline, Zed, JetBrains, VS Code Copilot, Continue.dev) connect via Streamable HTTP with Bearer ApiKey, access 43 tools + 8 resources + 5 prompts mapped to the Pyxym API V2.
mcp.pyxym.ad- AgenticCore
- NuclearPolicyEngine
- Decision Loop
- Revenue Engine
- SMA Surfaces
All MCP calls authenticated · audited via Decision Audit Center · workspace-scoped
Decision Loop architecture
CanonicalOrchestratorService injects 12 context signals into 8 sub-agents (Strategy, Planner, Creative, Critic, Risk, Revenue, Memory, Orchestrator), produces outputs (posts, conversations, conversion flows, policy decisions), and closes the loop via 5 bayesian feedback channels. 5 autonomous crons keep the system recalibrating without human input.
Engineering deep-dives ship at docs.pyxym.ad.
The complete architecture documentation — every flow, every endpoint, every governance contract — lives in our production docs site. Mermaid diagrams, sequence flows, schema definitions, and replay walkthroughs.
View full architecture documentationFor detailed implementation specs and code examples, visit docs.pyxym.ad.
mcp.pyxym.ad
Native Model Context Protocol endpoint — connect from Claude Desktop, Cursor, ChatGPT Dev Mode, Windsurf, and 8 more AI clients. 43 tools · 8 resources · 5 prompts. TLS A+ rated by SSL Labs.