- For developers
- knowledge base
- facilities
- api
- ai agents
Office and building knowledge base for AI assistants
Film a building once and let AI assistants answer "where is the water shut-off?" with cited records: key locations, coverage checklist, search and ask.
To give AI assistants a knowledge base of a building or office, film each space once with Space Context. The video becomes a Space Document whose key locations (fuse box, water shut-off, boiler, extinguisher, router) record where things are, with the frames that show them; GET /v1/search finds a record across every building in any language, and POST /v1/spaces/{id}/ask answers from one space with citations, or says the answer is not documented. A coverage checklist tells you which key locations the recording never showed, so the next walkthrough can fill the gaps.
In short
- Key locations are records of their own:
kind,label, area,location,notes, evidence frames. coverage.checklistchecks every frame for the key locations of the type of space (eight for a home); “not seen” means “not filmed”.- Search spans all your spaces, works across languages with a live key and never returns a sensitive value.
askreturns a short answer with cited records and their frames, ordocumented: false.- Staff reach it through the MCP server in Claude or ChatGPT; your tools through the REST API, the SDK or an exported Agent Skill.
Why build a building knowledge base from video?
The questions people ask facilities teams are mostly “where”: where the water shut-off is, which cupboard holds the fuse box, where the spare toner, the ladder or the first-aid kit live. Floor plans rarely answer them, and the person who knows is not always on site. A walkthrough captures both what the camera sees and what that person says while walking (“the stopcock is behind the cleaning cart”). Space Context turns the two into records an agent can quote and point to, which is the idea behind a context layer for the physical world.
What does Space Context record about where things are?
Every Space Document has a key_locations list. Each entry has a kind (water_shutoff, electrical_panel, gas_shutoff, water_heater, heating_control, router, fire_extinguisher, smoke_detector, emergency_exit, keys, meters, alarm_panel and more), a label, the area it is in, where in that area (location), notes, and evidence: the frames that show it, each with its time in the video.
These are the two key locations of the demo space, a real one-bedroom apartment in Brisbane scanned through the API (photos by Chris Olszewski on Wikimedia Commons, CC BY-SA 4.0; the demo’s narration is invented):
"key_locations": [
{ "id": "loc_1", "kind": "electrical_panel", "label": "Fuse box", "area_id": "room-33614ab5-1",
"location": "In the hallway cupboard behind the coats", "notes": null, "evidence": [], "confidence": 0.99 },
{ "id": "loc_2", "kind": "water_shutoff", "label": "Main water shutoff valve", "area_id": "room-33614ab5-3",
"location": "Under the bathroom sink", "notes": null, "evidence": [], "confidence": 0.99 }
]Note the empty evidence. The narrator said where both are, but the camera never showed them, so the records exist without a photo. Items help with “where” questions too: each has a location inside its area and aliases, the names people use. The demo’s bathroom heater is a “Portable fan heater” with the aliases “portable heater”, “fan heater” and “space heater”, so any of the three finds it.
How do you know what the recording missed?
In a scan made through the API, the CLI or the console, every frame is checked for the key locations of the type of space before any model describes the footage. For a home they are eight: electrical_panel, water_shutoff, water_heater, smoke_detector, fire_extinguisher, router, heating_control, gas_meter; offices, shops, warehouses, garages, vehicles, campers, boats and appliances each have their own list (GET /v1/capture-profiles). The result is coverage.checklist, with each kind seen or not (probability of at least 0.7), and its best frames. Four of the eight entries from the demo’s check-out scan, a flat:
"checklist": [
{ "kind": "electrical_panel", "seen": false, "probability": 0.06, "evidence": [] },
{ "kind": "water_shutoff", "seen": false, "probability": 0.06, "evidence": [] },
{ "kind": "smoke_detector", "seen": false, "probability": 0.6, "evidence": [] },
{ "kind": "router", "seen": false, "probability": 0.14, "evidence": [] }
]Not seen means not filmed, not absent: the narration puts the fuse box behind the coats, and the camera never showed it. The same document’s coverage.warnings says it in words (“The main water shutoff valve under the bathroom sink was not directly visible.”), and coverage.not_documented lists what a reader would expect but the video did not show. For a knowledge base, that list is the to-do for the next walkthrough.
You can catch gaps before paying for a scan. POST /v1/frames/check looks at one frame in about half a second and says whether it is usable and which key locations it shows; the CLI runs it over a folder:
npx spacecontext check ./photosChecks are free within 2,000 a day per account and need a key with scans:write; nothing is stored. An app that guides a person through a building can show the checklist filling in as they walk (guided capture).
How does search across buildings work?
GET /v1/search looks across every space the key can read. With a free test key it searches the demo:
curl "https://api.spacecontext.app/v1/search?q=water+shut-off&limit=2" \
-H "Authorization: Bearer $SPACECONTEXT_API_KEY"{
"object": "search_results",
"query": "water shut-off",
"data": [
{ "space_id": "spc_demo", "space_name": "Brisbane apartment", "scan_id": "scn_demo",
"record_type": "key_location", "record_id": "loc_2", "title": "Main water shutoff valve", "area": "Bathroom",
"text": "Main water shutoff valve (water shutoff). in Bathroom. Under the bathroom sink", "score": 9 },
{ "space_id": "spc_demo", "space_name": "Brisbane apartment", "scan_id": "scn_demo",
"record_type": "qa", "record_id": "qa_9", "title": "Where is the main water shutoff valve?", "area": "Bathroom",
"text": "Q: Where is the main water shutoff valve? A: It is under the bathroom sink.", "score": 6 }
]
}Test keys rank the demo’s records lexically, without a model, which is why the scores are whole numbers. With a live key, search is semantic, using multilingual embeddings and a reranker: “rubinetto dell’acqua” finds “water shut-off valve”, and a question about “the ladder” finds “Aluminium step ladder” in whichever building it was filmed. Records searched are items, areas, issues, key locations, instructions, facts and Q&A; add space_id to stay in one space. The index holds only redacted content, so a result never contains a password or a code, whatever the key’s scopes.
How does ask answer with citations?
ask answers one question from one space:
curl -X POST https://api.spacecontext.app/v1/spaces/spc_demo/ask \
-H "Authorization: Bearer $SPACECONTEXT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "Where is the water shut-off?"}'The test key’s answer from the demo:
{
"object": "answer", "space_id": "spc_demo", "scan_id": "scn_demo",
"question": "Where is the water shut-off?",
"answer": "The main water shutoff valve is in the Bathroom, under the bathroom sink.",
"documented": true,
"citations": [
{ "record_type": "key_location", "record_id": "loc_2", "title": "Main water shutoff valve", "area": "Bathroom", "evidence": [] }
]
}Ask the same space “Is there a fire extinguisher?” and you get "documented": false with “This is not documented in this space.”, because no record mentions one. With a live key, a model writes the answer from the records it is given, and the citations are checked: an id the model was not given is dropped, and an answer without a valid citation comes back as documented: false. When a cited record was filmed, its evidence carries signed frame URLs, so the assistant can show the photo of the valve, not just describe it. Questions are up to 500 characters, 20 a minute and 200 answered a day per account.
You can run every request on this page for free. Get a free test key, then point the commands at spc_demo.
How do you put it in front of staff and tools?
Facility staff, in the assistant they already use. Add the Space Context MCP server (https://mcp.spacecontext.app/mcp) to Claude, ChatGPT, Cursor or VS Code. The connection is read-only by default. Its where_is prompt finds a thing with search_spaces, then ask_space, answers with the area and location as recorded, and offers the evidence photo.
Your own helpdesk bot or app, through the SDK (@spacecontext/sdk, Node.js 22.12+, Deno, Cloudflare Workers):
import { SpaceContext } from '@spacecontext/sdk';
const sc = new SpaceContext({ apiKey: process.env.SPACECONTEXT_API_KEY });
const { data } = await sc.search('spare light bulbs', { limit: 5 });
const answer = await sc.spaces.ask('spc_…', 'Is there a dishwasher?');Keeping your systems in step. A scan.completed webhook tells your server when a re-scan lands, and external_id on a space (up to 128 characters) stores your own building or asset id.
Offline agents. npx spacecontext skill spc_… --out ~/.claude/skills/hq-floor-2 writes a space as an Agent Skill folder, with references/key-locations.md among its files, for agents that read skills.
The right key for the job. Give an answering assistant a key with spaces:read only. Without spaces:sensitive, alarm codes, Wi-Fi passwords and the location of keys are withheld from documents, answers and exports. Text in a video that tries to give orders to an AI is withheld too (prompt injection from the physical world).
How should you model a portfolio of buildings?
A space is a place you can walk in one recording: a video is up to 4 GB and 10 minutes, or up to 120 photos. That suggests one space per floor, plant room or unit rather than one per campus. Set space_type (office, warehouse, shop, garage and others), name spaces the way staff say them (“HQ, 2nd floor”), and narrate the “where” while you film: the cupboard, the riser, the shelf.
Buildings change. Scan the same space again after works, and the new scan is checked against the previous one; GET /v1/spaces/{id}/diff lists what moved, appeared or is confirmed gone, keeping what the camera simply did not show apart (how comparisons work). An account can create 200 spaces a day and run 10 scans at once (more on request).
What does it cost?
Test keys are free: the demo space, no model, no charge. The first live scan of an account is free once a card is on file (adding it charges nothing); after that, each live scan costs $1.00 from prepaid credit, and failed scans are refunded to the balance. Reading, search and answers are included.
Try it on the demo, then film your first floor
Run the search and ask calls above against spc_demo, check the coverage checklist, then scan one real floor and ask it where the shut-off is. Get a free test key in the console.
FAQ
Can an AI assistant tell staff where the water shut-off is?
Yes, if the walkthrough recorded it. Space Context stores it as a key location with its area, its place and the frames that show it; ask answers from that record and cites it, and says the answer is not documented when the records don't contain it.
What if the video mentioned the fuse box but never showed it?
The key location is still recorded from the narration, without evidence frames, and the document's coverage says it was not shown. The coverage checklist marks it as not seen, which is a hint to film it in the next recording.
Does search work across buildings and languages?
Yes, with a live key. GET /v1/search looks across every space your key can read, with multilingual embeddings and a reranker, so a question in Italian finds an English record; test keys search the demo space lexically. It has 20 requests a minute and 1,000 a day per account.
Can a facilities assistant read alarm codes or where keys are kept?
Not unless its key has the spaces:sensitive scope, which is never granted by default. Without it, sensitive values and the location of keys are withheld, and the search index never contains them.
What does it cost to try?
A test key is free and works on the demo space with no model involved. The first live scan of an account is free once a card is on file, then each live scan costs $1.00 from prepaid credit; reading, search and answers are included.