Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions java/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -43,6 +41,23 @@ Add the agent adapter to your `srv/pom.xml`:
</dependency>
```

Add the `agent-memory` model to your project's `package.json`:

```json
{
"cds": {
"requires": {
"agent-memory": {
"model": "com.sap.cds/ai/agent-memory"
}
}
}
}
```

> [!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:
Expand Down
Loading