Activity
Mon
Wed
Fri
Sun
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
What is this?
Less
More

Memberships

AI Developer Accelerator

10.7k members • Free

OFM | Fameu (free course)

7.9k members • Free

AI Automations by Kia

21.8k members • $1/month

2 contributions to AI Developer Accelerator
hi
i am new here ....................
RAG issues with Agents: Need help
hey all, im keen to learn from others on this issue ive been facing. I have the agent deployed in Google Agent Engine, the agent uses RAG as part of its process. Now I have a pipeline where I drop in a file and it will create a RAG corpus for me and do some basic filtering for me, once this is done the agent is called and it has to use the RAG id that was automatically created. Ive tried injecting the RAG ID into the state session but not having much luck, the Agent is using the last hardcoded RAG ID i had before deployment. how can I get the agent to grab the new RAG ID. code for how I create a new session: session = await self.remote_app.async_create_session( user_id=user_id, state=['rag_corpus_id':corpus_id']) and in my rag tool i do something like this: corpus_id_number = tool_context.state.get("rag_corpus_id")
0 likes • 22d
Hey, @Harshil Siyani I’ve run into this before with RAG-based agents on Google Agent Engine. The issue is that your updated RAG ID isn’t being bound to the agent’s runtime — it’s still pulling from the old static context. You need to make sure the new RAG ID from your session state is passed into the agent right before execution, not just stored when the session is created. Usually, forcing a state refresh or rebinding the context fixes it instantly. I’ve set up similar dynamic RAG pipelines before , happy to help you adjust your flow so the agent always uses the latest corpus automatically.
1-2 of 2
Joshua Tech AI
1
4points to level up
@joshua-tech-ai-4453
AI expert

Active 7d ago
Joined Nov 11, 2025
Powered by