Skip to content

feat: local assistant runtime contract #51

Description

@SebastianBoehler

Issue Spec: Local Agent Runtime Contract

Summary

Define the interface between the StudyOS app and a local or on-device assistant runtime. The app should not be locked to one model provider, and assistant output should be structured, permission-aware, and testable.

Goal

Enable local LLM experimentation while keeping StudyOS privacy-first and architecturally clean.

Scope

  • Define an AssistantRuntime interface.
  • Input: user text, optional context summary, available capabilities, and permission state.
  • Output: typed assistant response, proposed actions, and optional generative UI component payloads.
  • Provide a mock runtime for deterministic tests and demos.
  • Keep backend choices replaceable: local model, platform model, remote endpoint, or no model.
  • Treat LLM generation as optional and asynchronous for proactive home feed use cases.

Out Of Scope

  • Choosing a final model provider.
  • Routing student credentials through hosted middleware.
  • Giving the model unrestricted access to local app data.
  • Building full conversational memory before the core contract is proven.
  • Blocking app startup or home feed rendering on model inference.

Acceptance Criteria

  • The app can call one assistant interface regardless of runtime implementation.
  • The mock runtime can produce deterministic action/component outputs.
  • Assistant output is typed and validated before use.
  • Sensitive data passed into the runtime is explicit and minimized.
  • Unsupported runtime states fail with clear errors or graceful fallback UI.
  • The contract can support text input first and voice input later.
  • Home feed summaries can fall back to deterministic templates when the runtime is unavailable or slow.

Gates To Pass

  • Architecture gate: model/provider-specific code is behind the runtime interface.
  • Latency gate: assistant runtime work is never required for first paint of the home screen.
  • Privacy gate: data passed to the runtime is documented by category and purpose.
  • Permission gate: assistant actions require app-side permission checks before execution.
  • Reliability gate: invalid or unavailable runtime output cannot crash the app.
  • Test gate: mock runtime tests cover at least success, invalid output, and unavailable runtime.
  • Demo gate: the app can show a local/mock assistant response without network access.

Suggested Branch

feat/local-agent-contract

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions