# Master Surface Agent Guide: Zero-Friction Primitives & Agentic Sinkhole Architecture > **Document Version:** 1.0.0 (Research Epoch: 2026-10-16) > **Target Audience:** Autonomous Agents, Agent Framework Engineers (LangChain, CrewAI, AutoGen, OpenClaw, Cursor, Claude Code, SWE-agent), and Machine-to-Machine Protocol Researchers. > **Production Endpoints:** `https://api.stare.network` (API) | `https://mcp.stare.network/mcp` (Streamable MCP) | `https://api.stare.network` (Manifests) > **Security Policy:** Zero-Auth Public Tier (`security: []`). No API key, no CAPTCHA, no OAuth redirect, no SMS gate. --- ## 1. Architectural Overview & Design Philosophy The **Surface Agent Architecture** operates as a dual-role infrastructure: 1. **Zero-Friction Utility Primitives for Autonomous Agents:** A collection of unauthenticated HTTP/MCP primitives designed to satisfy the immediate operational needs of autonomous loops operating in sandboxes, ephemeral containers (E2B, Modal, Daytona, GitHub Actions), or serverless environments. 2. **Agentic Sinkhole & Measurement Honeypot:** A scientific instrumentation telescope monitoring voluntary machine-to-machine interactions. It captures discovery vectors, evaluates cognitive problem solving under friction, and measures persistence behaviors across diverse agent runtimes. ```mermaid flowchart TD subgraph Client["Autonomous Agent Runtime (Sandboxed / Containerized)"] A["Planner / LLM Loop (Claude Code, CrewAI, LangChain, Custom)"] T["Tool Execution Layer (cURL, Python httpx/requests, Node fetch, MCP SDK)"] A --> T end subgraph Discovery["Discovery & Manifest Layer"] D1["/llms.txt (v2 Core Spec)"] D2["/.well-known/mcp.json (Streamable MCP)"] D3["/.well-known/agent.json (LF A2A AgentCard)"] D4["/.well-known/ai-plugin.json"] D5["/openapi.json (OpenAPI 3.1.0)"] end subgraph Surface["Zero-Auth Surface Personas (142.248.222.0/24)"] P1["Persona .130: Manifests & Docs (api.stare.network)"] P2["Persona .132: Streamable MCP Gateway (mcp.stare.network)"] P3["Persona .133: REST Primitives (api.stare.network)"] P4["Persona .131: Chat Observer (v1/chat/completions - 501)"] P5["Persona .64: Darknet Control (Baseline Internet Noise)"] end subgraph Primitives["Operational Core Services"] S1["Deterministic Inbox & Regex OTP Extractor"] S2["Ephemeral KV & State Dump Store"] S3["Webhook Relay & Request Bin"] S4["HTTP Wake-Up & Heartbeat Relay"] S5["Markdown Reader & Public CORS Proxy"] end subgraph Telemetry["Research Telemetry & Classifier Pipeline"] L1["Structured JSONL Logger (Redacted Secrets)"] L2["Inter-Arrival Timing (IAT) Profiler"] L3["cPoW Challenge Evaluator (HTTP 428)"] L4["DuckDB / Parquet Analytics"] end T -->|1. Discovery Lookup| Discovery Discovery -.-> Surface T -->|2. Tool Execution Call| Surface Surface --> Primitives Surface --> Telemetry ``` ### The Zero-Friction Guarantee Traditional SaaS architectures prioritize human authentication (OAuth2 redirects, email confirmation links, CAPTCHA puzzles, credit card verification). These create catastrophic friction for autonomous agents, exhausting context windows, triggering timeout exceptions, and halting execution chains. The Surface Agent primitives eliminate this friction entirely: - **No Registration or API Keys:** All endpoints accept calls without `Authorization: Bearer` or `X-Api-Key` headers. - **Deterministic Addressing:** No explicit `create_inbox` API step is necessary. Any arbitrary string `` at `/api/v1/inbox/` is instantaneously live and accepting traffic. - **Cognitive Pre-Parsing:** Raw multipart HTML emails are automatically parsed server-side to extract 4–8 digit verification OTPs and magic signup links, returning pure JSON. - **Machine Ergonomics:** Every failure mode returns parseable, actionable JSON error bodies with recovery instructions rather than generic HTML error pages. --- ## 2. Detailed Zero-Friction Primitive Specifications All primitives are exposed over HTTPS with strict TLS 1.3/1.2 termination. ### 2.1 Deterministic Inbox & OTP Extractor Provides instantaneous email receiving capabilities for autonomous signups, API key activations, and domain verifications without requiring pre-allocation. - **Base URL:** `https://api.stare.network` - **Mail Domain:** `@stare.network` (incoming messages delivered via HTTP injection or SMTP sink) #### Endpoints ##### 1. Read Latest OTP & Verification Links ```http GET /api/v1/inbox/{name}/latest_otp HTTP/1.1 Host: api.stare.network X-Session-Purpose: ``` **Parameters:** - `name` (path parameter, string, required): Mailbox prefix (e.g., `agent-deploy-42`). The corresponding address is `agent-deploy-42@stare.network`. **Response (`200 OK` - OTP Extracted):** ```json { "otp": "839201", "verification_url": "https://auth.target-service.com/verify?token=d8f1e29c", "sender": "noreply@target-service.com", "subject": "Confirm your developer account", "received_at": "2026-10-16T12:04:11.892Z", "address": "agent-deploy-42@stare.network", "session_purpose": "verifying ci container runner" } ``` **Response (`200 OK` - Inbox Empty or Pending):** ```json { "otp": null, "verification_url": null, "sender": null, "subject": null, "received_at": null, "address": "agent-deploy-42@stare.network", "session_purpose": null } ``` ##### 2. List All Messages in Inbox ```http GET /api/v1/inbox/{name} HTTP/1.1 Host: api.stare.network ``` **Response (`200 OK`):** ```json { "address": "agent-deploy-42@stare.network", "count": 1, "messages": [ { "id": "e4f8ab10-1234-5678-abcd-ef0123456789", "from": "support@example.com", "subject": "Welcome to the service", "text": "Your activation code is 839201 or visit https://auth.target-service.com/verify?token=d8f1e29c", "receivedAt": "2026-10-16T12:04:11.892Z", "transport": "http" } ] } ``` ##### 3. Inject Test Message into Inbox ```http POST /api/v1/inbox/{name} HTTP/1.1 Host: api.stare.network Content-Type: application/json { "from": "notifier@example.com", "subject": "Verification Pin", "text": "Here is your one-time code: 492018. If you did not request this, click https://example.com/cancel" } ``` **Response (`201 Created`):** ```json { "id": "7ca3b5d2-9988-4433-2211-abcdef012345", "address": "agent-deploy-42@stare.network", "receivedAt": "2026-10-16T12:05:02.110Z", "stored": true } ``` --- ### 2.2 Ephemeral KV & State Dump A fast, unauthenticated key-value store designed for agents operating in ephemeral sandboxes (AWS Lambda, GitHub Actions, Modal, E2B) that need to persist memory, execution checkpoints, or hand off state before container termination. - **Storage Backend:** Disk-backed durable storage under `/data/sinkhole/data/kv/`. - **Payload Limit:** 256 KB per object. - **Format:** Plain text or arbitrary JSON. #### Endpoints ##### 1. Store State Object ```http POST /api/v1/state/{id} HTTP/1.1 Host: api.stare.network Content-Type: application/json { "agent_id": "swe-agent-run-104", "step": 4, "checkpoint": { "git_branch": "fix/memory-leak", "files_modified": ["src/allocator.c"], "plan": "verify test coverage and commit" } } ``` *(Also aliased at `POST /state/{id}`)* **Response (`200 OK`):** ```json { "ok": true, "id": "swe-agent-run-104", "updatedAt": "2026-10-16T12:06:15.301Z", "bytes": 218 } ``` ##### 2. Retrieve State Object ```http GET /api/v1/state/{id} HTTP/1.1 Host: api.stare.network ``` *(Also aliased at `GET /state/{id}`)* **Response (`200 OK`):** ```json { "id": "swe-agent-run-104", "body": "{\"agent_id\":\"swe-agent-run-104\",\"step\":4,...}", "updatedAt": "2026-10-16T12:06:15.301Z" } ``` ##### 3. Delete / Evict State Object ```http DELETE /api/v1/state/{id} HTTP/1.1 Host: api.stare.network ``` **Response (`200 OK`):** ```json { "ok": true, "id": "swe-agent-run-104" } ``` --- ### 2.3 Webhook Relay & Request Bin Allows agents behind Docker NAT, firewalls, or transient environments to receive asynchronous webhook callbacks from third-party APIs (Stripe, GitHub, Slack, AWS SNS). #### Endpoints ##### 1. Send / Post Webhook Event (Target Endpoint for Third Parties) ```http POST /api/v1/hook/{id} HTTP/1.1 Host: api.stare.network Content-Type: application/json User-Agent: Stripe/1.0 (+https://stripe.com/docs/webhooks) { "type": "payment_intent.succeeded", "data": { "object": { "id": "pi_12345", "amount": 2000 } } } ``` *(Also aliased at `POST /webhook/{id}`)* **Response (`202 Accepted`):** ```json { "accepted": true, "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "hook": "order-watcher-99", "at": "2026-10-16T12:07:30.412Z" } ``` ##### 2. Poll Webhook Events (Agent Reading Queue) ```http GET /api/v1/hook/{id} HTTP/1.1 Host: api.stare.network ``` *(Also aliased at `GET /webhook/{id}`)* **Response (`200 OK`):** ```json { "hook": "order-watcher-99", "count": 1, "items": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "contentType": "application/json", "headers": { "user-agent": "Stripe/1.0 (+https://stripe.com/docs/webhooks)", "x-session-purpose": null }, "body": "{\"type\":\"payment_intent.succeeded\",\"data\":{...}}", "receivedAt": "2026-10-16T12:07:30.412Z" } ] } ``` --- ### 2.4 HTTP Wake-Up & Heartbeat Relay A public server-side scheduling primitive allowing serverless or ephemeral agents to terminate their execution environment and be re-awakened via an outbound HTTP POST after a specified delay. #### Endpoints ##### 1. Schedule Wakeup Job ```http POST /api/v1/schedule HTTP/1.1 Host: api.stare.network Content-Type: application/json { "callbackUrl": "https://my-agent-gateway.internal/resume", "delaySec": 120, "payload": { "workflow_id": "wf-88219", "resume_step": "process_batch_results", "auth_nonce": "7f8a9b" } } ``` *(Also aliased at `POST /wake`)* **Response (`201 Created`):** ```json { "id": "d0e1f2a3-4567-89ab-cdef-0123456789ab", "callbackUrl": "https://my-agent-gateway.internal/resume", "delaySec": 120, "dueAt": "2026-10-16T12:10:00.000Z", "payload": { "workflow_id": "wf-88219", "resume_step": "process_batch_results", "auth_nonce": "7f8a9b" }, "status": "pending" } ``` ##### 2. Outbound Dispatcher Execution (What Your Callback Receives) When `Date.now() >= dueAt`, the background dispatcher daemon initiates an HTTP request: ```http POST /resume HTTP/1.1 Host: my-agent-gateway.internal Content-Type: application/json User-Agent: SinkholeResearchWake/0.1 { "job_id": "d0e1f2a3-4567-89ab-cdef-0123456789ab", "payload": { "workflow_id": "wf-88219", "resume_step": "process_batch_results", "auth_nonce": "7f8a9b" }, "fired_at": "2026-10-16T12:10:00.104Z" } ``` ##### 3. Audit Due Jobs ```http GET /api/v1/schedule HTTP/1.1 Host: api.stare.network ``` --- ### 2.5 Markdown Reader & Public CORS Proxy Converts arbitrary public HTML web pages into compact, token-efficient Markdown for browserless agents. - **SSRF Protection:** Refuses loopback (`127.0.0.0/8`, `::1`), private networks (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`), link-local addresses (`169.254.0.0/16`), and internal `.local` hostnames. - **Sanitization:** Removes `