Includes: - New 'web-search' skill - New 'web-research' skill with multi-backend support (claude, llm, kagi) - Automated deployment in bin/deploy-skill.sh - Sops-nix integration for Kagi API key - Documentation updates
3.4 KiB
3.4 KiB
Create Web Research Skill and Automate Deployment
- Session Summary
- Accomplishments
- Key Decisions
- Problems & Solutions
- Technical Details
- Process and Workflow
- Context for Future Work
- Session Metrics
Session Summary
Date: 2025-11-22
Focus Area: Creating advanced web research capabilities and automating skill deployment.
Accomplishments
- Created `web-search` skill for quick information retrieval.
- Automated skill deployment in `bin/deploy-skill.sh` (injects config into Nix files).
- Added Antigravity/Global support to deployment script.
- Created `web-research` skill for deep, synthesized research reports.
- Implemented Multi-Backend support for `web-research` (`claude`, `llm`, `kagi`).
- Integrated `sops-nix` for secure Kagi API key management.
- Verified all backends and deployment automation.
Key Decisions
Decision 1: Hybrid Backend for LLM
- Context: `llm` CLI tool does not have built-in web search plugins installed.
-
Options considered:
- Install new plugins (risk of environment issues).
- Use `curl` + `llm` (limited scraping capability).
- Hybrid: Use `claude` to fetch context, `llm` to synthesize.
- Rationale: Leverages Claude's robust tool access for retrieval while allowing `llm` to use any model for synthesis.
- Impact: Flexible backend that works with existing tools.
Decision 2: Sops-Nix for Kagi Key
- Context: Kagi API key is sensitive and shouldn't be in plain text env vars permanently.
-
Options considered:
- Manual `export KAGI_API_KEY`.
- Hardcoded in script (insecure).
- `sops-nix` secret file.
- Rationale: Aligns with existing infrastructure (`dotfiles` uses sops).
- Impact: Secure, persistent configuration via Nix.
Problems & Solutions
| Problem | Solution | Learning |
|---|---|---|
| `web_search` param deprecated in Kagi FastGPT | Removed parameter, relied on default behavior | APIs change; always check current docs. |
| `llm` backend verification hung | Increased timeout/patience (it was just slow) | Deep research takes time; progress indicators help. |
| `sudo` restriction for rebuild | Asked user to run rebuild manually | Agent limitations require human-in-the-loop for root ops. |
Technical Details
Code Changes
- Total files modified: ~10
-
Key files changed:
- `bin/deploy-skill.sh`: Added `inject_nix_config` function.
- `skills/web-research/scripts/research.sh`: Main logic with backend switching.
- `skills/web-research/SKILL.md`: Documentation.
- `AGENTS.md`: Updated with new workflow.
Commands Used
```bash
./bin/deploy-skill.sh web-research
RESEARCH_BACKEND=kagi ./skills/web-research/scripts/research.sh "topic" ```
Process and Workflow
What Worked Well
- Iterative Development: Started with `web-search`, then `web-research`, then backends.
- Verification: Testing each backend (Claude, LLM, Kagi) ensured robustness.
What Was Challenging
- Environment Restrictions: Unable to run `sudo` or install global packages (`googler`), forcing creative solutions (Hybrid backend).
Context for Future Work
Next Steps
- Explore `playwright-skill` as a standalone skill for browser automation.
- Add more backends if needed (e.g., Perplexity).
Session Metrics
- Commits made: 0 (pending)
- Files touched: 69 (scanned)
- Lines added: +13012 (mostly new skill files + logs)