Skip to main content

STAN Settings

Your STAN settings, context and past conversations, and STAN's admin diagnostics.

Access it as client.stan_settings on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.

Methods​

All methods​

compact​

compact() -> StanCompaction

Compact your current STAN session: summarize its older messages to free context.

Raises

  • ValidationError: You have no session with a model.

context​

context() -> StanContext

How full your current STAN session's context is.

delete_conversation​

delete_conversation(conversation_id: str) -> None

Delete one of your past STAN conversations for good.

Its messages, the files attached to them and its session's history go with it. Only your own; it cannot be undone.

Parameters

  • conversation_id (str): The conversation's ID.

Raises

  • NotFoundError: You have no conversation with this ID.

list_conversations​

list_conversations(*, limit: int | None = None) -> SyncPaginator[StanConversation]

Your past STAN conversations, newest first, a page at a time as you iterate.

Parameters

  • limit (int | None, optional): The most conversations to return; all of them when omitted.

list_eval_runs​

list_eval_runs(*, limit: int | None = None) -> SyncPaginator[StanEvalRun]

Admin: your STAN eval runs, each with its scenarios' results.

Parameters

  • limit (int | None, optional): The most runs to return; all of them when omitted.

list_skills​

list_skills() -> StanSkillCatalog

STAN's skills: the system skills it ships with and the ones you added.

memory_diagnostic​

memory_diagnostic() -> StanMemoryDiagnostic

Admin diagnostic: the server's memory use, STAN's sessions and your memory counts.

message​

message(*, message: str | None = None, source: str | None = None, new_session: bool | None = None, session_id: str | None = None, model_id: str | None = None, model_name: str | None = None, active_workflow_id: str | None = None, active_workflow_name: str | None = None, include_history: int | None = None, stan_version: str | None = None, delivery: str | None = None) -> StanReply

Send a message to your current STAN conversation (STAN remembers which it is).

Optionally start a new session or switch to another first, or send no message to only load the conversation. Slash commands work. A message whose run is still working answers the run to poll with client.stan.retrieve_run.

Parameters

  • message (str | None, optional): What you ask STAN; omit it to only load or switch a session.
  • source (str | None, optional): Where the message comes from (chat, home); chat when omitted.
  • new_session (bool | None, optional): True starts a new session with message (required with it: a session is stored with its first message) and makes it current; the reply's session_id is the new session. With no model chosen yet, the message is answered with the model picker.
  • session_id (str | None, optional): Make this session of yours current first.
  • model_id (str | None, optional): With new_session: the model of the new session; your current session's when omitted.
  • model_name (str | None, optional): With new_session: that model's name.
  • active_workflow_id (str | None, optional): With new_session: a workflow the new session works on.
  • active_workflow_name (str | None, optional): With new_session: that workflow's name.
  • include_history (int | None, optional): Also answer the last this many turns of the conversation.
  • stan_version (str | None, optional): 1.0 answers from STAN's prepared answers only; 2.0 (the default) runs the agent, asking for a model first when the session has none.
  • delivery (str | None, optional): While a run is active: steer it with the message (the default) or queue the message after it. A steer stops the reply the model is writing at that moment (a tool already running finishes first) and the run goes on with the message at once.

Raises

  • ConflictError: delivery="steer" with no active run.

personality​

personality() -> StanPreferences

Your STAN settings: its personality and how it classifies you.

poll_skill_compliance_eval​

poll_skill_compliance_eval(*, model_id: str | None = None) -> StanSkillComplianceEval

Admin diagnostic: one live STAN turn that checks a loaded skill drove the work.

The first call starts it and later calls poll it; the finished report is answered once. It spends one model turn.

Parameters

  • model_id (str | None, optional): The model to run the turn with; your latest session's model when omitted.

prompt_diagnostic​

prompt_diagnostic(*, mode: str | None = None, message: str | None = None) -> StanPromptDiagnostic

Admin diagnostic: STAN's system prompt size, the tools it names and would select.

Parameters

  • mode (str | None, optional): workflows, platform or develop; workflows when omitted.
  • message (str | None, optional): The message the tools are selected for.

recall_skills​

recall_skills(query: str, *, limit: int | None = None) -> StanSkillRecall

Admin diagnostic: the skills STAN recalls for a request, ranked as its agent ranks them.

Parameters

  • query (str): The request to recall skills for.
  • limit (int | None, optional): How many skills to recall (1 to 20); 5 when omitted.

resume_conversation​

resume_conversation(conversation_id: str) -> StanConversation

Resume a past STAN conversation: it becomes your current session; returns it.

Parameters

  • conversation_id (str): The conversation's ID.

retrieve_conversation​

retrieve_conversation(conversation_id: str) -> StanConversation

One of your past STAN conversations, with its messages.

Parameters

  • conversation_id (str): The conversation's ID.

run_evals​

run_evals(*, model_id: str | None = None, scenarios: Sequence[str] | None = None, judge_model_id: str | None = None) -> StanEvalsStarted

Admin: start STAN's judged eval scenarios in the background (they spend tokens).

Read the result with list_eval_runs.

Parameters

  • model_id (str | None, optional): The model STAN runs the scenarios with; your current session's when omitted.
  • scenarios (Sequence[str] | None, optional): The scenarios to run; every scenario when omitted.
  • judge_model_id (str | None, optional): The model that judges the answers; the platform's judge when omitted.

run_skill_selection_eval​

run_skill_selection_eval(*, top_k: int | None = None) -> StanSkillSelectionReport

Admin diagnostic: run the skill-selection eval and report its accuracy.

Parameters

  • top_k (int | None, optional): How many recalled skills count as a hit (1 to 10); 3 when omitted.

tools_diagnostic​

tools_diagnostic(*, names: Sequence[str] | None = None) -> StanToolsDiagnostic

Admin diagnostic: STAN's tools, those it can never select, and the named ones checked.

Parameters

  • names (Sequence[str] | None, optional): Tool names to check are registered and reachable.

update_personality​

update_personality(*, personality: str | None = None, user_type: str | None = None) -> StanPreferences

Set STAN's personality and/or how it classifies you; answers your settings.

Parameters

  • personality (str | None, optional): professional, friendly or concise.
  • user_type (str | None, optional): business or technical; auto returns the classification to STAN.

Raises

  • ValidationError: Neither is given, or a value is not one of those.