<https://github.com/All-Hands-AI/agent-sdk/issues/...
# proj-sdk
q
https://github.com/All-Hands-AI/agent-sdk/issues/208 - proposal to remove
LLMRegistry
from agent-sdk I feel it may be justified to have
LLMRegistry
and
ConversationStats
be part of a shared framework that app sever and CLI inherit as a dependency
c
i really like this idea 🙂 let's do it?
q
cool i'll get OH to do it should be simple enough to remove it from sdk
👍 2
w
@quick-window-91705 my instinct is that anything the CLI and Server will want to share, other clients will want to share
so it probably belongs in the SDK
e.g. if someone is using they SDK, they probably also care about conversation stats
ideally I'd like to avoid having yet another package to maintain
and (correct me if I'm wrong) if we ever want the agent to do LLM routing, it's going to need an LLMRegsitry
q
I believe we aren't going to use the registry for routing, it will accept raw LLM objects similar to the Agent class. Currently, the
LLMRegistry
in the SDK doesn’t actually do anything; it’s just a utility that’s really only useful for client-specific concerns. That said, I can see why other client developers might face similar needs. However, now that I think about it we want to support max budget per conversation. A single conversation may consume budget across multiple LLM services, including calls made outside the agent loop itself (e.g., solvability analysis). Those costs still need to be accounted for in the agent loop. So I think we do want to have registry and convo stats in the sdk, and re-consider how we instantiate LLMs. As it stands the
Agent
lacks contexts on total spend
👍 2
w
ok cool, yeah agreed. they're definitely a bit higher level than the other pieces in the SDK, but they seem generally useful
c
What do y'all think about the Configuration package, is it a self-contained package or is it also "framework-y", thus may belong in the SDK?
c
I do hope we keep the configuration outside SDK since it contains a bunch of user stuff, but it probably also sits on top of OpenHands GUI and CLI
c
Does it? The configuration from toml doesn't contain user? The server does stuff per user
Or maybe I misunderstand the concern
OK, we could keep it out, and try with it outside, until it may become obvious we need it in
q
c
My take on that is that what we now call "UserSettings" is not user settings, is settings displayed in the web UI, which is not part of the Configuration module really 🤔
What is part of Configuration: • load / write / get / set settings • "buckets" of settings, e.g. LLMSettings, AgentSettings • (maybe) filter settings • (maybe) add a new setting What does not seem part of Configuration: • what we want to display in a web UI (web UI issue / display / design) • what a MU app needs users to read/write (MU app / perms issue)
w
The main thing I don't want the SDK to do is "magically" load settings from env vars or files. I might call something like
LLM.from_env
to explicitly load an LLM object from env vars, but the client should need to do that explicitly
I agree LLMSettings and AgentSettings belong in the SDK. But the idea as of now is not to have special classes like LLMSettings or LLMConfig--instead
LLM
is a pydantic class with the settings as attributes
UserSettings definitely should stay out of the SDK (and should get torched/rewritten soon)
nod 1