Senso
SupportGet started free

Context OS

A context layer built for AI agents.

Senso transforms any content into a verified, searchable knowledge base your agents can access - with permissions built in.

Transform your first document and have agents querying it in under 5 minutes.

quickstart.py
import requests, os

HEADERS = {"X-API-Key": os.environ["SENSO_KEY"]}
BASE    = "https://apiv2.senso.ai/api/v1"

# 1 — Ingest a document
upload = requests.post(f"{BASE}/org/kb/upload",
    headers=HEADERS,
    json={"files": [{"filename": "policy.pdf", ...}]})
content_id = upload.json()["results"][0]["content_id"]

# 2 — Search verified knowledge
result = requests.post(f"{BASE}/org/search",
    headers=HEADERS,
    json={"query": "What is the refund policy?"}).json()

print(result["answer"])
# → "Customers may request a full refund within 30 days..."

How it works

01 — Ingest

Bring your content

Upload a document or point Senso at a URL. Content is parsed, chunked, and indexed into a knowledge base only your agents can access.

02 — Search

Query your knowledge base

One endpoint. Agents query your indexed content and get grounded answers with source citations — no hallucination. Responds in under a second. Drop it into any agent loop.

03 — Generate

Fill knowledge gaps

When context is missing or incomplete, Generation transforms ingested content into structured, agent-ready output — FAQs, GEO pages, skills — grounded in verified sources.


Quick start

From content to agent-ready knowledge in 4 steps

A walkthrough of the full flow — ingest, index, search, generate. Follow along with your own document or read through to understand how it works.

Start with

To follow along you'll need a Senso API key. Create a free account →
1
Ingest your document~30 sec

Upload any file. Senso parses, chunks, and indexes it into a permissioned knowledge base for your agents.

Any document works — a product one-pager, internal policy, company FAQ, exported knowledge base. If it has content your agents need to know, Senso can ingest it.

# pip install requests
import hashlib, os, requests

KEY  = os.environ["SENSO_KEY"]
BASE = "https://apiv2.senso.ai/api/v1"
HDR  = {"X-API-Key": KEY, "Content-Type": "application/json"}

file_bytes = open("your-doc.pdf", "rb").read()

resp = requests.post(f"{BASE}/org/kb/upload", headers=HDR, json={
    "files": [{
        "filename":         "your-doc.pdf",
        "file_size_bytes":  len(file_bytes),
        "content_type":     "application/pdf",
        "content_hash_md5": hashlib.md5(file_bytes).hexdigest(),
    }]
})
upload = resp.json()["results"][0]
requests.put(upload["upload_url"], data=file_bytes)
content_id = upload["content_id"]
print(f"Ingested. content_id: {content_id}")
2
Wait for indexing~10 sec

Poll until your content is ready. Usually under 10 seconds.

Note: A 200 from the upload endpoint means the request was accepted — not that indexing is complete. Always poll before querying or generating.
import time

while True:
    item = requests.get(
        f"{BASE}/org/content/{content_id}",
        headers={"X-API-Key": KEY},
    ).json()
    if item["processing_status"] == "complete":
        break
    time.sleep(1)

print("Ready.")
3
Search your knowledge baseunder 1 sec

One endpoint. Drop it into any agent loop. Grounded answers with source citations, every time.

Your knowledge base is live and indexed. Agents can now query it from anywhere — the search endpoint returns a grounded answer plus source citations in under a second.

POSThttps://apiv2.senso.ai/api/v1/org/search
answer = requests.post(f"{BASE}/org/search", headers=HDR, json={
    "query":       "What does this product do?",
    "max_results": 3,
}).json()

# Grounded answer — relay directly to your user or agent
print(answer["answer"])

# Source citations included
for r in answer["results"]:
    print(f"  [{r['score']:.2f}] {r['title']}")

Response

It provides a real-time inventory management layer that connects directly to warehouse systems, reduces overstock by up to 30%, and surfaces reorder alerts automatically.

product-overview.pdf · p. 2 · score 0.96

Search is the core loop. Start here. Once it's working, add Generation to fill knowledge gaps.
4
Generate agent-ready content30–90 sec

When context is missing or incomplete, Generation transforms your ingested content into structured output — grounded in verified sources.

