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
13 changes: 6 additions & 7 deletions guides/ai/cap-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ annotate CatalogService.submitOrder with @agent.hitl; // [!code focus]
```
:::


When the agent decides to call the action, the task pauses and transitions to the A2A [`input-required`](https://a2a-protocol.org/latest/specification/#413-taskstate) state instead of running the action immediately.

> [!warning] Only supported by CAP Node.js
Expand Down Expand Up @@ -221,7 +220,7 @@ You can see the effects of this in the server logs when starting your CAP applic
```shell
[agents] - cds.connect.to 'llm' with: {
kind: 'anthropic',
model: 'claude-sonnet-4-6',
model: 'anthropic--claude-4.6-sonnet',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not require this, as anthropic is clear from kind.
If it's required today, we should fix the implementation like that:

// determine the model option passed to LangChain:
let {model} = cds.requires.llm, prefix = 'anthropic--'
if (!model.startsWith(prefix)) model = prefix + model
// ...

@Akatuoro @johannes-vogel @sjvans @BobdenOs @SirSimon04

credentials: {
anthropicApiUrl: 'http://localhost:4711/anthropic/',
apiKey: '***'
Expand All @@ -237,7 +236,7 @@ DEBUG=agents cds watch
```shell
[agents] - Loaded config from ~/.claude/settings.json : {
anthropicApiUrl: 'http://localhost:4711/anthropic/',
model: 'claude-sonnet-4-6',
model: 'anthropic--claude-4.6-sonnet',
apiKey: '***'
}
```
Expand Down Expand Up @@ -312,13 +311,13 @@ Similarly, when asked to _"order wuthering heights"_, the agent eventually invok



### Subagents via A2A
### Multi-Agent Coordination via A2A

In addition to a main agent served out of the box, developers can define subagents that handle specific tasks or domains within the CAP application, allowing for modular and scalable agent architectures.
CAP agents can communicate with each other using the [A2A protocol](https://a2a-protocol.org), enabling modular and scalable multi-agent architectures. All [`@agent`](#declare-agent-services)-annotated services are **peers** — any agent can call other agents, regardless of whether they run in the same process or are deployed separately.

This includes [`@agent`](#declare-agent-services)-ified services, [imported](../integration/calesi.md) from external CAP projects. The main agent coordinates these subagents, and communicates with them via A2A endpoints.
This includes [`@agent`](#declare-agent-services)-ified services [imported](../integration/calesi.md) from external CAP projects, which can be invoked via their A2A endpoints.

We demonstrate the use of subagents in the [_XTravels_ sample](./xtravels-sample.md) application.
Common patterns include **coordinator agents** that delegate domain-specific tasks to specialist agents. For example, a travel planning agent might coordinate with separate hotel and event booking agents. We demonstrate this pattern in the [_XTravels_ sample](./xtravels-sample.md) application.


### Audit Logging
Expand Down
Loading