-
Notifications
You must be signed in to change notification settings - Fork 23
feat: Add Guide Mode - Interactive Onboarding for Beginners #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Implements local LLM support via Ollama integration: - Auto-detects running Ollama instance at localhost:11434 - Fetches available models dynamically from /api/tags endpoint - Supports custom baseURL configuration via OLLAMA_HOST env or config - Zero cost for all Ollama models (local inference) - Comprehensive documentation and test coverage Closes Kilo-Org#154
- Support API key authentication via OLLAMA_API_KEY env or config - Try both /api/tags (native) and /v1/models (OpenAI-compatible) endpoints - Handle baseURL with or without /v1 suffix - Better error handling for remote/secured instances This enables using Ollama behind reverse proxies or via SSH tunnels with authentication.
- Always register Ollama provider with default models (llama3.2, llama3.1, mistral) - Dynamically fetch actual models in background after connection - Prevents repeated API key prompts - Better UX: provider visible immediately, models update after auth - Works both with and without API key configuration
When running 'kilo auth login ollama', users are now prompted for: 1. Host URL (e.g., http://localhost:11434 or remote address) 2. Whether API key is required 3. API key (if required) Configuration is saved to both auth.json and opencode.json for easy setup. Improves UX for configuring remote/secured Ollama instances.
- Add section about 'kilo auth login ollama' command - Include examples for local and remote setups - Document the interactive prompts for host and API key
- When baseURL is set in config, synchronously fetch real models - Only use default models for unconfigured localhost instances - Fix config loading to use correct path - Remote models now populate immediately instead of showing defaults
Model options (including baseURL) were not being passed to the AI SDK.
This caused API calls to go to wrong endpoint without /v1 prefix.
Changed options merge from:
const options = { ...provider.options }
To:
const options = { ...provider.options, ...model.options }
This ensures Ollama's baseURL and apiKey are properly used.
- Add 'guide' agent to agent.ts with discovery-focused permissions - Create guide agent prompt that asks discovery questions - Import guide prompt in agent.ts - Guide mode is a primary mode for onboarding new users Part of Kilo-Org#179
- Create GuideEnterTool and GuideExitTool for mode switching - Register guide tools in ToolRegistry - Update guide agent permissions to allow guide_exit - Add guide mode switch prompt - Complete integration with existing session/agent system Implements Kilo-Org#179
- Add test coverage for GuideEnterTool and GuideExitTool - Verify tool definitions are correctly registered Part of Kilo-Org#179
- Add detailed examples of correct question tool usage - Include JSON schema for question parameters - Clarify that questions array is required - Add step-by-step discovery process instructions Fixes Kilo-Org#179
🐛 Bug Fix: Question Tool UsageFixed an issue where the Guide agent was calling the question tool with invalid arguments. ProblemThe guide agent tried to use the question tool but passed SolutionUpdated the guide prompt (
Updated Prompt Now Includes:Correct format example: {
"questions": [
{
"question": "What are you trying to build?",
"header": "Project Goal",
"options": [],
"custom": true
}
]
}This ensures the AI agent understands the exact schema required by the question tool. Testing
Ready for another test! 🚀 |
- Add guide mode handler in prompt.ts with proper system-reminder injection - Guide mode now shows welcome and workflow instructions to AI - Simplified guide prompt to focus on conversation flow - Removed confusing system-reminder exposure to users - Guide mode now properly initializes before asking questions Fixes Kilo-Org#179 - Guide mode was showing raw system prompts instead of being interactive
🐛 Major Fix: Guide Mode Now InteractiveFixed the core issue where Guide Mode was showing system prompts to users instead of being interactive. Problem
Solution1. Added Guide Mode Handler in prompt.ts // Now properly injects workflow instructions for AI when entering guide mode
if (input.agent.name === "guide" && assistantMessage?.info.agent !== "guide") {
// Inject system-reminder with guide workflow for AI
}2. Simplified Guide Agent Prompt
3. Guide Mode Flow (Now Working)
What Users See NowTesting
Ready for testing! 🚀 |
- Send greeting to user immediately upon entering guide mode - Add clear system-reminder instructing AI to use question tool right away - Simplify agent prompt with exact JSON for each of 5 discovery questions - Remove thinking/reasoning output - just ask questions directly - Clear flow: Greet → Question 1 → Answer → Question 2 → ... → Summary → Offer switch Fixes Kilo-Org#179 - Guide mode now asks discovery questions interactively
🚀 Major Fix: Guide Mode Now Actually Works!Fixed the core issues where Guide Mode wasn't asking discovery questions properly. Problems Fixed1. AI "Thinking" Leaking to Users
2. Not Using Question Tool
3. Wrong Flow
Changes Madesrc/session/prompt.ts
src/agent/prompt/guide.txt
Expected Behavior NowTesting
Ready for testing! 🎉 |
- Remove PROMPT_GUIDE from agent.ts - rely entirely on system-reminder - Make system-reminder extremely explicit about using question tool - Provide exact JSON format for first question - Add clear rules: ONLY use tool, never output text/markdown Trying to force the model to use structured tool calling instead of text output. Fixes Kilo-Org#179
🚨 Attempt #4: Force Tool UsageThe model is still outputting text/markdown instead of using the question tool. What We TriedRemoved agent prompt entirely - Now relying solely on system-reminder injection: // System-reminder now says:
CRITICAL: You are in GUIDE MODE. You MUST use the "question" tool to ask questions.
DO NOT output text questions.
YOUR NEXT ACTION: Call the "question" tool with this exact JSON:
{"questions":[{"question":"What are you trying to build?",...}]}
RULES:
- ONLY use the question tool - never output markdown or text questions
- Ask ONE question at a timeThe Real IssueThe model (gpt-oss-120b-medium via Ollama) is outputting: Instead of calling the tool with: {"questions": [{"question": "What are you trying to build?", ...}]}Root CauseThe model is not being forced into tool-calling mode. The AI SDK supports Alternative ApproachesIf this doesn't work, we may need to:
TestingPlease test with: If it still outputs text instead of using the tool, we'll need to try approach #1 or #3 above. |
- Changed from 1 question at a time to all 5 at once - Provide exact JSON format for all questions in system-reminder - Simpler approach: AI calls question tool once with 5 questions - User fills out entire form, then AI summarizes This should be more reliable than trying to force sequential tool calls. Fixes Kilo-Org#179
🔄 Attempt #5: All 5 Questions At OnceChanged the approach from sequential questions to showing all 5 questions at once. New FlowOld Flow (broken): New Flow (hopefully working): ImplementationSystem-reminder now provides exact JSON for all 5 questions: {
"questions": [
{
"question": "What are you trying to build?",
"header": "1. Project Goal",
...
},
{
"question": "Who is this for?",
"header": "2. Target Audience",
"options": [...],
...
},
// ... 3 more questions
]
}Why This Should Work Better
Expected BehaviorTestingRun: Let me know if the AI now properly uses the question tool with all 5 questions! |
- Filter out system-reminder content from being displayed to users - Send immediate visible greeting with first question in guide mode - System instructions to AI are marked synthetic (hidden) - Remove system-reminder tags from code-switch.txt - Guide mode now properly shows greeting and asks first question Fixes Kilo-Org#179
🚨 Attempt #6: Fixed UI Leak and Guide Mode GreetingProblems Fixed1. System-Reminders Leaking to Users
Fix in // Filter out system-reminder content from display
if (x.text?.includes("<system-reminder>")) return []2. Guide Mode Not Showing Greeting
Fix in
New Guide Mode FlowTestingRun: Expected behavior:
Let me know if this works! 🤞 |
- Use agent prompt with clear instructions - Send synthetic trigger message to start conversation - AI asks questions naturally in text format - Removed complex system-reminder injection - Fixed type errors (session.id not sessionID) This approach is simpler and more reliable than forcing tool usage. Fixes Kilo-Org#179
🔄 Attempt #7: Simplified to Natural ConversationProblemThe model wasn't using the question tool properly. Instead of forcing tool usage, I've simplified the approach. New Simplified ApproachBefore: Trying to force question tool usage with system-reminders and exact JSON ImplementationAgent Prompt (in agent.ts): Prompt.ts - Send trigger message:
Expected BehaviorBenefits
TestingRun: The AI should now greet you and ask "What are you trying to build?" naturally. |
- Add real session example showing Guide Mode flow - Add faceless video script for social media - Include recording tips and platform recommendations Part of Kilo-Org#179
Remove documentation files that were created for video recording: - guide-mode-example.md - record-guide-demo.sh - video-script.md These were helpful for creating examples but don't need to be part of the final PR. Part of Kilo-Org#179
Add comprehensive usage examples showing: - Todo app (beginner project) - Portfolio website (professional project) - API integration (intermediate project) Demonstrates how Guide Mode transforms vague ideas into actionable specifications through natural conversation. Part of Kilo-Org#179
Add actual session data (ses_3c3b076c3ffeSB8zm4uTBhoPFC) as Example 2 showing real-world Guide Mode interaction. Part of Kilo-Org#179
Summary
This PR introduces Guide Mode - a new agent mode designed to help beginners learn "vibe coding" (AI-assisted development). Guide Mode acts as an interactive mentor that asks discovery questions, refines vague ideas, and teaches best practices before any code is written.
Problem
New developers transitioning to AI-assisted coding struggle with:
Solution
Guide Mode provides a structured, educational onboarding experience through natural conversation.
How It Works
kilo --agent guideExample Flow
Full Examples
See USAGE_EXAMPLES.md for detailed examples including:
Changes
Core Implementation
Features
✅ Natural text conversation (no forced tool calling)
✅ 5-question discovery process
✅ Progressive refinement of ideas
✅ Mode switching (Guide → Plan → Code)
✅ Educational - teaches users how to work with AI
✅ Beginner-friendly with encouraging tone
Benefits
For Users:
For Kilo CLI:
Testing
Related Issue
Closes #179
Documentation