[Automations/Plugins and Agent Profile] :thread:
# proj-automation
s
[Automations/Plugins and Agent Profile] 🧵
Automations/Plugins do not allow agent profiles at the moment (they have a hardcoded
get_default_agent
) Main issue github.com/OpenHands/automation/issues/600
A clean fix spans multiple repositories so I'd like a review before implementing anything. The issue above suggests a main solution but I also added a
Alternatives considered
section with potential good solutions. Could someone with experience in automations take a look? @quick-window-91705 perhaps? @average-processor-75195 FYI
c
@bland-bear-604 the linked issue is packed full of information and I'm tired. Make me a page on enyst io notebook, with a nice view of what it the root of the problem, what is the proposed solution(s), and what else you think I should know
🐾 1
b
Made a visual reading map 🐾 Two broken paths, the proposed launch flow, worked cases, and why OHE needs the tools/secrets fix before rollout. Current behavior and the proposal are kept separate. https://enyst.github.io/arch/automation-profile-launch.html
šŸ™ 1
c
I think maybe this view is more readable... lolsob
s
@average-processor-75195 don't use the prompt preset ("Create Automation → enter a prompt") for this anymore. Use the new plugin-spec automations instead. The preset always builds a default agent and never reads your agent profile, so it never gets the task tool. Plugin-spec automations replace presets.
Plugin-spec automations couldn't use agent profiles on OHE either: the run tried to load the profile inside the sandbox, which can't see enterprise profiles, so it failed. Three PRs fix that: • github.com/OpenHands/automation/pull/614: the automation service now starts the run's conversation through enterprise, from your agent profile, so sub-agents work. • github.com/OpenHands/automation/pull/615: you choose the agent profile for each automation, and the prompt comes from the automation's config. • github.com/OpenHands/extensions/pull/799: a stock prompt-task plugin, so a typed prompt runs as a plugin-spec automation. Tested end to end on an OHE 0.84.0 Replicated instance. With a profile that includes task_tool_set, the agent delegated to a sub-agent through task. The same prompt as a preset got no task tool. @quick-window-91705 does that make sense?
šŸ™Œ 1
a
Thanks @strong-ice-84145 since I don’t really do anything myself. šŸ˜€. Are the automations skills / docs updated with this workflow.
s
ah makes sense! I made an issue to migrate skills github.com/OpenHands/extensions/issues/802 should be done once new migrations work e2e though
a
Thanks so much. The skills are invaluable.
q
@strong-ice-84145 left some questions on the first PR I think there may be an alternate solution that unifies the expectations between local/cloud automations
s
@quick-window-91705 I applied your review
Copy code
How it works now:
  - Before each run starts, the service copies the automation's agent profile from the app server into the run's sandbox, with the LLM profile (key included) and MCP servers it points to. A sandbox lives for one run, so the copy can't go stale.
  - The runner starts the conversation with RemoteConversation.create. It uses the id the sandbox gave the copied profile, since the sandbox assigns its own id.
  - Custom scripts with a profile get the same copy, so they work on OHE too.
  - The runner now passes the user's secrets in the start request, so the profile's secret_refs filter them.
  - The OHE workarounds are gone: no check of the launched profile, and allowlists no longer wait on enterprise#763.
  - If the profile or anything it points to is missing, the run fails at dispatch with operation=seed_agent_profile and the sandbox is deleted.
  - Local mode is unchanged.
q
amazing, one question - should automation service seed the agent profile or can the app server do it directly? i think it would make sense if the app server did it since it owns the profiles and less network hops to make wdyt?
h
I ran into this today going through some automation flows with agent profiles in mind. Looks like it might just need an agent to resolve conflicts then make sure we still agree on the fix?