{
  "name": "ORI Developer Portal",
  "schema_version": "2026-04-14",
  "developer_portal_base_url": "https://dev.thynaptic.com",
  "developer_portal_note": "Manifests (llms.txt, agent.json, openapi.json, tools.json) are served from the developer portal host. All authenticated API calls use runtime_base_url — not the portal host.",
  "runtime_base_url": "https://glm.thynaptic.com/v1",
  "auth": {
    "type": "bearer",
    "format": "ori.<prefix>.<secret>",
    "legacy_formats_accepted": ["glm.<prefix>.<secret>"],
    "policy": "one_key_anywhere",
    "policy_description": "A single ORI runtime key authenticates all clients and surfaces. Use headers (e.g. X-Ori-Context) for product behavior, not separate keys."
  },
  "agent_bootstrap_auth": {
    "type": "bearer",
    "format": "agb.<prefix>.<secret>",
    "description": "Agent-safe bootstrap key used only for first-party app registration."
  },
  "default_model": "oricli-oracle",
  "default_routing": "oracle_first",
  "surface_header": "X-Ori-Context",
  "env_headers": ["X-Env-OS", "X-Env-PWD", "X-Env-Project", "X-Env-Shell"],
  "timezone_header": "X-Timezone",
  "timezone_header_description": "IANA timezone name (e.g. America/New_York). When set, ORI injects the user's local time into temporal awareness for schedule-aware reasoning.",
  "default_behavior": {
    "profile": null,
    "description": "If no profile is supplied, ORI stays on her default baseline for that surface."
  },
  "version": "v2.11.0",
  "stability": "stable",
  "breaking_changes": "none expected",
  "surfaces": {
    "studio": {
      "description": "Business operator surface",
      "profiles": [
        "studio_customer_comms",
        "studio_operations",
        "studio_meetings",
        "studio_research",
        "studio_knowledge",
        "ori_north",
        "big_sister"
      ]
    },
    "home": {
      "description": "Personal and household surface",
      "profiles": [
        "home_companion",
        "home_planner",
        "home_notes",
        "home_research",
        "big_sister"
      ]
    },
    "dev": {
      "description": "Technical builder surface",
      "profiles": [
        "dev_builder",
        "dev_architect",
        "dev_debugger",
        "ori_code"
      ]
    },
    "red": {
      "description": "Security and assurance surface",
      "profiles": [
        "ori_red"
      ]
    },
    "learn": {
      "description": "Reusable learning and mastery substrate",
      "profiles": [
        "tutor_agent_profile",
        "assessment_agent_profile",
        "study_planner_profile",
        "socratic_coach_profile",
        "mastery_agent_profile"
      ]
    }
  },
  "capabilities": {
    "autonomous_agent": {
      "endpoint": "POST /v1/capabilities/agent",
      "description": "High-capability task execution via Copilot.",
      "scope": "runtime:chat"
    },
    "deep_research": {
      "endpoint": "POST /v1/capabilities/research",
      "description": "Exhaustive architectural and web research dives.",
      "scope": "runtime:chat"
    },
    "web_search": {
      "endpoint": "POST /v1/capabilities/web-search",
      "description": "Intent-aware SearXNG lookups.",
      "scope": "runtime:chat"
    },
    "web_fetch": {
      "endpoint": "POST /v1/capabilities/web-fetch",
      "description": "RAG context extraction and cleaning.",
      "scope": "runtime:chat"
    },
    "repo_report": {
      "endpoint": "POST /v1/capabilities/repo-report",
      "description": "Technical repository snapshots.",
      "scope": "runtime:chat"
    },
    "sync_identity": {
      "endpoint": "POST /v1/capabilities/sync-identity",
      "description": "Sync the active sovereign identity state.",
      "scope": "runtime:chat"
    }
  },
  "browser_automation": {
    "description": "Sovereign browser runtime (browserd) for agentic web interaction. All routes require auth.",
    "endpoints": [
      { "method": "GET", "path": "/v1/browser/health" },
      { "method": "POST", "path": "/v1/browser/sessions" },
      { "method": "POST", "path": "/v1/browser/open" },
      { "method": "GET", "path": "/v1/browser/snapshot" },
      { "method": "POST", "path": "/v1/browser/action" },
      { "method": "POST", "path": "/v1/browser/screenshot" },
      { "method": "POST", "path": "/v1/browser/state/save" },
      { "method": "POST", "path": "/v1/browser/state/load" },
      { "method": "DELETE", "path": "/v1/browser/sessions" }
    ]
  },
  "tool_planning": {
    "description": "Tool discovery and execution planning.",
    "endpoints": [
      { "method": "GET", "path": "/v1/tools" },
      { "method": "POST", "path": "/v1/tools/plan" },
      { "method": "POST", "path": "/v1/tools/execute-plan" }
    ]
  },
  "learning_substrate": {
    "description": "App-neutral MaterialToMasteryCompiler. Converts supplied user-owned material into summaries, concept graphs, flashcards, drills, quizzes, mock assessments, misconception maps, review cadence, mastery scoring, guided assistance mode, learning DAG, and cross-surface reinforcement hints.",
    "scope": "runtime:chat",
    "surface": "learn",
    "endpoint": { "method": "POST", "path": "/v1/learning/mastery/compile" },
    "client_boundary": "Clients own capture, OCR, file extraction, source storage, calendars, reminders, notifications, consent, and persistence. ORI returns structured mastery artifacts and plans."
  },
  "calm_software_primitives": {
    "description": "App-neutral retention primitives that reduce mental bookkeeping: Intent Timeline preserves why work changed, Procedural Crystallizer detects recurring workflows that may become SOPs, skills, or safe automations, and Semantic Memory Graph makes loose information recoverable without manual taxonomy maintenance.",
    "scope": "runtime:chat",
    "endpoints": [
      { "method": "POST", "path": "/v1/intent/timeline", "description": "Build preserved intent moments, intent shifts, rationale trail, current intent, and continuity packet." },
      { "method": "POST", "path": "/v1/procedural/crystallize", "description": "Detect repeated workflow patterns and return procedure, skill, automation, and observation candidates." },
      { "method": "POST", "path": "/v1/memory/semantic/graph", "description": "Build ontology-free memory nodes, edges, soft clusters, recoverability score, and retrieval plan from loose captures." }
    ],
    "client_boundary": "Clients own durable memory writes, source storage, artifact/task updates, skill registration, automation execution, scheduling, notifications, approvals, deletion policy, and external mutations."
  },
  "commitment_resource_reasoning": {
    "description": "App-neutral commitment-aware resource reasoning. Makes scarce resources, future claims, tradeoffs, and drift repair explicit without shame or regulated financial advice.",
    "scope": "runtime:chat",
    "endpoint": { "method": "POST", "path": "/v1/resources/commitment/reason" },
    "client_boundary": "Clients own source-of-truth resource records, payments, bank/account sync, approvals, scheduling, notifications, and regulated financial/legal/tax/debt/investment decisions."
  },
  "workflow_grammar_compiler": {
    "description": "App-neutral natural-language workflow compiler. Turns messy workflow intent into trigger/action graph structure with explicit approvals, failure modes, variables, dry-run plan, and readiness.",
    "scope": "runtime:chat",
    "endpoint": { "method": "POST", "path": "/v1/workflow/grammar/compile" },
    "client_boundary": "Clients own durable workflow registration, external writes, schedules, notifications, execution, credentials, permissions, and approval UX."
  },
  "sovereign_action_gateway": {
    "description": "App-neutral action-route planner for native tools, MCP providers, Zapier/Make-style rails, and future connectors. Produces ranked action candidates, approval gates, policy labels, audit/dry-run/memory plans, and route reputation hints without executing anything.",
    "scope": "runtime:chat",
    "endpoint": { "method": "POST", "path": "/v1/actions/plan" },
    "client_boundary": "Clients own provider credentials, real execution, approval UX, durable action logs, notifications, schedules, and external mutations."
  },
  "task_platform": {
    "description": "Persistent cross-session task DAGs with relational entity history. Tenant-scoped. Available to any surface or external integration. Steps form a DAG via depends_on — dependency-free steps run in parallel. Execute endpoint streams SSE step updates.",
    "scope": "runtime:chat",
    "step_actions": ["research", "fetch", "summarize", "compare", "draft", "generate", "save", "webhook"],
    "entity_kinds": ["person", "business", "vendor", "account", "unknown"],
    "event_kinds": ["message", "invoice", "booking", "call", "note", "event"],
    "endpoints": [
      { "method": "POST", "path": "/v1/tasks", "description": "Create task with optional inline steps." },
      { "method": "GET",  "path": "/v1/tasks", "description": "List tasks. Supports ?status=&surface=&session_id=&limit=&offset=" },
      { "method": "GET",  "path": "/v1/tasks/:id", "description": "Get task with steps." },
      { "method": "PATCH","path": "/v1/tasks/:id", "description": "Update title, description, status, priority, or surface." },
      { "method": "DELETE","path": "/v1/tasks/:id", "description": "Delete task and all steps." },
      { "method": "POST", "path": "/v1/tasks/:id/steps", "description": "Append a step to a task." },
      { "method": "PATCH","path": "/v1/tasks/:id/steps/:step_id", "description": "Update step status/result." },
      { "method": "DELETE","path": "/v1/tasks/:id/steps/:step_id", "description": "Remove a step." },
      { "method": "POST", "path": "/v1/tasks/:id/execute", "description": "Run step DAG. SSE stream with Accept: text/event-stream." },
      { "method": "GET",  "path": "/v1/tasks/:id/execute", "description": "Poll execution status." },
      { "method": "POST", "path": "/v1/entities", "description": "Upsert entity (name, kind, aliases)." },
      { "method": "GET",  "path": "/v1/entities", "description": "List/search entities. ?search=&kind=&limit=" },
      { "method": "GET",  "path": "/v1/entities/:id", "description": "Get entity + event history. ?event_limit=50" },
      { "method": "POST", "path": "/v1/entities/:id/events", "description": "Record event against entity." }
    ]
  },
  "memory": {
    "description": "ORI memory and knowledge retrieval.",
    "endpoints": [
      { "method": "GET", "path": "/v1/memories" },
      { "method": "GET", "path": "/v1/memories/knowledge" }
    ]
  },
  "skill_discovery": {
    "description": "List builtin .ori skills (and Go modules) for building external toggles and UIs. Public on the runtime — no API key required.",
    "endpoint": { "method": "GET", "path": "/v1/modules" }
  },
  "user_skills": {
    "description": "Tenant-scoped skill preferences and custom skill bodies (PocketBase on the runtime). Optional chat field ori_skills merges builtins + inline customs; X-Ori-Skills-Persisted + X-Ori-Skills-Scope merges saved rows for one request.",
    "scope": "runtime:chat",
    "endpoints": [
      { "method": "GET", "path": "/v1/user/ori-skills/prefs", "description": "List saved enabled builtin skill ids for a scope_id." },
      { "method": "PUT", "path": "/v1/user/ori-skills/prefs", "description": "Replace enabled builtin list for a scope_id." },
      { "method": "GET", "path": "/v1/user/ori-skills/custom", "description": "List saved custom skills for a scope_id." },
      { "method": "PUT", "path": "/v1/user/ori-skills/custom/:slug", "description": "Create or update one custom skill by slug." },
      { "method": "DELETE", "path": "/v1/user/ori-skills/custom/:slug", "description": "Delete a custom skill." }
    ]
  },
  "parallel_agent_dispatch": {
    "description": "Fan-out multiple independent agent tasks in parallel and collect results. Optimised for workloads where subtasks have no inter-dependencies.",
    "endpoints": [
      { "method": "POST", "path": "/v1/pad/dispatch", "description": "Dispatch a batch of agents in parallel." },
      { "method": "GET", "path": "/v1/pad/sessions", "description": "List PAD sessions." },
      { "method": "GET", "path": "/v1/pad/sessions/:id", "description": "Get a PAD session and its results." },
      { "method": "GET", "path": "/v1/pad/stats", "description": "Throughput metrics." }
    ]
  },
  "sovereign_goals": {
    "description": "Tick-controlled, supervised agent loops. Each execution step requires an explicit POST /:id/tick. Use for human-in-the-loop workflows or step-debuggable agentic pipelines.",
    "note": "Distinct from /v1/goals (autonomous fire-and-forget). Sovereign goals are paused between ticks.",
    "endpoints": [
      { "method": "POST", "path": "/v1/sovereign/goals", "description": "Create a sovereign goal." },
      { "method": "GET", "path": "/v1/sovereign/goals", "description": "List sovereign goals." },
      { "method": "GET", "path": "/v1/sovereign/goals/:id", "description": "Get goal state." },
      { "method": "POST", "path": "/v1/sovereign/goals/:id/tick", "description": "Advance goal by one step." },
      { "method": "DELETE", "path": "/v1/sovereign/goals/:id", "description": "Cancel goal." }
    ]
  },
  "agent_creation": {
    "description": "Natural-language agent creation. Describe what you want the agent to do and ORI returns a deployable agent manifest.",
    "endpoints": [
      { "method": "POST", "path": "/v1/agents/vibe", "description": "Create an agent from a plain-English description." }
    ]
  },
  "rules": [
    "Set the surface explicitly.",
    "Use X-Env headers for dynamic proprioception.",
    "Do not redefine ORI identity in system prompts.",
    "Let ORI carry identity, routing, and memory."
  ],
  "invariants": [
    "ORI is always the entrypoint.",
    "Oracle is mandatory; SLMs are deprecated.",
    "Surface modifies behavior, not identity.",
    "Profile is optional and only works when it belongs to the chosen surface."
  ],
  "failure_modes": [
    {
      "condition": "missing_auth",
      "result": "401"
    },
    {
      "condition": "missing_required_scope",
      "result": "403"
    },
    {
      "condition": "invalid_surface",
      "result": "ignored"
    },
    {
      "condition": "invalid_profile",
      "result": "ignored"
    },
    {
      "condition": "internal_only_lane",
      "result": "not accessible via public API"
    }
  ],
  "build_flow": [
    "Ingest manifests from https://dev.thynaptic.com/ (this portal).",
    "Point HTTP clients at runtime_base_url (https://glm.thynaptic.com/v1).",
    "Acquire an ORI API key (ori.<prefix>.<secret>).",
    "Select the surface only if product context matters.",
    "Use POST /chat/completions.",
    "Add streaming only when needed."
  ],
  "runtime_scopes": [
    "runtime:chat",
    "runtime:chat:feedback",
    "runtime:email:send",
    "runtime:models",
    "runtime:spaces",
    "runtime:workspaces",
    "runtime:*"
  ],
  "specialized_capabilities": {
    "notion_formula": "Available through ORI Studio and ORI MCP tools.",
    "self_improving_vibe_loop": "Available via POST /chat/feedback. Lets agents submit roasts/lessons to improve future ORI personality consistency.",
    "pocketbase_direct": "Available through ORI MCP tools (pb_*) for authenticated tenants."
  },
  "first_party_app_registration": {
    "endpoint": "POST /app/register",
    "product_scoped": true,
    "requires_internal_registration_token": true,
    "public_self_serve": false,
    "examples": {
      "ORI Home": [
        "runtime:chat",
        "runtime:chat:feedback",
        "runtime:email:send",
        "runtime:models",
        "runtime:spaces",
        "runtime:workspaces"
      ],
      "ORI Studio": [
        "runtime:chat",
        "runtime:chat:feedback",
        "runtime:email:send",
        "runtime:models"
      ],
      "ORI Dev": [
        "runtime:chat",
        "runtime:chat:feedback",
        "runtime:models"
      ],
      "ORI Mobile": [
        "runtime:chat",
        "runtime:chat:feedback",
        "runtime:email:send",
        "runtime:models"
      ]
    }
  }
}
