Some proposed documentation: <https://www.notion.s...
# proj-sdk
w
c
Looks great! I love to see some hint of model-agnostic, too. It kinda feels like switch-LLM-without-losing-your-work is a supported use case, even if it doesn't exactly say that; and I love it. 😊 In this context, it also makes too much sense to support git repositories, without burden.
❤️ 1
w
Do we have the ability to swap LLMs mid-conversation now?
c
Not yet. It seems that due to freezing the LLM together with the agent, when serialized, we may want some kind of custom routing logic to swap later. We do have an issue on it https://github.com/All-Hands-AI/agent-sdk/issues/416
👍 1
c
@full-greece-2387 is working on it next 🙂
w
Maybe
llm
should be a parameter on the conversation instead of the agent?
and then we could have
conversation.set_llm
(and maybe we also need
agent.set_llm
)
c
> Maybe
llm
should be a parameter on the conversation instead of the agent? then there's the case of condenser LLM ... and then conversation will quickly becomes an agent (need to host multiple different LLMs)
In this issue we were discussing some sort of "pause conversation" and "reload convo with a brand new LLM" as an approach to solve this https://github.com/All-Hands-AI/agent-sdk/issues/416
w
hmm yeah makes sense that you'd need to pause first
I don't love the idea of reinitializing everything from scratch though...
it seems like a pretty small bit to flip
is it due to agent immutability? why can't we just break that requirement?
c
Yeah, i do want to keep agent immutable, just to prevent us accidentally having more and more stateful information in Agent
to support this switch, i do think it is possible to add a method and persists stuff like this in
ConversationState
rather than overwriting everything from scratch
I guess we might need something like that anyway for routing (cc @full-greece-2387 ) eg if you have internal router state, we might need to store it outside router? 🤔
w
yeah good call on not adding state to the agent. Can we exclude some fields from immutability? 😅
c
Personally, I like that, I would exclude the LLM We need to pick up its API key from the runtime environment in all cases, so it's... "unfinished" without doing that anyway 😅
What if switch llm was like
llm_registry.switch_llm(‘agent’, llm2)
The registry needs to know anyway, I think, to notify observers like ConversationStats. Maybe it could notify Conversation too?
w
I do think it’s reasonable to pre-register each llm before the convo starts
Rather than making it totally open
c
Is this rename… new? Seems so
w
It is
c
Chatting with the agent about this. I don't know why people say that LLMs have no sense of humor 🫠
😂 1