feat(agents): implement agents feature (v1) #3

Merged
vikingowl merged 1 commits from feature/agents into dev 2026-01-22 12:08:27 +01:00
Owner

Summary

Implements the Agents feature (v1) as discussed in issue #7.

Features

  • Agent identity: name, description
  • System prompt: reference from existing Prompt Library (promptId)
  • Tool set: subset of available tools per agent (enabledToolNames)
  • Optional preferred model
  • CRUD operations: full create, read, update, delete functionality
  • Project-agent relationships: many-to-many via junction table
  • Per-chat agent selection: AgentSelector dropdown in chat UI

Technical Implementation

  • IndexedDB storage with schema v7 (agents and projectAgents tables)
  • Svelte 5 runes for reactive state management (AgentsState)
  • Tool filtering via getToolDefinitionsForAgent()
  • Prompt resolution with 'agent' source at priority 3
  • Settings UI via AgentsTab component
  • Chat integration via AgentSelector component

Test Coverage

  • 22 storage layer tests
  • 22 state management tests
  • 7 tool integration tests
  • 9 prompt resolution tests
  • 14 E2E tests (settings + chat integration)

All 521 unit tests and 14 E2E tests pass.

Test Plan

  • Create agent in Settings → Agents tab
  • Edit and delete agents
  • Select agent in chat via dropdown
  • Verify agent's tools are used (filtered set)
  • Verify agent's prompt is applied
  • E2E tests cover all functionality

Closes #7

## Summary Implements the Agents feature (v1) as discussed in issue #7. ### Features - **Agent identity**: name, description - **System prompt**: reference from existing Prompt Library (`promptId`) - **Tool set**: subset of available tools per agent (`enabledToolNames`) - **Optional preferred model** - **CRUD operations**: full create, read, update, delete functionality - **Project-agent relationships**: many-to-many via junction table - **Per-chat agent selection**: AgentSelector dropdown in chat UI ### Technical Implementation - IndexedDB storage with schema v7 (`agents` and `projectAgents` tables) - Svelte 5 runes for reactive state management (`AgentsState`) - Tool filtering via `getToolDefinitionsForAgent()` - Prompt resolution with 'agent' source at priority 3 - Settings UI via `AgentsTab` component - Chat integration via `AgentSelector` component ### Test Coverage - 22 storage layer tests - 22 state management tests - 7 tool integration tests - 9 prompt resolution tests - 14 E2E tests (settings + chat integration) All 521 unit tests and 14 E2E tests pass. ## Test Plan - [x] Create agent in Settings → Agents tab - [x] Edit and delete agents - [x] Select agent in chat via dropdown - [x] Verify agent's tools are used (filtered set) - [x] Verify agent's prompt is applied - [x] E2E tests cover all functionality Closes #7
vikingowl added 1 commit 2026-01-22 12:02:37 +01:00
Adds agents feature with the following capabilities:
- Agent identity: name, description
- System prompt reference from Prompt Library (promptId)
- Tool set: subset of available tools (enabledToolNames)
- Optional preferred model
- CRUD operations with IndexedDB storage (schema v7)
- Project-agent relationships (many-to-many via junction table)
- Per-chat agent selection via AgentSelector component
- Settings UI via AgentsTab in Settings page

Integration:
- Agent tools filter LLM tool calls via getToolDefinitionsForAgent()
- Agent prompt integrates with prompt resolution (priority 3)
- AgentSelector dropdown in chat UI (opens upward)

Tests:
- 22 storage layer tests
- 22 state management tests
- 7 tool integration tests
- 9 prompt resolution tests
- 14 E2E tests

Closes #7
vikingowl merged commit a31f8263e7 into dev 2026-01-22 12:08:27 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vikingowl/vessel#3