A Context OS is a unified knowledge layer for your application: it ingests documents, emails, and web content, normalizes them into schema-safe data, and exposes rule-driven webhooks—enabling developers to add AI agents, chatbots, or workflow automations with minimal integration effort and immediate, reliable context.

SOURCE → SENSO WORKSPACE → DESTINATION

ZoneWhat you doKey endpoints / notes
SOURCEPoint any raw input at SensoPOST /content/* — files, single pages, full-site crawls• POST /conversations — calls, chats, support-email threads
SENSO WORKSPACEIndex, label, transform, and route the data/search, /generate — query / transform• /rules, /rules/{id}/values — define classifications (“BUG”, “FEATURE”)• /triggers + /webhooks — fire actions when a rule value matches
DESTINATIONReceive clean JSON and act on itAny endpoint you register as a webhook (GitHub, HubSpot, Gmail, Slack, DB, etc.) — Senso posts directly to it

Now we’re going to walk through the simplest end-to-end flow:

  1. Upload content (our “Hello World” text) so Senso has something to work with.
  2. Create a rule that flags any content containing the word HELLO.
  3. Register a webhook (point it at RequestBin, Hookdeck, or any public URL).
  4. Link a trigger so that every HELLO hit instantly calls your webhook.
  5. (Bonus) Run a quick search and generate to prove the Workspace can answer questions and transform text.

Paste the snippet below (after exporting SENSO_KEY) and you’ll see the complete Source → Workspace → Destination loop in action—ready to copy-paste for your own use case.

import os, requests

API  = "https://sdk.senso.ai/api/v1"
HDR  = {
    "Authorization": f"Bearer {os.environ['SENSO_KEY']}",
    "Content-Type": "application/json"
}

# 1) SOURCE – upload a tiny text file
hello = "Hello World!  Senso makes context easy."
cid = requests.post(
    f"{API}/content/raw",
    headers=HDR,
    json={"title": "hello.txt", "body": hello}
).json()["content_id"]

# 2) WORKSPACE – create rule + value (“HELLO”)
rule_id = requests.post(
    f"{API}/rules",
    headers=HDR,
    json={"name": "Hello detector", "type": "classification", "target": "all"}
).json()["rule_id"]

requests.post(
    f"{API}/rules/{rule_id}/values",
    headers=HDR,
    json={"value": "HELLO"}         # rule_value_id = "HELLO"
)

# 3) DESTINATION – register a webhook (e.g., RequestBin URL)
webhook_id = requests.post(
    f"{API}/webhooks",
    headers=HDR,
    json={
        "name": "EchoBin",
        "url": "https://webhook.site/your-id",
        "auth": {"type": "none"}
    }
).json()["webhook_id"]

# 4) WORKSPACE – link trigger (value → webhook)
requests.post(
    f"{API}/triggers",
    headers=HDR,
    json={
        "name": "Echo on HELLO",
        "rule_id": rule_id,
        "rule_value_id": "HELLO",
        "webhook_id": webhook_id
    }
)

# 5) Optional: query and transform
answer = requests.post(
    f"{API}/search",
    headers=HDR,
    json={"question": "What does the file say?"}
).json()["answer"]
print("Search answer →", answer)

cap = requests.post(
    f"{API}/generate",
    headers=HDR,
    json={
        "prompt": "Return the text in ALL CAPS",
        "filter": {"content_ids": [cid]}
    }
).json()["generated_text"]
print("Generated text →", cap)

print(f"\nRule + trigger armed. Any new content containing 'HELLO' "
      f"will POST to your webhook ({webhook_id}) 🚀")

Prerequisite

Ensure you have received the “Your Senso Platform Access” email containing your unique API key and access domain. Contact [email protected] if you require assistance.

Sample Projects