links.10x.in/docs/end-user/playbooks/ops-lab-strategy-repository Published:

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] JWT or PAT (agent.strategy.read scope): retrieval APIs.
  • [Operator] MCP callers: hosted connector path https://{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
  • HANDLE plus JWT_TOKEN or PAT_TOKEN configured
  • Strategy RAG service configured (STRATEGY_RAG_BASE_URL) for non-degraded retrieval

4. UI onboarding flow

  1. Open https://app.10x.in/admin/ or https://app.10x.in/app for the target handle.
  2. Navigate to Integrations -> Strategy Repository.
  3. Enter a query in the Query field and select Query repository.
  4. Inspect the returned context groups:
  • worked_examples
  • failed_examples
  • app_structure_examples
  1. If the UI shows Partial results, treat the retrieval as degraded and retry with a narrower query if needed.
  2. Use Rebuild repository index only 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 Repository shell loads for the current handle.
  • Query repository is enabled once a non-empty query is entered.
  • Returned results are grouped into worked_examples, failed_examples, and app_structure_examples.
  • The match count and summaries look relevant to the query.
  • If Rebuild repository index is 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

  1. SRL-01: POST /v2/handles/{handle}/agent/strategy/retrieve (JWT/PAT)
  2. SRL-02: GET /v2/handles/{handle}/agent/strategy/context/{contextId} (JWT/PAT, scaffold-only in some environments)
  3. SRL-07: MCP connector strategy_query via hosted MCP transport (scaffold-only in some environments)
  4. 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 200 with 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 repository in the UI should surface the same result buckets as SRL-01.
  • Rebuild repository index is optional and role-gated; do not use it for normal read-only review.
  • SRL-10 returns 200 with:
  • validation.accepted=true and deterministic warning list
  • model.source (tenant_model or fallback)
  • recommendation list filtered by risk/confidence constraints

9. Failure modes and remediation

  • 401/403 on retrieval:
  • Remediation: verify JWT/PAT auth and agent.strategy.read scope.
  • 400 invalid_payload on SRL-10/SRL-01:
  • Remediation: fix schema errors for goal, constraints, window, query filters, and bounds.
  • 409 tenant_mismatch on strategy mutations:
  • Remediation: verify that authenticated tenant and handle tenant mapping are aligned.
  • 501 not_implemented on 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