Ops Lab Playbook: Strategy Repository
Last updated: 2026-03-22
1. Purpose and when to use this
Use this module to create validated website strategies, retrieve anonymized strategy evidence, and inspect context records for planning decisions.
2. User roles and auth modes
[Operator]JWTorPAT(agent.strategy.readscope): retrieval APIs.[Operator]MCPcallers: hosted connector pathhttps://{handle}.mcp.10x.in/mcp(compat:https://ai.10x.in/mcp/{handle}/mcp).[Escalation]publish/rollback control-plane operations use Playbooks escalation boundaries and support handoff.
3. Prerequisites checklist
- Primer completed: Onboarding and API Primer
HANDLEplusJWT_TOKENorPAT_TOKENconfigured- Strategy RAG service configured (
STRATEGY_RAG_BASE_URL) for non-degraded retrieval
4. UI onboarding flow
- Open
https://app.10x.in/admin/orhttps://app.10x.in/appfor the target handle. - Navigate to
Integrations -> Strategy Repository. - Enter a query in the
Queryfield and selectQuery repository. - Inspect the returned context groups:
worked_examplesfailed_examplesapp_structure_examples
- If the UI shows
Partial results, treat the retrieval as degraded and retry with a narrower query if needed. - Use
Rebuild repository indexonly when you have the required operator/admin permission and a clear reason to refresh retrieval data.
5. What to verify in the UI
- The
Strategy Repositoryshell loads for the current handle. Query repositoryis enabled once a non-empty query is entered.- Returned results are grouped into
worked_examples,failed_examples, andapp_structure_examples. - The match count and summaries look relevant to the query.
- If
Rebuild repository indexis visible, treat it as an operator/admin maintenance action, not a routine retrieval step. - If the UI shows
Partial results, note that retrieval succeeded with degraded upstream coverage.
6. API workflow map
SRL-01:POST /v2/handles/{handle}/agent/strategy/retrieve(JWT/PAT)SRL-02:GET /v2/handles/{handle}/agent/strategy/context/{contextId}(JWT/PAT, scaffold-only in some environments)SRL-07: MCP connectorstrategy_queryvia hosted MCP transport (scaffold-only in some environments)SRL-10:POST /v2/handles/{handle}/agent/strategy(validated strategy generation with tenant-model routing + fallback)
7. cURL examples
Set module variables:
export CONTEXT_ID="ctx_example_01"
SRL-01 Retrieve strategy contexts
curl -sS -X POST "${API_BASE}/v2/handles/${HANDLE}/agent/strategy/retrieve" \
-H "authorization: Bearer ${JWT_TOKEN}" \
-H 'content-type: application/json' \
-d '{
"query": "high CTR instagram story funnel that converted",
"filters": {"channel": "instagram", "objective": "conversion"},
"limit": 10,
"minKAnon": 5
}'
SRL-10 Create validated website strategy
curl -sS -X POST "${API_BASE}/v2/handles/${HANDLE}/agent/strategy" \
-H "authorization: Bearer ${JWT_TOKEN}" \
-H 'content-type: application/json' \
-d '{
"idempotencyKey": "strategy-web-001",
"goal": "Improve website lead conversion",
"constraints": {
"channel": "web",
"objective": "conversion",
"maxRisk": "MODERATE",
"minConfidence": 0.4
},
"window": "last_30d"
}'
SRL-02 Retrieve a single context by id
curl -sS "${API_BASE}/v2/handles/${HANDLE}/agent/strategy/context/${CONTEXT_ID}" \
-H "authorization: Bearer ${JWT_TOKEN}"
8. Expected success outputs and verification checks
- SRL-01 returns
200with context clusters (worked_examples,failed_examples,app_structure_examples). - Retrieval may include a degraded marker when upstream strategy services are unavailable.
- SRL-02 either returns context details (
200) or scaffold-status (501) depending on deployment completeness. Query repositoryin the UI should surface the same result buckets as SRL-01.Rebuild repository indexis optional and role-gated; do not use it for normal read-only review.- SRL-10 returns
200with: validation.accepted=trueand deterministic warning listmodel.source(tenant_modelorfallback)- recommendation list filtered by risk/confidence constraints
9. Failure modes and remediation
401/403on retrieval:- Remediation: verify JWT/PAT auth and
agent.strategy.readscope. 400 invalid_payloadon SRL-10/SRL-01:- Remediation: fix schema errors for
goal,constraints,window, query filters, and bounds. 409 tenant_mismatchon strategy mutations:- Remediation: verify that authenticated tenant and handle tenant mapping are aligned.
501 not_implementedon SRL-02 or MCP query:- Remediation: use SRL-01 for current supported retrieval workflow.
- Empty retrieval sets:
- Remediation: broaden filters and lower strictness in query constraints.
- UI shows
Partial results: - Remediation: retry later, narrow the query, or continue with the returned worked/failed/app-structure evidence if it is sufficient for the review.
10. Async behavior notes
- Retrieval can return degraded output if RAG service is unavailable.
- Retrieval response path itself is synchronous; internal index/publish operations are handled separately in operator flows.
- Strategy generation is synchronous and policy-gated; tenant-model inference is used only when a healthy active tenant model is available, otherwise deterministic fallback is returned.
11. Related links
- Playbooks escalation boundaries (
[Escalation]strategy publish/rollback actions) - Personalization + Campaign Studio
- API Endpoint Coverage Map