Hi all! Just wondering what approaches you guys us...
# koog-agentic-framework
s
Hi all! Just wondering what approaches you guys use to manage runtime dependencies for tools, like let's say a
userId
or
company
identifier that the tool will need to access during it's execution. These aren't things that the model provides when it calls the tool, but instead are values/properties that are associated with a tool instance
v
Please consider ToolSet 🙂

https://www.youtube.com/watch?v=2l1GBp80CbYâ–¾

starting from
12:44
👀 1
f
I will watch this video as I may be doing this the wrong way, but we had an issue where we wanted to past through a client token downstream to the tool making a request to another internal api. We are using Quarkus as well (it is used in many other parts of our project, and found it worked relatively nicely with Koog).
Copy code
@ApplicationScoped
class DocumentLookupAgent(
    private val agentConfiguration: AgentConfiguration,
    private val documentPersistenceHelper: DocumentPersistenceHelper,
) {

    @Inject
    @field:RestClient
    private lateinit var centralApiClient: CentralApiClient

    fun createAgent(bearerToken: String): AIAgent<String, String> {
        // agent details

        return AIAgent(
            promptExecutor = agentConfiguration.getSimpleGoogleAiPromptExecutor(),
            toolRegistry = ToolRegistry {
                tools(DocumentLookupTools(bearerToken, internalApiClient, persistenceHelper))
            },
            strategy = strat,
            agentConfig = config,
        ) {
            install(OpenTelemetry) { addLangfuseExporter() }
        }

    }
}
s
ah so for each token, you're spawning a new tool/s instance?
f
Yeah, unfortunately that was the easiest and most reliable way we found internally.
I will watch the video linked above to see what other options exist for us.