Sam
11/04/2025, 11:38 AMuserId 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 instanceFilip Zalewski
11/04/2025, 7:01 PM@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() }
}
}
}Sam
11/04/2025, 7:17 PMFilip Zalewski
11/04/2025, 7:23 PMFilip Zalewski
11/04/2025, 7:23 PM