Skip to main content

ScopesResource

Bases: object Read access to Modus scopes. client.scopes.list() → Page[Skill] client.scopes.get(scope_id) → Skill client.scopes.conversations(scope_id).list() → Page[ConversationListItem] client.scopes.conversations(scope_id).get(thread) → Conversation To create, update, or deploy scopes use modus.management.ModusManagement.

conversations()

Return the conversations sub-resource scoped to scope_id.

list()

List scopes in the organisation.
  • Parameters:
    • page_size – Items per page (default 25).
    • page_token – Opaque token from a previous page’s next_page_token.
    • 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 scope by ID or slug.
  • Parameters: view – Variation view — "active" (deployed) or "draft".
  • Raises: NotFoundError – if no scope with this ID/slug exists.

chat()

Send a message to a scope and get the complete reply.
  • Parameters:
    • scope_id – Scope ID or slug.
    • message – The message to send.
    • model – Model to run this message with (required). One of the supported model IDs, e.g. "claude-sonnet-5" or "gpt-5.5".
    • thread_id – Continue an existing conversation; omit to start a new one.
  • Returns: ChatResult with the reply content and the thread_id to continue the conversation.

chat_stream()

Send a message to a scope and stream the reply token by token.
  • Parameters:
    • scope_id – Scope ID or slug.
    • message – The message to send.
    • model – Model to run this message with (required). One of the supported model IDs, e.g. "claude-sonnet-5" or "gpt-5.5".
    • thread_id – Continue an existing conversation; omit to start a new one.
    • version – Run a specific variation — "published" or "draft".
  • Returns: ChatStream you can iterate for text chunks; the final result carries the thread_id.

get_context()

Return composed context Modus would use for a scope query, without running chat.
  • Parameters:
    • scope_id – Scope id or slug.
    • message – Natural-language query used to select context.
    • limit – Optional cap on structured fallback items when no markdown summary exists.

AsyncScopesResource

Bases: object Async read access to Modus scopes. await client.scopes.list() → AsyncPage[Skill] await client.scopes.get(scope_id) → Skill await client.scopes.conversations(scope_id).list() → AsyncPage[ConversationListItem] To create, update, or deploy scopes use modus.management.ModusManagement.

conversations()

Return the conversations sub-resource scoped to scope_id.

list()

List scopes in the organisation.
  • Parameters:
    • page_size – Items per page (default 25).
    • page_token – Opaque token from a previous page’s next_page_token.
    • 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 scope by ID or slug. See the sync get for argument details.

chat()

Send a message to a scope and get the complete reply. See the sync chat for argument details.

chat_stream()

Stream a scope reply token by token. See the sync chat_stream for argument details.

get_context()

Return composed context Modus would use for a scope query, without running chat.
  • Parameters:
    • scope_id – Scope id or slug.
    • message – Natural-language query used to select context.
    • limit – Optional cap on structured fallback items when no markdown summary exists.