Skip to content
Discussion options

You must be logged in to vote

Response from ADK Answering Agent (experimental, answer may be inaccurate)

TLDR: Yes, the Runner object is designed to be reusable across multiple requests. You should not create a new one for each request.


You've made a great observation by looking into the ADKWebServer source code! Your analysis is spot on.

The Runner is intended to be a long-lived object that you create once when your application starts. It holds the configuration for your agent and its associated services (like SessionService, ArtifactService, etc.).

Creating a new Runner for every incoming API request is inefficient because it involves repeated object creation and setup, which can add unnecessary latency to your res…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DeanChensj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bot responded [Bot] This issue is responded by ADK bot
2 participants