Skip to main content

r/OracleAIDB


How do you keep AI agent memory useful?
How do you keep AI agent memory useful?

The agent memory problem I get pulled into on the storage side is an old summary and the decision that replaced it, both in the database. If the summary wins retrieval, the agent can pick up the older plan. Bigger context windows give the model more room, but they don’t decide what belongs in the turn. Memory for LLM agents stays useful when the right record comes back across sessions and hasn’t been superseded. 

Full conversation history stays as the raw record in the memory stores I work with. Durable facts and decisions are stored apart from episodes of what was tried and how it turned out, including attempts that failed. Each record carries a timestamp and a source, and when entries disagree, that timestamp shows which is newer. 

Semantic search picks up a user circling back to earlier context in their own words, and keyword search can catch what’s easier to find by the exact term. The memory manager’s ranking sets what gets passed into the turn. A chunk can match the question and still be out of date. One example policy puts an active decision above an older summary, though the order varies by application. 

Summaries save the model from rereading long transcripts, but can drop details or drift over time. Superseded decisions and outdated facts can get flagged and demoted, or archived once they stop applying. If the retrieval query checks the flag, demoted entries leave day-to-day results but stay on hand to explain why a path was ruled out. Oracle AI Database can hold the flag and the memory’s vector in one table, where a vector-distance query can filter on it. 

Oracle’s developers blog has a longer walkthrough of these memory layers: https://blogs.oracle.com/developers/which-agent-memory-approach-is-best-for-long-conversations 

How do you decide what your agents should remember and retrieve, and what they should forget? 


Advertisement: The free way to get found by neighbors who are already asking around
The free way to get found by neighbors who are already asking around
The free way to get found by neighbors who are already asking around


Can one AI platform handle LangChain, governed enterprise data, and persistent agent memory?
Can one AI platform handle LangChain, governed enterprise data, and persistent agent memory?

Yes for a lot of agent workloads. How well it holds up depends on whether retrieval and memory can share a data layer with the governed tables or end up in stores of their own. In the setups I’ve been close to, that choice shapes what gets built next. 

LangChain and LangGraph handle orchestration, and each has an Oracle package: langchain-oracledb and langgraph-oracledb. The langchain-oracledb integration plugs in where the framework expects a vector store and a document loader. Retrieval runs inside the same Oracle AI Database that holds the source tables, and the package takes on much of the vector store setup, including embeddings that would otherwise be created manually. 

Data access gets scoped at design time, with limits on the data sources and tools an agent can reach. Those limits still have to be enforced on each retrieval and tool call, under the permissions of whoever the agent is acting for. Metadata filters on product line or region narrow what retrieval returns, and logging citations and tool calls leaves a record of what the agent fetched and did, but neither one decides who’s allowed to see what. 

Short chats get by on buffer memory with token limits. Longer-running workflows store structured state, like the documents an agent picked and its tool results, in place of the full transcript. Entity memory can track recurring names or account IDs, provided each entry has a clear expiration rule. For long-term context, langgraph-oracledb adds two pieces. OracleSaver persists LangGraph checkpoints, so a thread can resume where it left off. OracleStore keeps durable memories as namespaced entries, with optional vector search. Both write to the same Oracle AI Database that runs retrieval, so memory and retrieval share one data layer. 

Consolidating means fewer systems to wire together, at the cost of coupling. LangChain’s model-agnostic connectors keep the model layer swappable even when the data layer isn’t. Some projects still do better with hand-coded pieces than with a framework. 

Oracle's LangChain guide has the integration and build steps: https://www.oracle.com/database/what-is-langchain/ 
 
There's also a companion notebook that builds a deep research agent with its state and memory in Oracle AI Database: https://github.com/oracle-devrel/oracle-ai-developer-hub/blob/main/notebooks/langchain_ecosystem/research_agent_with_deepagents_oracle.ipynb 

When you moved an agent from a notebook to real data, which capability mattered most for keeping data access governed, retrieval or memory persistence? 


How can AI agents remember images and retrieve visual context across conversations?
How can AI agents remember images and retrieve visual context across conversations?

When an agent leans on temporary upload state, a screenshot of an error shared Monday can be gone by Wednesday. If the user brings that error up again, the agent has nothing to look at. To me, keeping the screenshot is a storage question first. 

Starting with version 26.8, Oracle AI Agent Memory supports image memory. It stores the image in Oracle AI Database as a durable record with its bytes, MIME type, description, and metadata such as a case ID. A later session that searches with the same user_id and agent_id can find it. An image can stand alone or attach to a message that keeps text and image in their original order. 

Search in this memory store runs over the description or caption, not the pixels. If the caption never names the error or the region it happened in, a query about either has little to match against. The description comes from the caller or the app’s own vision-model workflow. 

Default reads return the description and metadata and keep the bytes in the database, out of the agent’s context, until the app needs to render or forward the image. 

The notebook in the blog post linked below stores and retrieves a synthetic support screenshot. The image goes in through add_image_async with a description and case metadata. To find it, the notebook sends search_async a plain-English question about checkout timeouts. A metadata filter and record_types=["image"] keep that search on image records from the current run. In the notebook, the bytes come back when it calls list_images_async with include_bytes=True. 

To check it worked, confirm the stored row has a byte length above zero and that a default read shows no bytes. The scoped search should return the current image, and without the metadata filter, images from earlier runs can also match. Scoping by user or case narrows what retrieval returns, but the app still has to check who’s authorized to fetch the original. 

The blog post and notebook are at https://blogs.oracle.com/developers/image-aware-ai-agent-memory-from-visual-inputs-to-searchable-context 

What’s your setup for letting an agent remember screenshots or receipts and retrieve that visual context in a later conversation?