Skip to main content

ScopesResource

Bases: object Full CRUD access to Modus scopes. mgmt.scopes.list() → page of scopes mgmt.scopes.get(scope_id) → scope (with variation fields) mgmt.scopes.create(name, ...) → scope mgmt.scopes.update(scope_id, ...) → scope mgmt.scopes.deploy(scope_id) → scope mgmt.scopes.delete(scope_id) → None mgmt.scopes.conversations(scope_id).list() → page of conversations mgmt.scopes.conversations(scope_id).get(tid) → conversation

conversations()

Return the conversations sub-resource scoped to scope_id.

memories()

Return the memories sub-resource scoped to scope_id.

evaluations()

Return the evaluations sub-resource scoped to scope_id.

supervision()

Return the supervision sub-resource scoped to scope_id.

list()

List all Modus scopes in the organisation.
  • Parameters:
    • page_size – Maximum number of items to return (default 25).
    • page_token – Token from a previous page’s next_page_token; omit for the first page.
    • search – Case-insensitive substring filter on the scope name.
    • view – Variation view — "active" (deployed) or "draft".
    • manager_id – Return only scopes supervised by this manager scope id.

get()

Retrieve a Modus scope with full configuration (instructions, model, and related fields).

create()

Create a new Modus scope in the organisation.
  • Parameters: guardrails – Runtime guardrail labels (for example "no-pii"). When set, the scope is created with these labels under the organisation default sharing rules. Omit (None) to create with no guardrails. ACL fields cannot be set from the SDK.

update()

Update a Modus scope’s configuration. Only the fields you pass are changed. To clear a field, name it in update_mask (a comma-separated list of field names) and leave its argument unset — the server sets each masked field to null and leaves fields not named in the mask untouched.
  • Parameters: guardrails – Runtime guardrail labels to set on the scope. Fetches the current scope first and merges these labels into its access configuration (an extra get request). Omit (None) to leave guardrails unchanged. Pass [] to clear all guardrails.

deploy()

Publish the current draft of a Modus scope.
  • Parameters: scope_id – Scope to publish.
  • Returns: The scope with its newly published configuration.

delete()

Delete a Modus scope.
  • Parameters: scope_id – Scope to remove.

request_ownership_transfer()

Start transferring ownership of a scope to another organisation member.

cancel_ownership_transfer()

Cancel a pending scope ownership transfer.

accept_ownership_transfer()

Accept a pending scope ownership transfer.

restore()

Restore a deleted scope.

patch_mcp_config()

Update MCP server configuration for a scope.

get_variation()

Retrieve a historic version snapshot of a scope.

AsyncScopesResource

Bases: object

conversations()

Return the conversations sub-resource scoped to scope_id.

memories()

Return the memories sub-resource scoped to scope_id.

supervision()

Return the supervision sub-resource scoped to scope_id.

list()

List all Modus scopes in the organisation.
  • Parameters:
    • page_size – Maximum number of items to return (default 25).
    • page_token – Token from a previous page’s next_page_token; omit for the first page.
    • search – Case-insensitive substring filter on the scope name.
    • view – Variation view — "active" (deployed) or "draft".
    • manager_id – Return only scopes supervised by this manager scope id.

get()

Retrieve a Modus scope with full configuration (instructions, model, and related fields).

create()

Create a new Modus scope in the organisation.
  • Parameters: guardrails – Runtime guardrail labels (for example "no-pii"). When set, the scope is created with these labels under the organisation default sharing rules. Omit (None) to create with no guardrails. ACL fields cannot be set from the SDK.

update()

Update a Modus scope’s configuration. Only the fields you pass are changed. To clear a field, name it in update_mask (a comma-separated list of field names) and leave its argument unset — the server sets each masked field to null and leaves fields not named in the mask untouched.
  • Parameters: guardrails – Runtime guardrail labels to set on the scope. Fetches the current scope first and merges these labels into its access configuration (an extra get request). Omit (None) to leave guardrails unchanged. Pass [] to clear all guardrails.

deploy()

Publish the current draft of a Modus scope. See the sync deploy for argument details.

delete()

Delete a Modus scope. See the sync delete for argument details.

request_ownership_transfer()

Start transferring ownership of a scope to another organisation member.

cancel_ownership_transfer()

Cancel a pending scope ownership transfer.

accept_ownership_transfer()

Accept a pending scope ownership transfer.

restore()

Restore a deleted scope.

patch_mcp_config()

Update MCP server configuration for a scope.

get_variation()

Retrieve a historic version snapshot of a scope.

ScopeConversationsResource

Bases: object

list()

List conversation threads for this scope, newest first.
  • Parameters:
    • page_size – Maximum number of items to return (default 25).
    • page_token – Token from a previous page’s next_page_token; omit for the first page.

get()

Retrieve a conversation thread with its full message history.
  • Parameters: thread_id – Conversation thread ID.

ScopeMemoriesResource

Bases: object

list()

List memories stored for this scope.
  • Parameters:
    • page_size – Items per page (default 25).
    • page_token – Token from a previous page’s next_page_token.
    • user_id – Optional end-user scope when memories are scoped per user.
Search this scope’s memories by natural-language query.
  • Parameters: request – Query text and optional user_id / limit.

update()

Update one memory. Requires manage permission on the scope.
  • Parameters:
    • memory_id – Id from list or search.
    • update – Fields to change (memory and/or metadata).
    • update_mask – Optional comma-separated field names to update.

delete()

Delete one memory (idempotent 204).

ScopeEvaluationsResource

Bases: object

get_config()

Return the evaluation configuration for this scope.

update_config()

Update evaluation settings for this scope.
  • Parameters: update – Fields to change (schedule, test cases, etc.).
  • Returns: The updated evaluation configuration.

trigger_run()

Start an on-demand evaluation run for this scope.
  • Returns: Response with the new run id.

list_runs()

List evaluation runs for this scope.
  • Parameters:
    • page_size – Items per page (default 25).
    • page_token – Token from a previous page’s next_page_token.
  • Returns: Page of evaluation runs.

get_run()

Retrieve one evaluation run with full results.
  • Parameters: run_id – Id from list_runs or trigger_run.
  • Returns: Run metadata and per-test-case results.

ScopeSupervisionResource

Bases: object

get()

Get this scope’s supervision configuration.

set()

Replace this scope’s subordinate scopes.

set_active()

Replace subordinate scopes on the active scope version.