Back to list
ThalesGroup

agilab-streamlit-pages

by ThalesGroup

AGILAB project purpose is to explore AI for engineering. It is designed to help engineers quickly experiment with AI-driven methods.

3🍴 1📅 Jan 22, 2026

SKILL.md


name: agilab-streamlit-pages description: Streamlit page authoring patterns for AGILAB (session_state safety, keys, rerun, UX). license: BSD-3-Clause (see repo LICENSE) metadata: updated: 2026-01-09

Streamlit Pages Skill (AGILAB)

Use this skill when editing:

  • src/agilab/AGILAB.py
  • src/agilab/pages/*.py
  • src/agilab/apps-pages/*/src/*/*.py

Session State Rules (Avoid Common Crashes)

  • Never assign st.session_state["k"] = … after a widget with key="k" was created.

    • Prefer st.session_state.setdefault("k", default) before the widget.
    • Or use widget return values and compute derived state separately.
  • If you need to “reset” a widget value:

    • Use a different key (versioned key pattern), or
    • Gate the reset behind a rerun and only mutate state before widget creation.
  1. Initialize defaults with setdefault at the top of the page.
  2. Render widgets.
  3. Read values from widgets, compute derived state, store under different keys.

Rerun API

  • Do not use st.experimental_rerun(); use st.rerun().

Key Hygiene

  • Every widget must have a stable, unique key.
  • Prefer namespaced keys: f\"{page_id}:df_files\", not "df_files".

Score

Total Score

70/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon