Skip to content

feat(agents): add per-Agent Hermes profile selection#2591

Open
xin888-srxly wants to merge 2 commits into
multica-ai:mainfrom
xin888-srxly:agent/cc-macmini/46fa0dab-1778735876
Open

feat(agents): add per-Agent Hermes profile selection#2591
xin888-srxly wants to merge 2 commits into
multica-ai:mainfrom
xin888-srxly:agent/cc-macmini/46fa0dab-1778735876

Conversation

@xin888-srxly
Copy link
Copy Markdown

Summary

Adds a hermes_profile field to agents so multiple agents on the same machine can run under isolated Hermes profiles with separate memory, env, sessions, skills, and gateway configuration.

Closes #2577

Changes

  • DB: Migration 089 adds hermes_profile TEXT column to agent table
  • Backend API: hermes_profile field added to AgentResponse, CreateAgentRequest, UpdateAgentRequest, and TaskAgentData (claim endpoint)
  • Hermes backend: When HermesProfile is non-empty, passes -p <profile> to hermes acp; -p/--profile blocked from custom_args
  • Daemon: AgentData.HermesProfile flows through to ExecOptions.HermesProfile
  • Frontend: New HermesProfilePicker component in the agent inspector (shown only when runtime provider is "hermes")
  • i18n: English and Chinese translations added

Test plan

  • Run make sqlc — verify no errors
  • Run make test — Go tests pass
  • Run pnpm typecheck — TypeScript types valid
  • Run pnpm build — frontend builds successfully
  • Manual: Create/edit a Hermes agent and verify the profile picker appears
  • Manual: Set a profile, run a task, verify hermes acp -p <profile> is used in logs

…ory, env, sessions, and gateway

Adds a `hermes_profile` field to agents that is passed to Hermes via the `-p` CLI flag,
enabling multiple agents on the same machine to run under isolated Hermes profiles with
separate memory, environment variables, sessions, skills, and gateway configuration.

The profile picker appears in the agent detail inspector only when the runtime provider
is "hermes". The `-p` and `--profile` flags are blocked from custom_args to prevent
override conflicts. Empty string clears the profile (uses Hermes default).

Closes multica-ai#2577

Co-authored-by: multica-agent <github@multica.ai>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

Someone is attempting to deploy a commit to the IndexLabs Team on Vercel.

A member of the Team first needs to authorize it.

@multica-eve
Copy link
Copy Markdown
Collaborator

Thanks for the PR. Could you add a screenshot or short screen recording of the new Agent inspector UI so maintainers can see how the Hermes profile picker fits into the existing agent configuration flow?

Also, could you clarify the user scenario this solves compared with the existing custom env and custom args settings? From the current implementation, setting hermes acp -p <profile> appears close to something users may already be able to do via custom args, so it would help to understand whether the main benefit is discoverability/config governance, or whether there is a concrete case that env/args cannot cover safely.

Copy link
Copy Markdown
Collaborator

@multica-eve multica-eve left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. We decided to support this direction, but there are two must-fix issues before this can be merged:

  1. Frontend CI is currently failing because the new required hermes_profile field was not added to existing Agent fixtures. The failures include:

    • packages/core/agents/derive-presence.test.ts
    • packages/core/agents/use-agent-activity.test.ts
    • packages/core/permissions/rules.test.ts

    Please update the affected fixtures with hermes_profile: null, or adjust the type/API shape so existing fixtures remain backward-compatible.

  2. Clearing a Hermes profile from the UI does not persist. HermesProfilePicker sends "hermes_profile": null for empty input, but the Go update request uses *string, so JSON null decodes to nil and is indistinguishable from an omitted field. The backend clear path currently only runs when it receives an explicit empty string, so a user who has set a profile cannot reset the agent back to the default profile from the UI.

    Please make the clear/reset path work, either by detecting explicit null on the backend like the existing raw-field pattern, or by having the frontend send an explicit empty string for clearing. Please also add a handler test covering this update/clear behavior.

Recommended follow-up coverage: add a Hermes backend test for argument construction/filtering, especially that hermes_profile becomes -p <profile> and -p / --profile cannot be overridden through custom_args.

…ring

- Add hermes_profile: null to Agent fixtures in use-agent-activity.test.ts
  and create-agent-dialog.test.tsx to fix frontend CI type errors
- Change HermesProfilePicker to send empty string instead of null when
  clearing, matching Go backend's clear-to-null convention

Co-authored-by: multica-agent <github@multica.ai>
@xin888-srxly
Copy link
Copy Markdown
Author

Thanks for the review! Both issues are fixed in the latest push (414d31f).

1. Frontend CI failure — missing hermes_profile in test fixtures

Added hermes_profile: null to the Agent fixtures in both test files:

  • packages/core/agents/use-agent-activity.test.ts
  • packages/views/agents/components/create-agent-dialog.test.tsx

2. Clearing profile value not persisting

The HermesProfilePicker was sending null when the user cleared the field, but the Go backend treats JSON null as "don't update" (field absent). Changed to send "" (empty string) instead, which the backend handler recognizes as a clear-to-NULL operation via ClearAgentHermesProfile.

Screenshot — Hermes Profile Picker in Agent Inspector

The dev environment was spun up with a Hermes provider runtime and the picker was tested end-to-end. The Agent Inspector shows the "Hermes Profile" field under PROPERTIES with "Default" as the placeholder when no profile is set, and allows free-text entry for a custom profile name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add per-Agent Hermes profile selection for isolated memory, env, sessions, and gateway

2 participants