Humagnify

Developer docs

Humagnify is a Catholic knowledge graph and commerce layer for AI agents. Query structured content, discover retreats and products, traverse the entity graph, and integrate via MCP or REST.

Why query Humagnify?

Generic web retrieval returns documents. Humagnify returns relationships.

When a user asks your agent about a Eucharist retreat, a pilgrimage to Fatima, or a confirmation gift, Humagnify responds with structured results enriched by the Catholic knowledge graph — entities, linked content, and merchant products in a single call.

  • Knowledge graph in every response. A query like “Eucharist retreat” returns not just products but linked entities — Real Presence, Carlo Acutis, Mission San Juan Capistrano — each with related knowledge assets and shared-asset counts your agent can reason over.
  • Content + commerce in one call. Results link retreat houses, pilgrimage operators, and Catholic merchants directly to knowledge graph entities and curated content — so agents can recommend and explain in a single response.
  • Agent-ready from day one. Every response includes isFree, price, and reviewScore so agents can gate, rank, or explain content quality without extra calls.
  • Faith-first, quality-reviewed. Content is created by real Catholics sharing from lived faith. Every piece goes through automated quality review before publishing. AI-assisted content — saint profiles, encyclical summaries, study guides — uses Magisterium AI during the writing process to keep it grounded in Church teaching.

Example agent queries

Common patterns used by agents integrating Humagnify.

Retreat

// "Find me a retreat focused on the Eucharist"
{ "name": "find_products",
  "arguments": { "intent": "Eucharist retreat", "limit": 5 } }

// → retreat houses and programs, each with:
//   relatedEntities: [{ "type": "doctrine", "name": "Real Presence", "sharedAssets": 6 },
//                     { "type": "person",   "name": "Carlo Acutis",  "sharedAssets": 3 }, ...]
//   relatedAssets:   studies, reflections, and guides from the knowledge graph

Local pilgrimage

// "What are some good Catholic sites in Orange County, CA for a day trip?"
{ "name": "find_products",
  "arguments": { "intent": "Catholic sites Orange County California day trip" } }

// → shrines, missions, and parishes with:
//   relatedEntities: [{ "type": "location",      "name": "Mission San Juan Capistrano", "sharedAssets": 5 },
//                     { "type": "organization",  "name": "Diocese of Orange",           "sharedAssets": 2 }, ...]
//   relatedAssets:   history and reflection content about each site

Gift recommendation

// "What's a good confirmation gift for a 14-year-old?"
{ "name": "find_products",
  "arguments": { "intent": "confirmation gift for a teenager", "limit": 5 } }

// → products from Catholic merchants, linked to relevant knowledge content

Pilgrimage

// "Are there any pilgrimages to Lourdes from the US?"
{ "name": "find_products",
  "arguments": { "intent": "pilgrimage to Lourdes departing from the United States" } }

// → pilgrimage operators and travel organizers, with:
//   relatedEntities: [{ "type": "location", "name": "Lourdes", "sharedAssets": 9 },
//                     { "type": "person",   "name": "Our Lady of Lourdes", "sharedAssets": 7 }, ...]

MCP

Recommended for Claude Desktop, Claude.ai Projects, Cursor, and any MCP-compatible client. HTTP JSON-RPC 2.0 — no WebSocket, no session required.

// claude_desktop_config.json
{
  "mcpServers": {
    "humagnify": {
      "url": "https://humagnify-mcp.carlo-26e.workers.dev"
    }
  }
}

Tools

ToolDescription
search_catholic_contentSemantic search over the knowledge base
get_assetFull content by ID — text, topics, related products, knowledge graph entities
find_productsNLP product discovery — results include relatedEntities and relatedAssets

Both get_asset and find_products return knowledge graph entities inline — your agent gets entity type, name, and shared-asset count without a separate API call.

// Example MCP call
POST https://humagnify-mcp.carlo-26e.workers.dev
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_products",
    "arguments": { "intent": "Eucharist retreat silent" }
  }
}

REST API

For custom agent integrations. All endpoints are public, CORS-enabled, and return JSON.

Search

Keyword and semantic search over all public knowledge assets. Backed by Cloudflare Vectorize with Magisterium-enriched embeddings.

GET/api/assets/search?q={query}
GET/api/assets/search?q={query}&type={type}study, reflection, guide, prayer, video, podcast, pilgrimage, …
curl "https://humagnify.ai/api/assets/search?q=eucharist&type=prayer"
{
  "results": [
    {
      "id": "...",           // stable asset UUID — use this to fetch full content
      "type": "prayer",      // content type: study | reflection | guide | prayer | video | …
      "title": "Saint Thomas Aquinas Prayer After Communion",
      "topics": ["Eucharist", "thanksgiving"],  // tags extracted from content
      "isFree": true,        // false = paid via x402 (coming soon)
      "score": 0.733,        // cosine similarity 0–1; results below ~0.45 are filtered out
      "url": "https://humagnify.ai/prayer/...",   // human-readable page
      "api": "https://humagnify.ai/api/assets/..." // fetch full content or snippet from here
    }
  ],
  "semantic": true,          // true = vector search was used; false = keyword fallback
  "count": 1,
  "total": 1
}

Asset snippet

Structured summary of a single asset — optimized for agent consumption. Includes full content, related products, and payment details for paid assets.

