Hello! I have created a couple draft PRs to make a...
# proj-architecture
l
Hello! I have created a couple draft PRs to make a consolidated settings object in the SDK, and use it to render the frontend settings page. • SDK PR: https://github.com/OpenHands/software-agent-sdk/pull/2361 • GUI PR: https://github.com/OpenHands/OpenHands/pull/13306 It has a few important features: 1. Settings are pydantic objects, serializable, deserializable, and migratable from old versions to new versions 2. The agent can be created entirely from the settings object 3. The fields to be displayed in the GUI can be derived from the SDK settings object so SDK upgrade = GUI upgrade 4. It is possible to override the default display behavior (see the LLM display in the frontend) Here’s a video of how it renders now (details will be fixed later of course). I’d love to have architectural comments from people like @chilly-france-44439 @calm-artist-7206 @quick-window-91705 @straight-sundown-84319 @millions-afternoon-47582 @wooden-umbrella-84098. It’s a big PR so just high-level directional feedback is good for now, and if this direction is good I’ll do: 1. More intensive testing to see what this breaks 2. Making sure it works on SaaS and doesn’t break backward compatibility
🙌 2
🔥 1
cc @ancient-car-4311 and @purple-thailand-64770 also since we talked about this as a way to coordinate agent+app team work as well
👀 1
ty 2
w
how customizable is the GUI display? Looks pretty good from the above 🙂
l
Basically the way to customize the GUI display is to exclude items from the default display and implement in typescript. So if you exclude all items in the defaults then you can fully customize
We can also think of in-between solutions too
c
Does this way of working with settings still allow for this use case? • from the client, send an /llm_profiles request to set some LLM profile • then start a conversation referencing a profile • that is, don't require the client to send LLM API key again. From the other conversation, re: > Really just new endpoints like POST /secrets, POST /llm-profiles, etc, and then in POST /conversations being able to reference those I think what’s interesting about this need, is I think maybe this implies accepting a
ConversationStartRequest
which serializes an 'agent' with a profile id, that is, a reference. And references one or more secret names, instead of full dicts. —- Secrets are not directly involved in this PR, though maybe the same concept applies, I feel. (I think Xingyao is meeting it in the automations PRs) Maybe that’s like: • client called /secrets to set them • client chooses 2 secret names and sends a /start_conversation with them Current shapes (OpenHands-GPT-5.4 trained its human to like the term 'shapes' 😅) https://gist.github.com/enyst/76447ea0813d502a3c0c72dbc790a725
l
Thanks @calm-artist-7206, I don’t understand the use case very well, could you elaborate when this would be necessary and from which code this workflow is called?
Hey @straight-sundown-84319, @millions-afternoon-47582, @quick-window-91705: I’m trying to decide whether I should button this down and send a merge-ready PR, or to wait a bit for more feedback. Are you interested in giving feedback and need more time or can I just go ahead? It’s a big change, so just wanted to check in first.
s
I looked at the backend changes earlier this morning and they seemed reasonable - I didn't look at the frontend
🙏 1
l
OK, thanks!
c
I think maybe every client code that wants to use LLM profiles via
agent-server
, has to do something like: • send a profile from the user to the SDK profile store ◦
/llm-profiles
endpoint • let the user start a conversation with a profile id So my question becomes, how do we let the user start a conversation with a profile id, in the SDK? It seems that the
ConversationStartRequest
has to specify the profile id, instead of the full LLM dict.
l
Do you have an example where we currently use this pattern? In the CLI?
c
I think there’s an argument to say so. Vasco’s PR on
/model profile_id
control command was merged in the SDK. It allows to switch profile by profile id. I think maybe the CLI still has to expose it to the user. Robert proposed in the other thread to expose LLM profiles via the REST interface too.
l
Thanks, I think the problem I have right now is I don’t fully understand what the client code would look like, or when we’d need to use it. If I could get a reference I could think about what to do, though
c
Please take a look at this, in relation to immutability: https://github.com/OpenHands/software-agent-sdk/issues/1451
Client use case: do what we can do in Python API, but via REST. Such as the LLM profile switch. Cases • user starts the conversation with an LLM profile • user wants to switch to another LLM profile during conversation In the SDK/CLI, the second is possible with
conversation.switch_profile()
Python API. In order for GUI to be able to do the same, we need a REST API endpoint. So client code, any UI for agent-server, would call •
/start_conversation
with a profile reference •
/switch_profile
to a profile •
/llm_profiles
seems to fall naturally into place in this view. Why are those interesting for this PR: I'd think that maybe we can break down the
agent_settings
assumed in the PR into something like
agent_settings
and
llm_profiles
. The above proposal, which redefined the toughest version of immutability into a bit softer one, implies that the LLM can vary in the course of a conversation. I think that variance is easier for the user when all they need to do is call
/switch_profile
REST endpoint, with “gpt-5”.
l
OK, thanks, this is much clearer, I’ll think on this
Hi @calm-artist-7206, can I confirm something? On looking at this more carefully, I think that the most accurate characterization is that this is additional functionality that you would like implemented in the software-agent-sdk that is not implemented yet, right? Based on this, I would propose for my settings change that we keep the functionality as-is for now, but keep this in mind for later? I don’t think that the current implementation would make it very hard to do this later. We could: 1. expand the
LLM
class in
AgentSettings
to be a union class of
LLM | str
2. add an
llm_profile_name: str | None
member to
LLM
as ways to do this for instance.
👍 1
(mostly to keep the scope of this already-very-large PR manageable)
OK, this settings PR is ready to review: https://github.com/OpenHands/OpenHands/pull/13306 I also have a cloud feature deployment for testing https://ohpr-13306-589.staging.all-hands.dev/login This is a HUGE PR with 100 files changed so it is likely to break something, although I have read the code and preliminarily tested it both locally and on the cloud. @better-park-34863 if you have a list of tests that I could run through for QA that would be very helpful. Because the surface area of this is large I'd like to get it in ASAP although not at the cost of sufficient testing. Thanks in advance all!
❤️ 1
🙌 2