Skip to content

feat(settings): add system prompt, condenser and verification to the Agent Profile editor (OHE-3748) - #1008

Merged
hieptl merged 1 commit into
hieptl/ohe-3456-agent-profiles-pagefrom
hiep/ohe-3748-agent-profiles-editor-system-prompt-condenser-and
Oct 27, 2026
Merged

hieptl merged 1 commit into
hieptl/ohe-3456-agent-profiles-pagefrom
hiep/ohe-3748-agent-profiles-editor-system-prompt-condenser-and

Conversation

@hieptl

@hieptl hieptl commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:

  • A human has tested these changes.

AGENT:


Why

OHE-3456 asks that a personal Agent Profile can configure the system prompt, condenser and verification, as the Agent Canvas editor does. The page from #755 covers the core fields; this adds those three.

Summary

  • System prompt in three modes: OpenHands default, default plus your instructions (saves system_message_suffix), or a custom persona (saves persona); the other field is cleared on a mode switch and text is required outside the default mode.
  • Condenser and Verification sections rendered from the agent-settings schema with SchemaField, saved on the profile's condenser / verification objects; the global-only verification keys (critic_api_key, confirmation_mode, security_analyzer) are excluded as in Canvas. Fields hidden by depends_on and cleared values are left out so server defaults apply, and a section is never written back unseeded.
  • Editing pre-fills all three from the stored profile.

Issue Number

OHE-3748, part of OHE-3456. Stacked on #755.

How to Test

From frontend/:

npx vitest run __tests__/routes/settings.test.tsx __tests__/components/features/settings __tests__/i18n
npm run lint
npm run check-translation-completeness

All pass locally. Manually, with the Agent Profiles page enabled: create a profile, set System prompt to "Default + your instructions", enter text, change a condenser field and a verification field, Save; reopen and confirm the three persisted, then switch to "Custom persona" and confirm the suffix is cleared on save.

Video/Screenshots

To be added after manual testing.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes


Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-fd81a15

…Agent Profile editor (OHE-3748)

System prompt in three modes (OpenHands default, default plus
instructions as system_message_suffix, custom persona), and the
condenser and verification sections of the agent-settings schema
rendered per profile, excluding the global-only verification keys.
Hidden fields and cleared values are left out of the stored section so
server defaults apply; a section is never written back unseeded.
@github-actions github-actions Bot added the type: feat A new feature label Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@tofarr tofarr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰

@hieptl
hieptl merged commit 3936d53 into hieptl/ohe-3456-agent-profiles-page Oct 27, 2026
19 of 20 checks passed
@hieptl
hieptl deleted the hiep/ohe-3748-agent-profiles-editor-system-prompt-condenser-and branch October 27, 2026 11:43
hieptl added a commit that referenced this pull request Oct 27, 2026
…-agent-profiles-editor-skills-with-org-scoped-skills-listed

Resolve the conflicts after #1008 was squash-merged into the base branch and
main was merged into it:

- agent-profile-form-state.ts, agent-profile-form.tsx, agent-profiles-view.tsx:
  keep this branch's versions; the base side only carried #1008's content,
  which this branch already builds on.
- i18n/translation.json: the base file plus the 12 keys only this branch adds;
  declaration.ts regenerated with make-i18n.
hieptl added a commit that referenced this pull request Oct 27, 2026
…feature flag (OHE-3747) (#755)

* feat(settings): add feature flags for the Agent Context and Agent Profiles pages (OHE-3744)

Two env-backed web-client feature flags, both default off:

- enable_agent_context_page (ENABLE_AGENT_CONTEXT_PAGE) shows the dedicated
  Agent Context settings page.
- enable_agent_profiles_page (ENABLE_AGENT_PROFILES_PAGE) replaces the
  personal Agent page with Agent Profiles, and implies the Agent Context
  page since the Agent page hosted the memory toggle.

isSettingsPageHidden hides /settings/agent-context and /settings/agents
unless the matching flag is on, so the nav item and the route redirect
share one rule. No visible change while both flags are off.

* feat(settings): add the personal Agent Context page behind a feature flag (OHE-3745)

Moves the "Enable Persistent Memory" toggle out of Settings > Agent into
its own Personal Settings item, /settings/agent-context (SaaS only),
shown when enable_agent_context_page (or enable_agent_profiles_page) is
on. The page saves enable_memory_context through the existing settings
endpoint. With the flag on, the Agent page no longer renders the inline
section; with it off, the Agent page is unchanged. The item is
OpenHands-only (disabledByAcp), as the inline section was.

* feat(settings): add the Agent Profiles page replacing Agent behind a feature flag (OHE-3747)

With enable_agent_profiles_page on (SaaS), Personal Settings shows
"Agent Profiles" (/settings/agents) instead of "Agent", and
/settings/agent redirects there. The page follows the Secrets layout:
the member's own profiles (add, edit, rename, delete, set as default,
every write with scope=personal) and an "Organization agent profiles"
section listing the org's shared ones read-only (set as default only),
hidden when empty.