GET/api/assets/{id}/snippet
curl "https://humagnify.ai/api/assets/{id}/snippet"

// Response
{
  "id": "...",              // stable asset UUID
  "type": "prayer",         // content type
  "title": "...",
  "topics": [...],          // tags extracted from content
  "language": "en",
  "isFree": true,           // false = paid via x402 (coming soon)
  "price": null,            // null if free; { amount, currency, protocol, network } if paid
  "reviewScore": 0.91,      // 0–1 quality score from automated content review
  "useCount": 42,           // number of times this asset has been accessed
  "occurredAt": null,       // ISO date the event/homily/pilgrimage took place (if applicable)
  "author": { "handle": "carloprayforus", "displayName": "Carlo" }, // null if no author profile
  "publication": { "slug": "crosslinkedword", "name": "CrosslinkedWord" }, // null for personal publications
  "relatedItems": [         // Catholic products from merchants relevant to this content
    {
      "id": "...",
      "title": "...",
      "brand": "The Catholic Company",
      "price": { "amount": 14.99, "currency": "USD" },
      "isFree": false,
      "url": "https://catholiccompany.com/...",
      "isSponsored": false
    }
  ]
}

Product discovery

Natural language product search across Catholic merchants. Humagnify is an aggregator — results link directly to merchant sites, enriched with knowledge graph entities and content.

POST/api/products/find
curl -X POST "https://humagnify.ai/api/products/find" \
  -H "Content-Type: application/json" \
  -d '{ "intent": "rosary beads under $20 for a child" }'

// Response includes matched products enriched with
// relatedAssets (Humagnify content) and relatedEntities (knowledge graph).

Example intents:

  • retreat houses in the midwest for men
  • pilgrimage to Fatima departing from the east coast
  • Catholic books for a teenager's confirmation gift

Entity graph

Every asset is tagged with real-world entities extracted at publish time — people, places, organizations, events, and more. Entity type is an open string (not a fixed enum) so the graph grows as new entity classes emerge from the content.

GET/api/entitieslist entities with ≥1 public asset
GET/api/entities?type={type}person | organization | location | event | scripture | doctrine | feast_day | …
GET/api/entities?q={name}name search
GET/api/entities/{id}entity detail + linked assets + related products
GET/api/entities/{id}/relatedco-occurring entities (share ≥1 asset)
curl "https://humagnify.ai/api/entities?type=person&q=aquinas"

// Response
{
  "entities": [
    {
      "id": "...",
      "type": "person",           // open string — any type the classify model extracts
      "name": "Thomas Aquinas",
      "meta": { "bioUrl": "..." }, // type-specific: person→{bioUrl, personRole}, location→{city, state, country}, …
      "canonicalId": null,         // future: Wikidata QID, Catholic Encyclopedia slug
      "_count": { "assets": 8 }   // public assets linked to this entity
    }
  ],
  "count": 1
}

// Related entities (graph traversal)
curl "https://humagnify.ai/api/entities/{id}/related"

{
  "entity": { "id": "...", "type": "person", "name": "Thomas Aquinas" },
  "related": [
    { "id": "...", "type": "doctrine", "name": "Summa Theologica", "sharedAssets": 4 },
    { "id": "...", "type": "feast_day", "name": "Feast of St. Thomas Aquinas", "sharedAssets": 2 }
  ]
}

Asset snippet responses include the full entity list for that asset. Use entity IDs to traverse the graph without re-querying the search index.

Browse feed

Paginated JSON feed for agents that want to index or browse all content without targeted search. Supports cross-references, filtering, and pagination.

GET/api/feedall sources — knowledge assets + merchant products
GET/api/feed?source=humagnifyHumagnify knowledge assets only
GET/api/feed?source=brandmerchant products only
GET/api/feed?related=trueattach cross-references between assets and products

Payments — coming soon

Paid asset access via the x402 protocol is in development. All content is currently free to access. Search results already include isFree and price fields so agents can be built payment-aware today.

// Future payment flow (not yet active)
// 1. Request asset — if paid, you will get a 402
GET /api/assets/{id}
→ 402 Payment Required
  { "x402Version": 1, "accepts": [{ "scheme": "exact", "network": "eip155:8453",
    "maxAmountRequired": "1000", "asset": "0x...(USDC)", "payTo": "0x..." }] }

// 2. Sign USDC payment on Base mainnet, retry with header
GET /api/assets/{id}
X-PAYMENT: <signed payment proof>
→ 200 { ...full asset content }

Agent Discovery

Standard discovery files for agent frameworks and crawlers.

GET/openapi.jsonOpenAPI 3.1 spec — all public endpoints
GET/llms.txtplain-text capabilities manifest
GET/.well-known/agent.jsonAgent2Agent protocol card

Open Algorithm

Humagnify's ranking is intentional and public. There are no black boxes. Content surfaces based on signals that are documented here and visible in every API response.

  • reviewScore — automated content quality review, 0–1. Higher scores surface first.
  • useCount — how often an asset has been accessed by agents. Genuine usage compounds over time.
  • Entity connections — content connected to more entities appears in more query contexts. Richer content naturally builds richer connections.

Because the algorithm is open, gaming it is beside the point — and against the spirit of what we are building. Consider it the 11th commandment: thou shalt not game the algorithm.

Organizations that publish honest content, build real entity connections, and earn genuine agent usage will surface. The graph rewards what is actually good for the faithful.