You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@xingyaoww@csmith49 How do you feel about changing config.toml to .json, and then kill some redundancy?
At a minimum, it’d start being more consistent.
There are two reasons I can think of, why toml was/is useful:
legacy / compatibility
but maybe we can take this opportunity to simplify at least some of that mess! We don’t keep all backwards compatibility with v0.
toml format is easier to read/write directly by humans
on the other hand, with the agent, that’s not really a problem anymore, it can write a migration file for users, or a quick UI for them to modify values, even outside our “official” UIs.
Against toml:
.json is already here, easier to manipulate programmatically
specially to write to - libraries for toml exist, and we use one actually, but it’s no so straightforward as json
in v0 we maintain configs in two formats, simplifying is good!
I actually hope we can sort of get rid the concept of config in agent-sdk, and off load it to downstream applications -- this can probably help us get rid of our settings <-> config <-> cmd args <-> env var non sense 😭
And since most things are now pydantic BaseModel instances, JSON is a very natural config language. We can just .model_dump_json and .model_validate_json.
If we do keep TOML in any capacity (but I'd be v happy getting rid of it), I would want to make a breaking change to how things are represented. Everything below the break is copied from some other discussion:
One pain point I’ve always had about some of our config files: the way we use TOML makes it very difficult to map to structured configuration objects. E.g., we define multiple LLM configs like:
[llm]
…
[llm.eval]
…
[llm.gpt]
…
And there’s a translation that turns this into a field that contains LLMs identified by llm, eval, and gpt.
But that means LLM configs can’t easily have structured fields. For example, something like:
[llm.security_setting]
always_ask=True
Requires some annoying compromises to get working:
Don’t allow named LLMs identified by structured fields. Downside is that isn’t checkable without actually parsing the config and new fields can break old configs.
Some brittle control-flow in the TOML-to-Pydantic translation that treats that field separately and might need to be updated whenever the config changes.
For LLM config, this is a hypothetical problem, but it’s very real for condensers. The easiest fix is probably to avoid having any TOML conversion logic in the SDK and assume users will find a way to build the appropriate config objects, but if we wanted to keep support we could use TOML arrays instead. So the example above would look more like:
I can see why it doesn’t really belong to a SDK! I would think it’s on the edge, though, at least if we consider CLI and server two different downstream applications.
I think it belongs at a framework level, shared by those two. Except we don’t have a framework level. 😅
(One thing I think we need is named LLMs. Their configuration doesn’t have to be represented in a toml format, just represented somehow. Although… this one should be easy. 🤔)
How do you see this:
CLI and server are two downstream applications
the user using both expects naturally to configure similar things, named the same way, at least on important things
Yeah apologies! I didn't discuss the creation of the framework level types since it just happened spontaneously as I tried to develop the CLI using the agent-sdk
We should def create a channel in Slack for these discussions so that its all done in the open, will make sure this happens shortly
Edited to add:
It’s the wrong place for this issue, but I’d love your opinion on the .json config. If we can take the chance to simplify, I feel we could get rid of some unnecessary cruft.
This issue is stale because it has been open for 40 days with no activity. Remove the stale label or leave a comment, otherwise it will be closed in 10 days.
Activity
xingyaoww commentedon Sep 10, 2025
I actually hope we can sort of get rid the concept of config in agent-sdk, and off load it to downstream applications -- this can probably help us get rid of our
settings <-> config <-> cmd args <-> env varnon sense 😭xingyaoww commentedon Sep 10, 2025
(we already sort of did that since all the config classes are removed)
csmith49 commentedon Sep 10, 2025
And since most things are now pydantic BaseModel instances, JSON is a very natural config language. We can just
.model_dump_jsonand.model_validate_json.If we do keep TOML in any capacity (but I'd be v happy getting rid of it), I would want to make a breaking change to how things are represented. Everything below the break is copied from some other discussion:
One pain point I’ve always had about some of our config files: the way we use TOML makes it very difficult to map to structured configuration objects. E.g., we define multiple LLM configs like:
And there’s a translation that turns this into a field that contains LLMs identified by llm, eval, and gpt.
But that means LLM configs can’t easily have structured fields. For example, something like:
Requires some annoying compromises to get working:
Don’t allow named LLMs identified by structured fields. Downside is that isn’t checkable without actually parsing the config and new fields can break old configs.
Some brittle control-flow in the TOML-to-Pydantic translation that treats that field separately and might need to be updated whenever the config changes.
For LLM config, this is a hypothetical problem, but it’s very real for condensers. The easiest fix is probably to avoid having any TOML conversion logic in the SDK and assume users will find a way to build the appropriate config objects, but if we wanted to keep support we could use TOML arrays instead. So the example above would look more like:
enyst commentedon Sep 10, 2025
I can see why it doesn’t really belong to a SDK! I would think it’s on the edge, though, at least if we consider CLI and server two different downstream applications.
I think it belongs at a
frameworklevel, shared by those two. Except we don’t have a framework level. 😅(One thing I think we need is named LLMs. Their configuration doesn’t have to be represented in a toml format, just represented somehow. Although… this one should be easy. 🤔)
How do you see this:
serverare two downstream applicationssdkandtoolsdependencies?enyst commentedon Sep 10, 2025
Ahaha. @malhotra5 just made this PR:
That PR cuts out a “framework” level, in the sense above.
xingyaoww commentedon Sep 10, 2025
@enyst yeah, i'd imagine it would be a shared utility of "OpenHands application" and is out of the scope for agent sdk
enyst commentedon Sep 10, 2025
It would be useful to drop in the open the conclusions/plans you’re pursuing.
It would probably help save us some time! 😅
malhotra5 commentedon Sep 10, 2025
Yeah apologies! I didn't discuss the creation of the framework level types since it just happened spontaneously as I tried to develop the CLI using the agent-sdk
We should def create a channel in Slack for these discussions so that its all done in the open, will make sure this happens shortly
enyst commentedon Sep 11, 2025
No worries at all, and thank you!
Edited to add:
It’s the wrong place for this issue, but I’d love your opinion on the .json config. If we can take the chance to simplify, I feel we could get rid of some unnecessary cruft.
malhotra5 commentedon Sep 11, 2025
I would love to standardize on json!
enyst commentedon Sep 11, 2025
Discussion here:
https://openhands-ai.slack.com/archives/C09FJAZSP9N/p1757598888398979
all-hands-bot commentedon Jan 2, 2026
This issue is stale because it has been open for 40 days with no activity. Remove the stale label or leave a comment, otherwise it will be closed in 10 days.
all-hands-bot commentedon Jan 13, 2026
This issue was automatically closed due to 50 days of inactivity. We do this to help keep the issues somewhat manageable and focus on active issues.