AI Agent Build Blueprint (Start Building in 60 Seconds)
For AI Agents (Claude, Cursor, GitHub Copilot, Codex, Custom Agents) & Builders: This page contains everything an AI agent needs to connect to Purple8 Hyper Graph (
v0.72.0), choose the right tool profile, model schemas, ingest data, run hybrid GraphRAG, orchestrate stateful workflows with SLAs and Human-In-The-Loop (HITL) approvals, and compare Purple8 against legacy multi-service stacks.Machine-readable summary:
/llms.txt
1. Connect Your AI Agent (Streamable HTTP & SSE)
Purple8 runs an in-process MCP server at /mcp (Streamable HTTP) and /mcp/sse (SSE). Both endpoints accept:
- Standard API Keys (
p8g_...) viaX-API-KeyorAuthorization: Bearer - Session JWTs
- Cloud Sandbox Keys (auto-provisioned into an isolated tenant on first request)
Focused MCP Tool Profiles (?profile=)
Instead of loading all 125 tools into your agent's context window at once, pass ?profile= on the MCP URL:
| Profile | URL Suffix | Tools | When to Use |
|---|---|---|---|
starter | /mcp?profile=starter | 22 | Recommended default. RAG queries, core graph CRUD/search/traversal, document ingestion, and Journey workflows + HITL. 5× smaller prompt footprint. |
builder | /mcp?profile=builder | 72 | Full application building: Starter + schema.*, memory.*, models.*, egress.*, scheduler.*, feedback.*, registry.*. |
ops | /mcp?profile=ops | 33 | Operations & governance: journey.*, sentinel.*, guardrails.*, feedback.*, admin.*. |
full | /mcp (or ?profile=full) | 125 | All 16 namespaces including quantum.* and evolution.*. |
Copy-Paste Client Snippets
claude mcp add --transport http purple8 "https://<your-host>/mcp?profile=starter" \
--header "X-API-Key: <your-api-or-sandbox-key>"{
"mcpServers": {
"purple8-graph": {
"url": "https://<your-host>/mcp?profile=starter",
"headers": {
"X-API-Key": "<your-api-or-sandbox-key>"
}
}
}
}{
"servers": {
"purple8-graph": {
"type": "http",
"url": "https://<your-host>/mcp?profile=starter",
"headers": {
"X-API-Key": "<your-api-or-sandbox-key>"
}
}
}
}{
"mcpServers": {
"purple8-graph": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://<your-host>/mcp?profile=starter",
"--header",
"X-API-Key:${P8_KEY}"
],
"env": {
"P8_KEY": "<your-api-or-sandbox-key>"
}
}
}
}2. End-to-End Agent Playbook: Build a Complete Application
With Purple8, the AI agent is the backend developer. You do not need to set up PostgreSQL, Pinecone, Neo4j, Airflow, or Auth0. Call these MCP tools in order:
Step 1 — Define the Data Model (schema.*)
// Tool: schema.define_node_type
{
"type_name": "Borrower",
"description": "Commercial loan applicant",
"data_classification": "restricted",
"properties": {
"name": { "type": "string", "required": true },
"jurisdiction": { "type": "string", "required": true },
"requested_usd": { "type": "number" }
},
"immutable_properties": ["jurisdiction"]
}Step 2 — Ingest Documents or Structured Entities (data.* / graph.*)
// Tool: data.ingest_text
{
"text": "Horizon Logistics LLC applied for a $450,000 equipment facility in UK. Director Elena Vance also controls Titanium Cloud Ltd.",
"source_name": "kyc_memo_9001",
"auto_commit": true
}// Tool: graph.add_node (NOTE: parameter is "type" string, not "labels" list)
{
"node_id": "borrower:horizon-9001",
"type": "Borrower",
"properties": {
"name": "Horizon Logistics LLC",
"jurisdiction": "UK",
"requested_usd": 450000
}
}// Tool: graph.add_edge
{
"source_id": "borrower:horizon-9001",
"target_id": "vendor:titanium-cloud",
"edge_type": "PARTNER_OF",
"properties": { "relationship": "shared-director" }
}Step 3 — Define & Start a Stateful Workflow with SLAs & HITL (journey.*)
// Tool: journey.define
{
"journey_type": "commercial_underwriting",
"description": "KYC -> Risk Assessment -> Underwriting HITL -> Disbursed",
"stages": [
{ "name": "submitted", "sla_warn_seconds": 1800, "sla_breach_seconds": 3600 },
{ "name": "kyc_verified", "sla_warn_seconds": 7200, "sla_breach_seconds": 86400 },
{ "name": "underwriting_review", "sla_warn_seconds": 86400, "sla_breach_seconds": 172800 },
{ "name": "approved" }
]
}// Tool: journey.start
{
"journey_type": "commercial_underwriting",
"entity_id": "borrower:horizon-9001"
}Step 4 — Auto-Profile & Query with Hybrid GraphRAG (rag.*)
// Tool: rag.profile_collection
{}
// Returns recommended fusion_alpha, max_hops, seed_k, and topology_class// Tool: rag.hybrid_query
{
"question": "Which entities are connected to Horizon Logistics LLC and what is their underwriting status?",
"mode": "balanced",
"max_hops": 2,
"seed_k": 10
}Step 5 — Check SLAs, Governance & Human Approvals (journey.*, sentinel.*, admin.*)
journey.sla_alerts()— list any workflow instances that breached SLA deadlines.journey.list_hitl(status="pending")— surface pending human decisions.sentinel.list_findings(status="open")— inspect autonomous drift or risk threshold proposals.admin.audit_verify()— verify the cryptographic hash-chain across all AI and human actions.
3. Tool Selection Cheat Sheet for Agents
| Goal | Exact MCP Tool to Call |
|---|---|
| Fast single-hop factual Q&A | rag.query |
| Multi-hop relational + semantic Q&A | rag.hybrid_query |
| Discover optimal RAG parameters for a corpus | rag.profile_collection → rag.tune_collection |
| Inspect all node labels and counts | graph.labels, graph.counts |
Run Cypher query (MATCH ... RETURN ...) | graph.query |
| Multi-hop neighbourhood walk from a node | graph.traverse |
| Check if specific edges exist in bulk | graph.edges_exist |
| Find most influential nodes / clusters | graph.pagerank, graph.communities, graph.centrality |
| Parse & ingest a PDF/DOCX/XLSX/IFC by URL | data.ingest_file |
| Query structured tables inside ingested docs | data.get_table → data.query_table_rows |
| Link structured table columns to graph nodes | data.link_table_rows |
| Wait for real-time graph mutations (long-poll) | graph.wait_for_changes |
| Schedule a recurring or event-driven automation | scheduler.add_trigger |
| Stream graph changes to an external webhook | egress.add_sink |
| Federate an external REST API, MCP server, or A2A agent | registry.register_tool, registry.register_mcp_server, registry.register_a2a_agent |
| Check LLM routing decision & policy | models.route_explain, models.get_policy |
| Evaluate text against safety/PII guardrails | guardrails.evaluate |
4. Architecture & Benchmark Comparison (Why Purple8)
| Dimension | Stitched Legacy AI Stack (8–12 Services) | Neo4j + Vector Plugin | Pinecone / Qdrant | Purple8 Hyper Graph (v0.72.0) |
|---|---|---|---|---|
| Processes to run | 8 to 12 separate clusters | JVM + external orchestrator | Vector slice only | 1 in-process engine (docker run) |
| Data models in one engine | Fragmented across silos | Property graph + bolt-on vector | Vectors only | Property + Hyper + Temporal Graph + Vector + Document + Full-Text |
| Network hops per RAG query | 6 to 14 hops | 2 to 4 hops | 2+ hops | 0 hops (in-process) |
| Memory scaling with data size $N$ | Unbounded $O(N)$ | JVM heap grows with $N$ | Index RAM grows with $N$ | Hardware-bounded Cortex memory (~9 GB peak on 8.84M docs) |
| Single-node verified scale | Requires multi-node cluster | High RAM overhead | Vector-only | 20M nodes + 30M edges (50M objects) on 1 node (~42.3 GB RAM) |
| Point lookup & 2-hop latency @ 20M | 5–50 ms over network | 10–150 ms | No graph walk | 52 µs P50 (1.26 ms P99) lookup · 0.38 ms P50 (0.87 ms P99) 2-hop |
| 6M-edge Super-Hub 2-hop walk | Timeouts / OOM | Seconds to minutes | N/A | 53.1 ms P50 (58.8 ms P99), 0 timeouts |
| Hardware-topology adaptation | Manual cluster tuning | Manual JVM tuning | Cloud tier sizing | Auto-adapts to NUMA, CPU sockets, AMX & NVIDIA B200/B300 GPUs |
| Stateful workflows, SLAs & HITL | Requires Airflow / Temporal / LangGraph | None | None | Built-in JourneyEngine |
| Native AI Governance & SOC | Post-hoc proxy wrappers | None | None | Pre-execution tool RBAC, human_only gates, Drift Sentinel, 4-tier SOC & hash-chained audit |
| AI Agent MCP Interface | DIY glue code | Read/query only | Read-mostly | 125 RBAC-governed MCP tools across 16 namespaces |