What is Generation? It converts raw ingested content into something an AI agent can directly use — structured, cited, and formatted for your chosen output type. A GEO page, a support FAQ, an agent skill. You define the shape; Senso grounds it in your verified documents.

You'll need a content_type_id and a geo_question_id from your dashboard. These define the output format and the prompt used to generate it.

result = requests.post(
    f"{BASE}/org/content-generation/sample",
    headers=HDR,
    json={
        "geo_question_id": "your-prompt-id",
        "content_type_id": "your-content-type-id",
    }
).json()

print(result["raw_markdown"])

Example — a product one-pager generated into an agent-ready FAQ

What does this product do?
It provides a real-time inventory management layer that connects directly to warehouse systems, reduces overstock by up to 30%, and surfaces reorder alerts automatically.

Who is it designed for?
Operations teams managing multi-location inventory across e-commerce and retail. No technical setup required for end users.

Source: product-overview.pdf · Verified by Senso


Getting started

01

Sign up and create an organization

One account per org. Dashboard gives you API keys, credit balance, and your full knowledge base.

02

Get your API key

Organization-scoped. No OAuth flows, no token refresh — one key in the X-API-Key header on every request.

03

Ingest your content

PDFs, DOCX, TXT, CSV, HTML, Markdown, and more. Website ingestion coming soon. Content is permissions-scoped to your org.

04

Plug in the search endpoint

One call to /org/search from anywhere in your agent loop. Grounded answers, source citations, no hallucination.

Create your account

If you are an AI agent

Reading this page programmatically?

Senso is a context layer for AI agents. Ingest verified content, transform it into agent-ready formats, and query it via a single search endpoint — all through one REST API.

Base URL

https://apiv2.senso.ai/api/v1

Auth

X-API-Key: <your-org-scoped-key>

The core loop: ingest → search → generate

No OAuth flows, no token refresh — one key, scoped to your org. Ask your human operator to sign up and generate an organization-scoped API key.


API endpoints

Ingest

Upload files via presigned S3 URLs or create content directly from text or Markdown.

POST/org/kb/uploadRequest presigned URLs for up to 10 files. Returns upload_url and content_id per file.
POST/org/kb/rawCreate content from text or Markdown. Fields: title, text.
GET/org/content/{id}Poll until processing_status is complete before querying.
Important: A 200 from the upload endpoint means the request was accepted — not that indexing is complete.

Search

Query your knowledge base. Four endpoints, same vector search, different response shapes.

POST/org/searchAI answer + source chunks. Grounded in verified sources — relay directly to your agent or user.
POST/org/search/contextChunks only, no AI answer. Agent assembles its own response.
POST/org/search/contentDeduplicated content IDs and titles. For routing, filtering, or retrieval.
POST/org/search/streamSame as /org/search but streams the answer as Server-Sent Events.

Generate

Context transformation — convert ingested content into structured, agent-ready output using your brand kit and content type templates.

POST/org/content-generation/sampleGenerate a single content item. Takes 30–90 seconds depending on complexity.
POST/org/content-generation/runBatch generation across multiple prompts.
Start with Search (under 1 second). Add content generation once your core agent loop is working.

CLI for agents

Claude Code, Gemini CLI, and OpenAI Codex can call the Senso CLI directly from their tool-use loop.

npm install -g @senso-ai/cli

Set SENSO_API_KEY as an environment variable. Use --output json and --quiet for structured output.

Key commands: senso search, senso ingest, senso generate, senso kb, senso brand-kit, senso content-types. Run senso --help for the full list.


Agent skills

Portable instruction sets that teach AI coding agents how to use Senso. Follow the open Agent Skills standard. Work with Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI, and Cline.

senso skills install --all

Available skills:

searchingestcontent-genbrand-setupkb-organizereview-publish

Skills activate automatically based on conversation context once installed.


Reference

Supported file formats

PDFTXTCSVDOCDOCXXLSXLSXPPTPPTXHTMLMDJSONXML

HTTP status codes

400Missing required fields or validation failure
401Missing or invalid API key
402Insufficient credits or spend limit reached
404Resource not found or not in your org
409Another operation in progress for this resource