OpenFaaS Integration Guide

Build event-driven, serverless knowledge pipelines using Aevum Encyclopedia's API. This guide covers deployment, Slack bot integration, and real-time sync patterns for the #openfaas community channel.

⚡ Serverless 💬 Slack Native

Slack #openfaas Integration

The #openfaas channel acts as a live deployment dashboard and interactive query interface. Aevum's Slack bot listens for commands, triggers OpenFaaS functions, and streams execution logs directly to your workspace.

💬

#openfaas Channel Hub

Real-time function triggers & deployment logs

Channel ID: C04X9A2B7R | Bot: @aevum-faas | Region: us-east-1

/aevum search Query knowledge graph
/aevum deploy Push function to cluster
/aevum logs Stream execution logs
/aevum webhook Test trigger endpoint

Quick Start: Python Function

Generate a new OpenFaaS function using the Aevum template. This creates a handler.py pre-configured with API credentials and rate-limiting middleware.

Terminal
faas-cli new aevum-knowledge-worker --lang python3-debian --prefix aevum
faas-cli template pull https://github.com/aevum/faas-python-template
faas-cli up -f aevum-knowledge-worker.yml

handler.py Structure

Python
import httpx
import os
import json
 
def handle(req: httpx.Request):
    # Extract query from Slack event or direct invocation
    payload = json.loads(req.content)
    query = payload.get("text", "")
 
    # Forward to Aevum Encyclopedia API
    client = httpx.Client(timeout=5.0)
    resp = client.post("https://api.aevum.dev/v2/resolve",
        json={"query": query, "mode": "graph"},
        headers={"Authorization": f"Bearer {os.getenv('AEVUM_API_KEY')}"})
 
    return (resp.status_code, resp.json())

API Endpoints

All endpoints support JSON input/output and are optimized for sub-100ms cold starts. Rate limits: 120 req/min per function instance.

MethodPathDescription
GET/v2/resolveSemantic query with graph traversal
POST/v2/ingestBatch submit verified entries
GET/v2/webhooksActive trigger subscriptions
POST/v2/slack/verifyVerify Slack signing secret

Deployment & Scaling

Configure Environment

Set AEVUM_API_KEY, SLACK_BOT_TOKEN, and FAAS_GATEWAY in your cluster secrets.

Apply Function Manifest

kubectl apply -f aevum-functions.yaml or use faas-cli deploy for zero-downtime rolling updates.

Connect Slack Webhook

Point your Slack App's /aevum command to https://{gateway}/function/aevum-knowledge-worker. Enable request verification.

Need help with function debugging or Slack bot configuration? Post your stacktrace or yml in #openfaas for live support from maintainers.