Context Store Connectors
Use Context Store when an agent needs fast, searchable, read-only context from connector-like sources. It materializes connector records into the handle knowledge base, tracks source/entity status, and exposes read tools through API and MCP.
For OpenAnalyst and Smartwork project workflows, start with Company Context for OpenAnalyst. It explains when to use approved manual 10xKB documents, when to use Context Store, and how to keep 10Xmemory project/user memories separate from company context.
Context Store is one integration lane, not the whole connector system:
| Lane | Use it for | Do not use it for |
|---|---|---|
| Context Store | Replicated, searchable reads from docs, pages, exported records, and project context | Writes or exact real-time reads |
| Function bindings | Direct live calls to external HTTPS APIs, provider adapters, or skill-backed tools | Building a replicated searchable corpus |
| Webhooks | Event notifications that trigger external orchestration or refresh requests | Direct inbound ingestion into Context Store |
How it works
- An operator creates a handle-scoped context source.
- The source sync worker reads connector pages and writes normal knowledge documents.
- Records become searchable through
context_store_searchand direct API search. - Agents use Context Store only when source/entity status is
READYorPREVIEW. - Agents use direct function bindings or provider tools for writes, missing entities, or real-time freshness.
The handle is always the authorization boundary. projectId narrows search within the handle; it never grants access across handles.
Connector scopes
10xDotIn exposes connector facade objects at two explicit scopes:
| Scope | Route family | Use for |
|---|---|---|
| Handle | /v2/handles/{handle}/connectors | Shared handle-level sources such as website crawls, brand knowledge, account-level credentials, and global Context Store sources. |
| Project | /v2/handles/{handle}/projects/{projectId}/connectors | SmartWork/OpenAnalyst project runtime sources with project-specific entity selection, search, sync state, and permissions. |
Handle-scoped connectors are not automatically visible inside a project. A project must explicitly attach or create its own scoped connector before a project-scoped agent can use it.
curl -sS "${API_BASE}/v2/handles/${HANDLE}/connectors" \
-H "authorization: Bearer ${JWT_TOKEN}"
curl -sS -X POST "${API_BASE}/v2/handles/${HANDLE}/connectors/ctx_src_global/search" \
-H "authorization: Bearer ${JWT_TOKEN}" \
-H "content-type: application/json" \
-d '{
"entity": "pages",
"query": "pricing",
"limit": 5
}'
Auth and scopes
| Surface | Route or tool | Auth |
|---|---|---|
| Create/list/delete source | /v2/handles/{handle}/context-sources* | JWT, handle role CREATOR+ for reads and OPERATOR+ for writes |
| Search Context Store | POST /v2/handles/{handle}/context-store/search | JWT, handle role CREATOR+ |
| Handle connector facade | /v2/handles/{handle}/connectors* | JWT or PAT with mcp.connect, connectors.read, and search scope when searching |
| Project connector facade | /v2/handles/{handle}/projects/{projectId}/connectors* | JWT or PAT with mcp.connect, connectors.read, and search scope when searching |
| MCP search/status | context_store_search, context_store_status | mcp.connect plus context_store.search |
| MCP refresh | context_source_sync | mcp.connect plus context_store.manage |
Create sources
Set environment variables:
export API_BASE="https://ai.10x.in"
export HANDLE="acme"
export JWT_TOKEN="<jwt-token>"
Web crawl
Use web_crawl for configured public pages.
curl -sS -X POST "${API_BASE}/v2/handles/${HANDLE}/context-sources" \
-H "authorization: Bearer ${JWT_TOKEN}" \
-H "content-type: application/json" \
-d '{
"sourceId": "docs_site",
"projectId": "proj_launch",
"connectorKey": "web_crawl",
"selectedEntities": ["pages"],
"refreshPolicy": { "mode": "manual" },
"config": {
"urls": [
"https://example.com/docs",
"https://example.com/pricing"
],
"pageSize": 10
}
}'
Expected outcome: 201 with source, entities, and syncQueued.
GitHub docs
Use github_docs for repository docs or source files supplied as raw URLs or inline file records.
curl -sS -X POST "${API_BASE}/v2/handles/${HANDLE}/context-sources" \
-H "authorization: Bearer ${JWT_TOKEN}" \
-H "content-type: application/json" \
-d '{
"sourceId": "repo_docs",
"projectId": "proj_launch",
"connectorKey": "github_docs",
"selectedEntities": ["documents", "code"],
"config": {
"rawUrls": [
"https://raw.githubusercontent.com/acme/app/main/README.md",
"https://raw.githubusercontent.com/acme/app/main/src/catalog.ts"
],
"pageSize": 25
}
}'
Markdown-like paths are indexed as documents; other files are indexed as code.
Upstream MCP resource exports
Use upstream_mcp_resource for read-only exported records from an upstream resource. In v1, this connector materializes provided records or resource URLs. It does not carry provider credentials, call arbitrary remote MCP tools, or proxy upstream MCP sessions.
curl -sS -X POST "${API_BASE}/v2/handles/${HANDLE}/context-sources" \
-H "authorization: Bearer ${JWT_TOKEN}" \
-H "content-type: application/json" \
-d '{
"sourceId": "crm_export",
"connectorKey": "upstream_mcp_resource",
"selectedEntities": ["records"],
"config": {
"records": [
{
"id": "acct_123",
"entity": "records",
"title": "Acme renewal account",
"content": "Renewal owner: Maya. Contract renewal date: 2026-07-01.",
"fields": {
"accountId": "acct_123",
"stage": "renewal"
}
}
],
"pageSize": 50
}
}'
For live CRM writes or real-time account lookup, use a provider-backed function binding instead of putting credentials in a context-source config.
Check status and refresh
curl -sS "${API_BASE}/v2/handles/${HANDLE}/context-sources" \
-H "authorization: Bearer ${JWT_TOKEN}"
curl -sS "${API_BASE}/v2/handles/${HANDLE}/context-sources/repo_docs/entities" \
-H "authorization: Bearer ${JWT_TOKEN}"
curl -sS -X POST "${API_BASE}/v2/handles/${HANDLE}/context-sources/repo_docs/sync" \
-H "authorization: Bearer ${JWT_TOKEN}" \
-H "content-type: application/json" \
-d '{}'
Status values:
| Status | Meaning |
|---|---|
LOADING | Source was created and initial work is queued |
BUILDING_PREVIEW | Worker is reading first records |
PREVIEW | Partial records are searchable before full completion |
UPDATING | Manual or scheduled refresh is in progress |
READY | Selected entities completed |
FAILED | One or more entities failed; previous searchable data is preserved |
DISABLED | Source was deleted/disabled and indexed inventory is tombstoned |
Search
Structured listing:
curl -sS -X POST "${API_BASE}/v2/handles/${HANDLE}/context-store/search" \
-H "authorization: Bearer ${JWT_TOKEN}" \
-H "content-type: application/json" \
-d '{
"projectId": "proj_launch",
"sourceId": "repo_docs",
"entity": "documents",
"fields": ["title", "preview", "documentId", "metadata"],
"limit": 10
}'
Text search:
curl -sS -X POST "${API_BASE}/v2/handles/${HANDLE}/context-store/search" \
-H "authorization: Bearer ${JWT_TOKEN}" \
-H "content-type: application/json" \
-d '{
"projectId": "proj_launch",
"entity": "documents",
"query": "How does the repo configure catalog routes?",
"limit": 5
}'
Responses include executionPath: "context_store" and source status metadata so agents can explain whether they used replicated context or should fall back to a direct request.
MCP usage
Grant the connector:
mcp.connectcontext_store.searchcontext_store.manageonly when the assistant should be allowed to request refreshesbinding.invoke:*orbinding.invoke:{bindingKey}when the assistant should call direct function bindings
Useful prompts:
- "Check Context Store status for this handle before answering from connector data."
- "Search project
proj_launchContext Store records for deployment runbook requirements." - "If the source is not READY or PREVIEW, use the live provider binding instead."
- "Refresh source
repo_docs, then report the source/entity status."
Pair with function bindings
Use this pairing when a connector has both a searchable corpus and live operations:
| Need | 10x surface |
|---|---|
| Search previously synced docs, pages, records, or code | Context Store |
| Fetch a record that must be current to the second | Function binding or direct provider tool |
| Create/update/delete external state | Function binding or direct provider tool |
| Explain which data path was used | Include executionPath and source/entity status in the agent response |
Provider-backed bindings are the recommended way to expose a stable external HTTPS API as hosted MCP tools. Context Store should reference only read-only source config and replicated content.
Use webhooks to trigger refreshes
10x webhooks are outbound event deliveries. They do not write directly into Context Store. A webhook-assisted refresh uses your receiver or automation worker as the bridge:
- 10x sends an outbound webhook event to your HTTPS receiver.
- Your receiver decides which source is stale.
- Your receiver calls the MCP sync route with a PAT that has
mcp.connectandcontext_store.manage. - The Context Store worker refreshes asynchronously.
Example receiver action:
export PAT_TOKEN="patv1_<tokenId>.<secret>"
export SOURCE_ID="repo_docs"
curl -sS -X POST "${API_BASE}/v2/mcp/${HANDLE}/context-store/sources/${SOURCE_ID}/sync" \
-H "authorization: Bearer ${PAT_TOKEN}" \
-H "content-type: application/json" \
-d '{}'
For provider-originated webhooks, terminate and verify the provider webhook in your own receiver first, then call the same Context Store sync route. Do not put provider webhook secrets into a Context Store source.
Related
Updated Jun 19, 2026
