diff --git a/java/ai.md b/java/ai.md index 867df248d..e4fd06d3a 100644 --- a/java/ai.md +++ b/java/ai.md @@ -27,10 +27,8 @@ client can talk to them. For compatibility reasons with Joule and Agent Gateway, version 0.3.0 of the A2A protocol is used by default. ::: - -::: warning In-Memory Chat History Only -CAP Java doesn't yet have a persistent chat history. Instead, it stores conversation history in volatile memory. Hence, you need to send all follow-up prompts to the same server instance. -::: +> [!warning] Alpha — Not for Production +> CAP Java agents are under active development. The data model and APIs may change. ### Adding the Dependency @@ -43,6 +41,17 @@ Add the agent adapter to your `srv/pom.xml`: ``` +Import the `agent-memory` model into your project's CDS model: + +```cds +using from 'com.sap.cds/ai/agent-memory'; +``` + +and use the [resolve](./building-plugins#reference-the-new-cds-model-in-an-existing-cap-java-project) goal of the CDS Maven Plugin. + +> [!warning] Persistent Agent Memory +> There is no automatic cleanup yet. Clear the session table periodically. + ### Defining an Agent Annotate a service with `@agent` to expose it as an agent: