Repository navigation
Allow a configurable Agent Profile to power Huabu functional workflows #203
Description
Activity
- added a commit that references this issue
on Sep 21, 2026 Confirmed permission contract and design clarifications (2026-09-22)
Recorded at the user's explicit request after the #203 design discussion. This comment supersedes conflicting permission assumptions in the original issue and earlier proposals; it records agreed design, not a claim that all behavior is implemented or authorization to begin the remaining migration.
Personal-tool trust model
Huabu is a personal tool whose user trusts the Agents they configure. Do not introduce per-Agent permission matrices, separate background authorization policies, or a fine-grained permission framework as prerequisites for functional-workflow migration.
- New automatically discovered Profiles default to allow-all only when the wrapper explicitly supports it. Users can turn it off through Edit. Do not guess flags for Custom commands or treat unknown capability support as supported. This changes defaults for newly created automatic Profiles only: do not automatically rewrite existing Profiles, migrate their permissions, or change already-realized execution snapshots.
- Behavior is primarily directed by prompts. Huabu supplies bootstrap, Space instructions where applicable, and task-specific instructions when constructing the execution's WorkloadSpec. These describe the intended tools and scope of work; they are behavioral instructions, not enforced isolation and cannot override the harness's own restrictions.
- Profiles do not bind a tool set or Huabu permission policy. A Profile describes the Agent's launch configuration and placement; its wrapper describes and adapts supported harness configuration. Huabu Server owns the execution-specific context, interface instructions, and access credentials. Agenetes transports/delivers the generic preamble and execution configuration rather than interpreting Huabu business permissions.
- Credential-injection refinement is deferred until needed. An execution that does not need RFS can eventually omit its RFS credentials as well as the corresponding bootstrap. Today Agentlet injects its daemon token automatically, and child processes inherit environment variables; effective opt-out would have to cover both paths. Do not claim that merely omitting a URL or instruction removes current access. Implement this small execution-time distinction when a concrete workflow requires it, not as a prerequisite or a new Profile permissions framework. This is not a same-user local-process sandbox.
- Background execution honors the selected Profile rather than silently escalating. Do not turn allow-all back on when the user has disabled it. Requests requiring authorization must be surfaced through an explicit outcome or existing interaction mechanism, not hang indefinitely or be reported as success. Reuse existing execution/cancellation/timeout mechanisms; exact workflow behavior can be settled when that workflow is migrated.
- Existing basic security and result validation remain. Preserve authentication, credential protection, path safety, input validation, execution attribution, and validation of Agent output before host-owned writes. Simplifying the permission model does not remove these controls. If stricter restrictions become necessary later, use the exposed tool set and tool/interface-side enforcement rather than pretending prompt instructions enforce isolation.
Consequently, the original issue's fine-grained capability/authorization language must not be interpreted as requiring a new scoped-grant system before #203 can proceed. #110 remains an independently scoped capability-enablement workstream; it is not absorbed into this work.
Existing execution architecture
Reuse the existing Profile + Agenetes workload/handle/driver execution path. There is already a unified execution layer and an Agent conversation invocation service. The remaining gap is that product functions such as content enrichment and memory still call built-in inference directly; migrate these callers rather than preemptively adding a parallel workflow framework or another generic execution entry point.
Previously confirmed end goal and remaining decisions
The user's previously clarified end goal is external-agent-only, agent-agnostic Huabu, without built-in pi-ai inference or a separate Huabu model-provider login. This supersedes the original issue's assumption that built-in
huabumust remain a permanent selectable implementation. It does not authorize removing the current implementation before its remaining workflows and historical-session behavior have been addressed.The remaining design discussion concerns historical built-in conversation handling, the staged retirement of built-in capabilities/provider settings, and the concrete first production migration slice. The suggested first slice is existing text content enrichment (summary/title/keywords); that migration order is a proposal, not an approved implementation. No production migration, historical-session rewrite, RFS credential opt-out, or built-in retirement is authorized by this comment. The current request authorizes recording these decisions only; existing bounded implementation authorizations remain unchanged.
- added 5 commits that reference this issue
on Sep 23, 2026
Summary
Allow users to choose an Agent Profile in Global Settings as Huabu's functional Agent: the Agent that executes product-level AI workflows such as Make Summary, memory extraction/maintenance, and future Huabu-assisted operations.
The selected Profile may be Huabu's built-in
huabuProfile or a Bring Your Own Agent (BYOA) external Profile. The built-in Agent becomes one selectable implementation rather than a hard-coded execution path.Motivation
Huabu currently has product features whose orchestration is coupled to the built-in Agent/runtime. Users who prefer an external Agent should be able to use it throughout Huabu, not only in explicit Agent Node conversations. A single configured functional-Agent identity provides a coherent default while retaining the built-in experience as a supported option.
User experience
huabuProfile and supported BYOA Profiles.huabuProfile.Required design and inventory
Before implementation, inventory every user-visible and background workflow that currently invokes the built-in Huabu Agent or assumes its model/provider/tooling. For each workflow, classify whether it:
Define one canonical functional-workflow invocation contract rather than adding per-feature Profile switches.
Behavior and lifecycle
huabumust be a deliberate, visible user policy rather than an implicit success-shaped fallback.Capability and security requirements
Dependencies and related issues
Acceptance criteria
huabuProfile or an eligible external Profile as the functional Agent.huabubehavior remains available and compatible.