Architectural Guide & Developer Quickstart
Welcome to the official developer guide for the Configurable Personal AI Agent (CPAA). Learn how CPAA orchestrates multi-platform productivity tools through WhatsApp.
1. Quickstart Guide
Getting started with CPAA requires zero app installation. Follow these four steps to initialize your agent:
Authenticate via Auth0 to establish an encrypted user session with an isolated tenant boundary.
Provide your phone number in the dashboard. Enter the 6-digit verification passcode delivered to your WhatsApp.
Grant 1-click OAuth access to Gmail, Google Calendar, and Docs. Tokens are encrypted using AES-256 via AWS KMS.
Text: "What are my meetings today?" or "Summarize urgent emails". Average response time is 2.1 seconds.
2. The 6-Layer Architecture
CPAA is structured into six independent layers to ensure high availability (99.87%), rapid iteration, and strict user isolation:
# 6-Layer System Architecture
[User on WhatsApp] ──> (Meta Cloud API Webhook)
│
▼
[Layer 1: Gateway] ──> Nginx (TLS 1.3, Rate Limit: 100 req/min/user)
│
▼
[Layer 2: App Engine] ──> FastAPI (Agent Manager, Sliding Context Window)
│
▼
[Layer 3: Composio] ──> Tool Connectors (Gmail, Calendar, Slack, Meet)
│
▼
[Layer 4: Intelligence]──> AWS Bedrock / Kimi-K2 Reasoning Engine
│
▼
[Layer 5: Memory] ──> Redis (Sliding window) + PostgreSQL (Durable records)
[Layer 6: Security] ──> AES-256 AWS KMS (Zero-Retention Prompt Cache)
3. Sample Prompt Execution in Python
Backend orchestrators can interact with the agent manager via FastAPI client bindings:
import httpx
async def query_cpaa_agent(user_id: str, prompt: str):
headers = {"Authorization": f"Bearer {SESSION_TOKEN}"}
payload = {
"user_id": user_id,
"message": prompt,
"channel": "whatsapp"
}
# Resolves calendar conflicts and drafts emails with 97% task accuracy
async with httpx.AsyncClient() as client:
response = await client.post(
"https://api.cpaa.ai/v1/agent/chat",
json=payload,
headers=headers,
timeout=10.0
)
return response.json()