Oh I'd love it asap! 19503 depends on an SDK relea...
# proj-agent-canvas
c
Oh I'd love it asap! 19503 depends on an SDK release, that’s all I think
ty 1
l
I just released SDK if that’s any help
c
Oh, okay, thank you!
🙌 1
c
Hey @calm-artist-7206 I am looking more closely at this feature flagging system. It looks like new flag must be registered in
openhands.agent_server.experimental_features
in the SDK repo. That’s a bummer when a new feature wouldn’t otherwise require an SDK change. For example the one I am working on is in automations and agent-canvas ui. This would require yet another change repo to change--which brings me two four or five repos for one feature (+enterprise +cloud). Enterprise has its own feature flagging system today in its own db. (agent-server doesn’t work for enterprise persistence like this since it is per-sandbox). The only real OSS + enterprise persistence we have is the the automations db.
If we moved feature flag end-point to automations we could share code across. (I know it isn’t really an automations concern per-se, but that is what we have.)
l
Yeah, it seems that it might be better to have this stored in the settings, rather than hard coded?
c
🤔 From the user perspective, it’s a setting they enable for themselves
It's saved in their settings, yes
l
but these are the only ones we can use right? github.com/OpenHands/software-agent-sdk/blob/…/experimental_features.py#… And if we want to add one we need to hard code it? Or can it be added dynamically?
c
Ah, that's a different question. We add them one by one, each in a PR with the actual functionality
What would dynamic mean, for them?
The functionality still needs added, and with it checks for the exact flag on/off 🤔 Though I do understand that in the case of automation… the functionality is in automation repo?
l
It would mean having an agent-server endpoint that allows you to set a feature flag that is not specified in that file. Then we could have a feature flag that is specified in automation, for instance, and then automation could call the agent server to set the feature flag upon startup.
c
That would be better than opening a PR in SDK every time we want to expose a FF in OSS. But it still means completely disconnected code and storage for FF across enterprise and OSS which is a real bummer.
c
🤔
To be honest it might be a bit much, because some of these flags also may depend on others…
The user chooses to turn on/off, which means we save in settings on agent-server and yes in db on enterprise
That would be better than opening a PR in SDK every time we want to expose a FF in OSS.
You would expect most FF to have no SDK part?
c
Many. I don’t know about most.
c
Could you give an example other than the current three PRs?
c
Any change to automation or to the UI that PM decides they want to release as experimental would be candidates for that.
c
Sorry I’m dense, the flags currently in have implementation in the SDK regardless of the flag itself. 🤷‍♂️
Re: automation repo. TBH I think for a while that it may be a good idea to think if it needs to be an external repo or we could redesign it. It’s essentially an entry point to agent-server, and as such it feels like it could be, at least in part, an adjacent service 🤔
Graham, my feeling is that it would be premature to try to make them dynamic before we even try them. I’m also thinking we also have a case right now where some depend on others, a Projects enabling should also enable Conversation Mentions. 🤔 But I'm not against the idea, I’m just a bit surprised that a PR to the SDK is a problem or why. I didn’t see any concerns or proposals on Experimental flags when we discussed them in this Slack, sorry.
c
It’s not like this design has been around a long time and was working well. We encountered the issue immediately.
l
I don’t have a strong preference, but I agree we should try to come up with a good design and consider the tradeoffs
c
We don’t have to solve it now, I suppose. I can open the SDK PR now to register the flag. I know @limited-student-10747 already has some things in mind for settings between the two products.
IMHO we need to factor persistence differently. Persistence that relates to user settings or other global experience type stuff IMHO doesn’t belong in agent-server or agent-server persistence as it doesn’t translate well to enterprise where agent-server is ephemeral and where there are many of them. Probably the automations db and service needs to grow to be a general form of persistence for stable values as it is “instance” level across OSS and enterprise.
c
That's an interesting way to see it! On the other hand, for OpenHands, the agent-server is persistent, not ephemeral. And that’s an essential characteristic of it. So we have a very interesting distinction here: • agent-server (local) = a backend, persistent, long-running server • agent-server (remote) = same, essential (otherwise one can’t use it) • ephemeral agent-servers = used by enterprise in ephemeral sandboxes On yet another hand, I think we now have a small Node component on the UI host, which could perhaps grow into a service… maybe for persistence too 🤔
c
enterprise will also start adding additional agent-servers that are both long lived and remote. As soon as you have more than one of them, they aren’t a good fit for settings that are about general preferences.
c
Just a quick outline of what I have in mind (unbaked); • agent-server ◦ with message queue/durability ◦ with entry points ◦ (currently in automation repo) • connector (for lack of a better term) ◦ auth (e.g. DigitalOcean) ◦ (maybe) secrets service ◦ (maybe) persistence service • automation ◦ (scheduling, maybe) • UI
c
I think I am lacking context for your bullets under agent-server…
c
On a side note, it seems the SDK needs litellm pinned, it won’t work as it is, so we may want a patch anyway: https://github.com/OpenHands/software-agent-sdk/pull/7015
c
I love the idea of factoring stuff into a service that would allow us to have a shared interface between OSS and enterprise.
c
I think I am lacking context for your bullets under agent-server
Yes, I’m not sure which of the previous brainstormings would be good context… It’s a concept that I think about for a while, and have an implementation in my agent. It starts here, with idempotency for agent-server. Forward, the way I see it, automation (mostly) contains a message queue, and that is necessary for any event that would reach agent-server from whenever it comes. We could think about integrating it in the repo, rather than keeping it external to it. That's half of the above, then on the other hand, I do see a point in maybe making e.g. settings… independent of backend, basically… 🤔
And secrets have to be out, it seems to me, in order to not have long-lived tokens at the agent’s disposal
c
@calm-artist-7206 Here is the feature flag for factories to be default off. github.com/OpenHands/software-agent-sdk/pull/7016
ty 1
✅ 1
c
This would require yet another change repo to change--which brings me two four or five repos for one feature
On a side note, this is a bit of an annoyance in OpenHands, but maybe it shouldn’t be. Just a couple of thoughts there: (1) Agents know how to do PRs cross-repo without blinking A new FF PR anywhere would have immediately shown the agent it wasn’t working, if the agent had tested it end to end. I mean, agents can now test fully, cross-repo, what the user experiences when they use a feature. I used something like “_there’s an experimental flag added by open PRs, let’s make another for x, add it to the feature map and give me complete, real evidence that it works_” (and maybe we could also add FF to AGENTS.md) (2) We could look into auto-merging low-risk PRs I think we have somewhere some analyzing of
risk
of a PR. In some cases, many perhaps these days, the changes are easy, and independent of third party content. We could consider auto-merge for a number of them. Idk, I had 100+ lately that agents could have merged: the PRs were coming from the agents’ own testing of main; when they found an issue, made a PR to fix it, on green CI they asked the bot for review. I stopped them there, and I went to see them myself. Many were already mergeable though. Of course, this is a bit tricky. It also depends on codebase readiness, and at its turn that makes me a bit not so confident in the SDK. But in the UI this kind of stuff is mostly okay. In the SDK I feel it has to be small and easy… but, well, FF is small and easy at the moment. 😅 —— That said, we can think about improving further, for sure. I’m not suggesting that we stick with a first version just because agents can do it 😅
c
True. Just a lot of tokens to burn to create the PR, the tracking issue and a new SDK release for a single flag. I think when we look at some of the architecture changes you have in mind to start moving settings out of agent-server and Graham’s settings refactor this will get better.
Thanks for listening. Sorry to be such a grump.
c
Just a lot of tokens to burn to create the PR, the tracking issue
No, they’re not. 😅 This is such a surprising phrase. A trivial PR adding a single feature flag doesn’t burn “a lot of tokens”, under just about any shape or form. 🫠 I believe that in order to understand and benefit from AI, spending tokens is part and parcel of the work. If you are concerned about an agent adding a little flag, with all respect John Mason, that’s so funny that you must have been joking? Hey, after all, a lot, and I mean a huge lot in these extraordinary times, depends on trying things, on taking a step back and letting the agent do more than it could last year or last month, figure out how to move to a higher level of abstraction and increase the benefits the project gets from it. It can do more, much more than one may think if you still babysit a trivial PR or refrain from a trivial PR under the reason that it “uses a lot of tokens”. To put it differently: many people and companies have “introduced AI” and brag that they’re “using AI”, when in reality they - this is real! - they use free Copilot or put spend limits like 20 bucks 😅. That doesn’t give them a chance in hell to even guess how AI can drastically improve outcomes. Maybe they will in an year or three, when the current SOTA gets free Copilot, but even then, they have to try, learn, improve. Only claiming to “use AI”, but refraining from a flag, will never get us the gains in productivity and understanding that makes possible the AI transformation of work. Someone - from an OpenHands competitor, as it happens - put it this way: it’s like being on dial-up back in the day when your neighbours are on fiber. Sure, you can do “the internet thing” too! 😂 But it doesn’t allow you to even guess how the cloud era was transforming work, or how netflix streaming changed deeply the way movies businesses work. Not even guess, let alone become able to harness it. (Of course, there will be some limits, I’m not suggesting “tokenmaxxing” thingies for the sake of it either, but the limits are easy, per week or per month, and that’s that. No, a single flag doesn’t put a dent in anything.)
> Just a lot of tokens to burn to create the PR, the tracking issue and a new SDK release for a single flag. (my emphasis) I’m a bit confused by this. Please let me clarify: • openhands is upstream. • enterprise is downstream. Yes, if downstream needs a new thing in the upstream project, to use it or extend it, then the way that goes is: • a PR introduces the thing • it gets merged • upstream makes a release Then downstream uses it and moves forward doing its thing. That’s how upstream and downstream projects always work. It’s normal. Maybe, as you said above, the confusion is around the role of the agent-server repo, which, I understand, enterprise folks use it as “ephemeral sandbox” for their work, while in the Open Source project it’s a persistent, long lived server, with settings and stuff. I really do understand there’s an impedance mismatch here. ------ You know what’s funny though? For a couple of years, until several months ago, OpenHands used to have settings outside the `agent-server`: in the
app-server
. So it was working roughly like •
app-server
orchestrates multiple conversations; it handled persistence •
agent-servers
were conceived as “ephemeral”; we kept savagely that design, to NOT have it handle persistence, and some other things. Then Robert was like, well, actually the
agent-server
is so powerful and it does multiple conversations itself, it’s enough to get things done on its own; and Graham extracted the old
app-server
in another repo. And today, it’s not part of OpenHands, it’s not part of the Open Source application that people are downloading and using most of the time. That’s OK (IME). But that means that the
agent-server
became a backend. A full backend, handling persistence, user settings, the stuff that used to be the `app-server`’s responsibility. It really is a backend: when the user opens the Add Backend dropdown, they can choose: • an
agent-server
backend, local or remote • a
cloud
backend. As such, of course flags have to be in the backend, and as such, they need to be in both backends if they’re available to people on both applications. Sorry for the details, it just… makes sense to me? I even went ahead over the weekend and researched a bit if I’m dumb; it turned out that typically, applications out there use explicit feature flags, yes explicit not implicit, and they’re present both in a backend and in the frontend. As I said, I’m most happy to think things over again, and go deep. After all, after Riemann, who knows, who knows. I used to say, half-jokingly, that we may want to rewrite the sdk in Rust for OpenHands v2… maybe it’s not the worse idea ever thrown at a wall 😅
Any change to automation or to the UI that PM decides they want to release as experimental would be candidates for that.
I would like to clarify a tiny detail. When I proposed for us to use feature flags much more than before, it was here and I noted:
Do you have an opinionated take on what makes OpenHands better? 😅 Ship it under a feature flag. That way, it’s not on by default, but we can tell people about it, let them enable it and see.
I’m talking to everyone, regardless if they’re in AH or not in AH, regardless of what other company they’re part of, or what corporate role they fill there. I would love to see us trying more things, see what works, graduate them to features or remove them mercilessly if they don’t work for people. I hope we can make mistakes easier, fix them without disrupting normal workflows, try bigger things, and move faster to a better user experience with OpenHands. OpenHands is a community-driven Open Source project. I strongly believe projects are better off when they’re open to people who are not part of the company, that good ideas can come from everywhere, and great people with various backgrounds are part of this project and are helping improve it. By the same token, I don’t make any distinction by formalities, for people who are part of AH either. Every PR to the project is a proposal to the project. Everyone in AH is most welcome to scratch that itch or fix that thing and bring something in, regardless whether it comes from AH-internal formal-driven workflows or from the shower that morning. I can say, from where I stand, when we analyze an idea or accept a PR, it’s for the benefit of the project and our users, not because of corporate labels. I trust we all want the best for OpenHands, and I strongly believe this is the best for OpenHands.
c
Engle, we’ve been using feature flags on OHE for a while and I am glad to see them also appear in OSS side too. I am a believer in value of feature flags. My grumbling isn’t about feature flags but about the poor ergonomics of the big picture when building new features that points to a need for a refactor for settings and perhaps other things. That no ones fault, my complaint with the shape of the code in its present form not with any of us working on it.