QQ: previously we'd made sure that the session and...
# proj-sdk
q
QQ: previously we'd made sure that the session and agent loop were kept separate An example that requires this distinction would be • create a session • perform solvability analysis • abstain from starting agent loop because confidence is low This meant we could accumulate spend for the session even if the agent wasn't kicked off. In the sdk, the conversation, agent, and conversation state are tightly coupled. Ideally
ConversationStats
is part of the
ConversationState
so everything is serialized in one place + the stats can enforce budget limits on the agent loop. atm we cannot create spend for the conversation without instantiating an agent Thoughts on making the agent an optional param for the conversation class?
c
Hmm, what if we initialize the conversation with a non-zero metric?
Eg adding it to the /start endpoint
q
Hmm would that be a public endpoint? could users mess with the stats ?
c
hmm that will be public, but you'd need session api key to access it
OR, do we eventually track these conversation metrics in DB? If so, is it possible to create multiple entry for the same convo ID in DB and aggregate them when needed?
w
we could use the nested runtime for completions
note that session API key is public to the user
(or should be treated as such)
but I think we could add a
/completions
endpoint to the AgentServer and have the AppServer use that
c
but I think we could add a
/completions
endpoint to the AgentServer and have the AppServer use that
i guess that would require we grab a warm runtime at the moment we start a resolver, although it seems reasonable to me
nod 1