You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add @coordinator, AI testing, migrate AiSupport → AgentRuntime
- Add @coordinator documentation (agents/coordinator.md): @fleet,
@AgentRef, AgentFleet API, parallel fan-out, sequential pipelines,
optional agents, weighted routing, local vs remote transport
- Add AI Testing reference (reference/testing.md): AiTestClient,
AiResponse, AiAssertions fluent API for JUnit 5
- Migrate AiSupport → AgentRuntime across all docs (reference/ai,
tutorial/11-ai-adapters, tutorial/12-ai-filters, all integration pages)
- Fix @agent annotation attributes: value→name, skills→skillFile,
remove nonexistent memory attr, add endpoint attribute
- Update splash page and welcome to balance real-time core and AI stories
- Add @coordinator and AI Testing to sidebar navigation
- Update What's New with multi-agent orchestration and AgentRuntime SPI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/src/content/docs/agents/agent.md
+64-10Lines changed: 64 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,9 @@ description: "The @Agent annotation — wiring AI endpoints, commands, tools, sk
25
25
26
26
```java
27
27
@Agent(
28
-
value="/my-agent",
29
-
skills="classpath:skills/my-agent.skills",
30
-
memory=true
28
+
name="my-agent",
29
+
skillFile="skills/my-agent.md",
30
+
description="A helpful assistant"
31
31
)
32
32
publicclassMyAgent {
33
33
@@ -43,15 +43,26 @@ public class MyAgent {
43
43
}
44
44
```
45
45
46
+
## Annotation Attributes
47
+
48
+
| Attribute | Type | Default | Description |
49
+
|-----------|------|---------|-------------|
50
+
|`name`|`String`|_(required)_| Agent name. Used in the registration path (`/atmosphere/agent/{name}`) and in protocol metadata (A2A Agent Card). |
51
+
|`skillFile`|`String`|`""`| Classpath resource path to the skill file (`.md`). The entire file becomes the system prompt. Sections are also extracted for protocol metadata. |
52
+
|`description`|`String`|`""`| Human-readable description for A2A Agent Card metadata. |
53
+
|`endpoint`|`String`|`""`| Custom endpoint path for the agent's A2A protocol endpoint. Overrides the default `/atmosphere/agent/{name}/a2a`. |
54
+
|`version`|`String`|`"1.0.0"`| Agent version for Agent Card metadata and protocol responses. |
55
+
|`headless`|`boolean`|`false`| When `true`, no WebSocket UI handler is registered — agent operates as a headless A2A/MCP service only. |
56
+
46
57
## What `@Agent` Wires
47
58
48
59
| Concern | How it works |
49
60
|---------|-------------|
50
-
|**AI endpoint**| Registers an HTTP/WebSocket endpoint at the path you specify|
61
+
|**AI endpoint**| Registers an HTTP/WebSocket endpoint at `/atmosphere/agent/{name}`|
51
62
|**Commands**| Methods annotated with `@Command` become slash commands with type-safe parameters |
52
63
|**Tools**| Methods annotated with `@AiTool` are registered as portable tools, callable by any LLM backend |
53
-
|**Skill file**| Loaded from the path in `skills`, or auto-discovered at `META-INF/skills/`on the classpath|
54
-
|**Conversation memory**|When `memory = true`, session-scoped conversation history is maintained automatically|
64
+
|**Skill file**| Loaded from the `skillFile` path, or auto-discovered at `META-INF/skills/`by convention|
65
+
|**Conversation memory**|Session-scoped conversation history is enabled by default|
55
66
|**Protocol exposure**| MCP, A2A, and AG-UI protocols are auto-registered based on classpath dependencies |
56
67
57
68
## Full-Stack vs Headless Mode
@@ -61,12 +72,27 @@ By default, `@Agent` runs in **full-stack mode** — it serves a built-in AI Con
61
72
Set `headless = true` to run in **headless mode** — no UI is served. The agent is only reachable via its protocol endpoints (MCP, A2A, AG-UI) or programmatic API. This is the right mode for agent-to-agent communication.
62
73
63
74
```java
64
-
@Agent(value="/background-worker", headless=true)
75
+
@Agent(name="background-worker", headless=true)
65
76
publicclassBackgroundWorker {
66
77
// reachable via A2A, MCP, or direct API — no browser UI
67
78
}
68
79
```
69
80
81
+
Headless mode is also **auto-detected**: if the class has `@AgentSkill`/`@AgentSkillHandler` methods but no `@Prompt` method, it is treated as headless.
82
+
83
+
### Custom Endpoint
84
+
85
+
Use the `endpoint` attribute to set a custom A2A path for headless agents:
86
+
87
+
```java
88
+
@Agent(name="research",
89
+
endpoint="/atmosphere/a2a/research",
90
+
description="Web research agent")
91
+
publicclassResearchAgent {
92
+
// A2A endpoint served at /atmosphere/a2a/research
93
+
}
94
+
```
95
+
70
96
## Commands
71
97
72
98
`@Command` methods are user-facing slash commands. Parameters are declared with `@Param` and are type-safe.
@@ -97,14 +123,42 @@ public List<Order> queryOrders(
97
123
}
98
124
```
99
125
100
-
Tools are automatically registered with the active LLM backend and are also exposed as MCP tools when the MCP module is on the classpath.
126
+
Tools are automatically registered with the active `AgentRuntime` and are also exposed as MCP tools when the MCP module is on the classpath.
127
+
128
+
## Skill File
129
+
130
+
The `skillFile` attribute points to a Markdown file on the classpath that serves as the agent's system prompt. Sections within the file are also extracted for protocol metadata:
131
+
132
+
-`## Skills` — A2A Agent Card skills
133
+
-`## Tools` — cross-referenced with `@AiTool` methods
134
+
-`## Channels` — included in system prompt
135
+
-`## Guardrails` — included in system prompt (LLM self-enforces)
If no `skillFile` is specified, Atmosphere matches by convention — an agent named `devops` will pick up `META-INF/skills/devops.skills` if present.
101
143
102
144
## Conversation Memory
103
145
104
-
When `memory = true`, Atmosphere maintains a session-scoped conversation history. The history is passed to the LLM on every request, giving the agent context about previous exchanges.
146
+
Conversation memory is enabled by default. Atmosphere maintains a session-scoped conversation history — the history is passed to the LLM on every request, giving the agent context about previous exchanges.
105
147
106
-
Memory is stored in-memory by default. For durable persistence, configure a `MemoryStore` implementation.
148
+
Memory is stored in-memory by default. For durable persistence across restarts, add `atmosphere-durable-sessions-sqlite` or `atmosphere-durable-sessions-redis` to the classpath and a `ConversationPersistence` backend is auto-discovered via `ServiceLoader`.
107
149
108
150
## Relationship to `@ManagedService`
109
151
110
152
`@Agent` builds on top of `@ManagedService`. An `@Agent` is a `@ManagedService` with AI-specific wiring added. You can still use `@ManagedService` directly for non-AI real-time endpoints (chat rooms, presence, pub/sub). Protocol annotations (`@McpTool`, `@AgentSkill`, `@AgUiEndpoint`) work on both.
153
+
154
+
## Relationship to `@Coordinator`
155
+
156
+
For multi-agent orchestration, use [`@Coordinator`](/docs/agents/coordinator/) instead. A coordinator subsumes `@Agent` — it adds fleet management on top of the base agent setup. See the [@Coordinator documentation](/docs/agents/coordinator/) for details.
0 commit comments