The editor covers name, agent (OpenHands, or ACP when enable_acp), LLM
profile, sub-agents and "let the agent switch LLM profiles" (as tools
entries, since the SDK retired the boolean switches), parallel tool
calls, MCP servers, secrets (personal and organization-shared, with an
Organization badge) and ACP preset, command, model and credentials. The
ACP guard is off while the profiles page is on, since the agent kind
then comes from the active profile. With the flag off, the Agent page
and nav are unchanged.

* feat(settings): add system prompt, condenser and verification to the Agent Profile editor (OHE-3748) (#1008)

System prompt in three modes (OpenHands default, default plus
instructions as system_message_suffix, custom persona), and the
condenser and verification sections of the agent-settings schema
rendered per profile, excluding the global-only verification keys.
Hidden fields and cleared values are left out of the stored section so
server defaults apply; a section is never written back unseeded.

* feat(settings): add skills with organization scope to the Agent Profile editor (OHE-3749) (#1009)

* feat(settings): add system prompt, condenser and verification to the Agent Profile editor (OHE-3748)

System prompt in three modes (OpenHands default, default plus
instructions as system_message_suffix, custom persona), and the
condenser and verification sections of the agent-settings schema
rendered per profile, excluding the global-only verification keys.
Hidden fields and cleared values are left out of the stored section so
server defaults apply; a section is never written back unseeded.

* feat(settings): add skills with organization scope to the Agent Profile editor (OHE-3749)

A Skills section listing the server's global and user skills plus the
skills of every marketplace the member inherits or registered, with an
Organization badge on organization-marketplace skills. All skills are on
by default; unchecked ones are saved as the profile's disabled_skills
deny-list.

* feat(settings): add a tools picker and tool catalog endpoint to the Agent Profile editor (OHE-3754) (#1012)

GET /api/tools/catalog serves the SDK tool registry's catalog (a copy of
the endpoint proposed in #763). The editor's sub-agents and LLM-switching
switches move under a Tools section with two modes: "Standard set" keeps
today's behaviour, "Choose tools" lists the catalog and saves an explicit
tool list, which the profile-backed automation templates require. The
picker is seeded from the standard set, pinned entries keep their params,
a pinned tool the catalog does not list is shown and flagged once the
catalog has loaded, and at least one tool is required.

* feat(settings): let org admins manage organization Agent Profiles (OHE-3755) (#1013)

* feat(settings): add system prompt, condenser and verification to the Agent Profile editor (OHE-3748)

System prompt in three modes (OpenHands default, default plus
instructions as system_message_suffix, custom persona), and the
condenser and verification sections of the agent-settings schema
rendered per profile, excluding the global-only verification keys.
Hidden fields and cleared values are left out of the stored section so
server defaults apply; a section is never written back unseeded.

* feat(settings): add skills with organization scope to the Agent Profile editor (OHE-3749)

A Skills section listing the server's global and user skills plus the
skills of every marketplace the member inherits or registered, with an
Organization badge on organization-marketplace skills. All skills are on
by default; unchecked ones are saved as the profile's disabled_skills
deny-list.

* feat(settings): let org admins manage organization Agent Profiles (OHE-3755)

Behind the new enable_org_agent_profiles flag (ENABLE_ORG_AGENT_PROFILES),
admins and owners (frontend permission manage_org_agent_profiles) get an
"Add organization profile" button and Edit/Delete on the organization's
profiles; legacy ACP org profiles can only be deleted. Other members keep
the read-only section.

The editor takes a profileScope. For an org profile it hides the agent
kind and the MCP section (saving mcp_server_refs: []), always lists the
organization's shared secrets explicitly, loads instance and inherited
marketplace skills only, and warns when a legacy org profile still has
null refs. Writes use the edited row's scope.

* feat(settings): add a tools picker and tool catalog endpoint to the Agent Profile editor (OHE-3754) (#1012)

GET /api/tools/catalog serves the SDK tool registry's catalog (a copy of
the endpoint proposed in #763). The editor's sub-agents and LLM-switching
switches move under a Tools section with two modes: "Standard set" keeps
today's behaviour, "Choose tools" lists the catalog and saves an explicit
tool list, which the profile-backed automation templates require. The
picker is seeded from the standard set, pinned entries keep their params,
a pinned tool the catalog does not list is shown and flagged once the
catalog has loaded, and at least one tool is required.

* test(settings): keep flag-gated pages out of the expected user menu items (OHE-3456)

The user context menu hides the Agent Context and Agent Profiles entries
until enable_agent_context_page and enable_agent_profiles_page are on, and the
mocked config in these tests leaves both off. Exclude those paths the way the
tests already exclude the other hidden routes.

* test(settings): restore the user menu test's original formatting

The previous commit let prettier rewrap the whole file; keep only the
flag-gated path exclusion it was meant to add.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants