OpenAI-compatible client with mock fallback, tool-calling loop, and /assistant UI. Tools map to /api/v1/ endpoints per ADR 0006 direct-tools decision.
40 lines
1.3 KiB
Markdown
40 lines
1.3 KiB
Markdown
# 88 — LLM agent chat
|
|
|
|
## Goal
|
|
|
|
Natural-language chat that acts on the app via tool-calling against the API, using a provider-agnostic OpenAI-compatible endpoint (self-hosted on the homelab).
|
|
|
|
## Why
|
|
|
|
Users should say "add milk to the shopping list" or "what's on the calendar Friday?" and have the agent use the API.
|
|
|
|
## Depends on
|
|
|
|
- 87 (API surface)
|
|
- ADR `0006-api-llm-agent.md` agent half (MCP yes/no, tool mapping)
|
|
|
|
## Scope
|
|
|
|
- Agent chat UI in the app.
|
|
- OpenAI-compatible client (provider-agnostic).
|
|
- Tool-calling mapped to API endpoints from 87 (and journal if present).
|
|
- Decide MCP vs direct tools in ADR 0006.
|
|
- Smoke tests with **mock/stub** provider in CI — no live LLM in CI.
|
|
|
|
## Out of scope
|
|
|
|
- Training or fine-tuning models.
|
|
- Forward-auth for other homelab apps.
|
|
|
|
## Acceptance criteria
|
|
|
|
- [x] Chat UI sends prompts and shows responses.
|
|
- [x] Tools call the API successfully in dev against the homelab endpoint.
|
|
- [x] CI uses mock provider only.
|
|
- [x] ADR 0006 records provider and MCP decisions.
|
|
|
|
## Notes
|
|
|
|
- Gitea: [#16](https://gitea.ginnoir.com/ginnoir/famapp/issues/16), [#17](https://gitea.ginnoir.com/ginnoir/famapp/issues/17), [#18](https://gitea.ginnoir.com/ginnoir/famapp/issues/18)
|
|
- Depends on [#15](https://gitea.ginnoir.com/ginnoir/famapp/issues/15)
|