SDK PR for the first of the settings changes (revi...
# proj-agent-canvas
g
SDK PR for the first of the settings changes (review bot approved and I can merge it, but wanted a second look): https://github.com/OpenHands/software-agent-sdk/pull/3539
OK, I'm going to merge so I can get the canvas PR moving.
c
Oh, I was just looking into this
g
LOL. Sorry
If you find something heinous, I can revert.
c
The PR was adding settings that belong in the client, it seems to me, not in the SDK. I appreciate if we can pause to understand the consequences: Conceptually, we have tried for a long time for keep the SDK an SDK, that is: • client applications use it as a dependency • it's a library at heart, with some tooling for building on it. Client applications can be various “apps” which may or may not have much in common with agent-canvas frontend or cloud web platform. Analytics consent or sound notifications, for example, are definitely client-side. Architecturally, the client depends on the SDK. The SDK should not depend on the shape of a particular client settings. It's not that introducing client-side stuff is necessarily heinous right now, but it points to a future where these are much more tightly coupled than they could be.
g
So the issue we are trying to tackle is to limit what is stored in browser local storage. I can look into whether there is a better place for these settings.
c
Could you please point it out if there is an actual issue on it?
g
There is not a github issue for this, it was created in Linear directly. I can fix that.
w
I agree with Engel here, this feels weird to add into an SDK 😕 But I also see why this was moved into our "backend" instead of localStorage
nod 1
Enabling/disabling skills I think does belong here in the SDK
but language, analytics, and sound notifications seem odd
c
Just for clarity, I’m not against moving the boundaries somewhat. I just think it needs a little thinking, where is the codebase going, code design wise, and what can we do to not fall into some pitfalls
g
I'll rework it.
c
What if we could: • take settings out of the core SDK, into their own package • and make them extensible, so a client can send their own shape, but the SDK package doesn’t know the details? Just stores it
h
g
Thanks @hundreds-twilight-32833! I was working off of: https://linear.app/all-hands-ai/issue/APP-2183
h
Yea I realized just now we had that one from a while back that wasn't the same thing you were working from
g
We should merge them (or deprecate the new linear ticket).
Was there a linear ticket created from that github ticket?
h
No, it was before we were duplicating them
g
@calm-artist-7206, that sounds like a good approach.
h
Nope, I lied. It was duplicated over
c
The github issue doesn’t mention these settings, I think?
h
Sorry for derailing, no it doesn't
np 1
c
It's probably solved, it seems to me
g
The new issue was just generally limit the use of local storage to only what is absolutely necessary.
c
nod We need some backend
g
I'll revert that PR and look for a better approach.
c
I can see a few alternatives at a quick brush 1. we do it, and hope the ‘relaxation’ of our guidelines will not go further than this little “sin” 2. make settings their own package w/ extensibility built in 3. merge the sdk with canvas in a single repo, and accept more of this kind of code design since maybe it looks and feels like a proper “backend” for this frontend
👀 1
g
Are all the settings in the SDK now, used by the SDK? Should we be adding the non-SDK related settings as you mentioned above?
l
Yeah, all settings in the SDK are used by the SDK AFAIK
g
so a client can send their own shape, but the SDK package doesn't know the details?
Something like "misc_settings" that the SDK just stores.
l
I like the idea of “misc_settings”
“app_preferences” seems to be too specific wording, but having the ability of an arbitrary client to store extra things seems useful
c
I wonder about something basic like • sdk has some
Settings
class • client apps can extend it,
MyAppSettings
• sdk accepts the second for the first, stores it and… doesn’t know the object 🤔 but maybe I’m wrong
g
I think that could work. Or the
Settings
class has a
misc
or
extra
settings field that could be set/get from a
MyAppSettings
object (or whatever the client wants to do with it).
I need to step away for a bit, but will continue on this tonight and hopefully draft a PR that we can live with. 🙂
gratitude thank you 1
l
I thought about the MyAppSettings idea, but the issue is that this would require changing the agent-server code before launching it, whereas the misc_settings (or whatever) solution wouldn’t. That seems like a big advantage for client app developers.
c
A similar problem with dynamic tools registration… 🤔
maybe misc_settings could be a dict for which we don’t know, in the sdk, the contents?
g
Yes. I think that should cover just about anything.
l
Yeah, agreed!
g
PR to update SDK settings (misc_settings): https://github.com/OpenHands/software-agent-sdk/pull/3543
👀 1