Thank you. It’s pretty much exactly as I wrote: I prefer introducing the API_KEY in main.py (a quite logical place to look), and then pass it to the Agent methods shown so I can pass it to the LLM class. I don’t want to bury them deeply from the start as it’s unintuitive.
Yeah you can pass them in as inputs as you described. Unless you want to use different API keys for kickoffs I think this approach introduces unnecessary overhead. It adds extra code to maintain (the @before_kickoff) methods. I’m not sure it’s worth it.
Thank you. Indeed, I do wish to use different providers and their respective API KEYS. That’s because, apart from getting agents to work, I use observability & evaluation platforms (eg, Langfuse, Comet Opik, Arize AI Phoenix, and OpenLIT) to measure and record metrics.
By the way, I wouldn’t be accessing inputs via the @before_kickoff method (which I know works), but rather via @agent methods by also passing inputs as an argument there. This is what I needed clarification on.