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
{{ message }}
Repository navigation
Commit 4df0115
Browse filesBrowse the repository at this point in the historyBrowse files
The credentials step could only set a model and an API key, so reaching a
proxy, gateway or self-hosted server meant hand-editing the config file
afterwards. ProviderConfig already carried baseUrl and three of the four
factories applied it, so onboarding was the only missing piece.
Add an optional Base URL field to the credentials step, carried through the
session and written to agent.llm.providers.default.base-url only when it is
filled in. The value is trimmed, pre-filled from existing configuration, and
cleared alongside the model and API key when the provider changes.
GoogleGenAiChatModelFactory was the one factory ignoring baseUrl: its SDK
takes the endpoint as HttpOptions on the client rather than on the chat
options, so it needed wiring separately.
---------
Co-authored-by: rdehuyss <ronald.dehuysser@gmail.com>
| subagent `TaskTool`| Dispatch to subagents in `workspace/agents/`|
110
+
| auto-discovered tools | e.g. `BraveWebSearchTool` (only if Brave API key configured) |
109
111
110
-
**Supported LLM Providers** — each lives in its own `providers/<name>/` module and contributes its `AgentOnboardingProvider` through an `@AutoConfiguration` class registered in the module's `AutoConfiguration.imports`. The active model is selected centrally by `spring.ai.model.chat` (Spring AI), not per-provider; the default`unknown` disables all of them until onboarding sets it:
112
+
**Supported LLM Providers** — each lives in its own `providers/<name>/` module and contributes its `AgentOnboardingProvider` through an `@AutoConfiguration` class registered in the module's `AutoConfiguration.imports`. Each provider in `agent.llm.providers.*`is built through a `ChatModelFactory` SPI implementation and registered in `DefaultChatClientRegistry`; the `default` entry is the main agent's provider:
-**`ConfigurationManager`** (`base/src/main/java/ai/javaclaw/configuration/ConfigurationManager.java`): Updates nested YAML key-value paths in `application.yaml`via SnakeYAML. Publishes `ConfigurationChangedEvent` on update.
141
-
- Runtime config file: `app/src/main/resources/application.yaml` (read at startup; mutated by onboarding).
142
+
-**`ConfigurationManager`** (`base/src/main/java/ai/javaclaw/configuration/ConfigurationManager.java`): Updates nested YAML key-value paths in the runtime config file via SnakeYAML. Publishes `ConfigurationChangedEvent` on update, which triggers a full application restart.
143
+
- Runtime config file: `app/src/main/resources/application.private.yaml` (gitignored; imported into `application.yaml` via `spring.config.import`; read at startup and mutated by onboarding and the agents UI). `application.yaml` holds static defaults only.
142
144
- Key config paths:
143
145
-`agent.onboarding.completed` — set to `true` after onboarding
144
146
-`agent.workspace` — path to workspace root (`file:./workspace/`)
145
-
-`spring.ai.model.chat` — overridden to selected provider/model during onboarding
147
+
-`agent.llm.providers.<name>.*` — `provider`, `base-url`, `api-key`, `model` per named provider (the `default` entry drives the main agent)
146
148
-`jobrunr.background-job-server.worker-count: 1`
147
149
-`jobrunr.dashboard.port: 8081`
148
150
149
151
---
150
152
153
+
## Agents (Subagents)
154
+
155
+
The main assistant can delegate to subagents. Each subagent is defined by two pieces:
156
+
157
+
-**Instructions**: a Markdown file `workspace/agents/<name>.md` with `name`, `description`, and `model` frontmatter plus a Markdown body (the subagent's instructions).
158
+
-**Provider config**: a named `agent.llm.providers.<name>` entry in `application.private.yaml` (`provider`, `base-url`, `api-key`, `model`). The subagent's `model:` frontmatter is the routing value — its own provider-entry name.
159
+
160
+
**`SubagentStore`** (`base/.../llm/SubagentStore.java`) reads/writes the Markdown files. `MainChatClientProvider` wires a subagent-dispatch `TaskTool` backed by a per-provider `ChatClient.Builder` map keyed by provider name.
161
+
162
+
The management UI (`GET /settings/agents`, template `settings/agents.html.peb`) is driven entirely by htmx fragments instead of a JSON API:
163
+
164
+
-**`AgentPageController`** (`app/src/main/java/ai/javaclaw/agents/AgentPageController.java`, an `@Controller`) serves HTML fragments:
- The page shell loads the list via `hx-trigger="load"`, opens the drawer via `hx-get` + `hx-on:htmx:after-swap`, saves via `hx-post`/`hx-put`, and deletes via `hx-delete` + `hx-confirm`. The only remaining JavaScript is drawer open/close, provider→default-model cascade, and enabling 422-response swaps.
169
+
170
+
---
171
+
151
172
## Tools and Capabilities
152
173
-**File System:** Read, write, and edit files.
153
174
-**Shell:** Execute bash commands.
@@ -193,8 +214,8 @@ Templates live under `templates/onboarding/`, with plugin steps contributed from
-`plugins/telegram/src/test/` — `TelegramChannelTest`: unauthorized user rejection, authorized message flow (mocked).
199
220
-`providers/anthropic/src/test/` — `AnthropicClaudeCodeBackendTest`: Claude Code OAuth token extraction.
200
-
-`app/src/test/` — `OnboardingControllerTest`: session-based workflow; `JavaClawApplicationTests`: full Spring context load with Testcontainers.
221
+
-`app/src/test/` — `OnboardingControllerTest`: session-based workflow; `AgentPageControllerTest`: agents page fragment + validation behavior; `JavaClawApplicationTests`: full Spring context load with Testcontainers.
0 commit comments