How to view the Kilo Code system prompt in the AI Gateway log
This guide demonstrates how to view the Kilo Code system prompt in Ozeki AI Gateway transaction logs. When Kilo Code sends requests to the AI Gateway, the complete interaction including the system prompt is logged. By accessing these logs, you can see exactly what instructions and context Kilo Code provides to the AI model, which is valuable for understanding how the coding assistant operates and troubleshooting interactions.
What is the System Prompt in Kilo Code?
The system prompt is a set of instructions that Kilo Code sends to the AI model with every request to define how it should behave as a coding assistant. This prompt establishes the AI's role, provides context about the development environment, and sets guidelines for code generation. By viewing the system prompt in Ozeki AI Gateway transaction logs, you can understand what instructions shape the AI's responses and troubleshoot how the coding assistant operates.
How to View Kilo Code System Prompt (Quick Steps)
- Open Visual Studio Code
- Send a prompt to Kilo Code
- Wait for task completion
- Open Logs in Ozeki AI Gateway
- Select the log file
- Click Kilo Code transaction logs
- Open the transaction file
- Find and view the system prompt
- View system prompt in viewer
How to View Kilo Code System Prompt (Video tutorial)
In this video tutorial, you will learn how to view the Kilo Code system prompt in Ozeki AI Gateway logs step-by-step. The video covers sending a test prompt to Kilo Code, navigating to the transaction logs, and locating the system prompt within the JSON data.
Step 0 - Make sure Kilo code is setup to use Ozeki AI Gateway
Before you can view system prompts in Ozeki AI Gateway logs, you need to have Kilo Code configured to use Ozeki AI Gateway as its API endpoint. This configuration enables Kilo Code to route all AI requests through your gateway, which logs every transaction including system prompts. If you haven't configured Kilo Code yet, follow our How to Setup Kilo Code with Ozeki AI Gateway guide.
Step 1 - Send prompt to LLM
Open Kilo Code in Visual Studio Code and send a simple test prompt to the AI model. For this example, type "Create a basic calculator in python" in the Kilo Code chat interface. This will trigger a request through your Ozeki AI Gateway, which will be logged (Figure 1).
Step 2 - Wait for task to complete
Wait for Kilo Code to receive the response from the AI model through Ozeki AI Gateway. Once the task is complete and you see the generated code, the full transaction including the system prompt has been logged in Ozeki AI Gateway (Figure 2).
Step 3 - Open Logs in Ozeki AI Gateway
Open your Ozeki AI Gateway web interface and navigate to the Logs section. This section allows you to view user logs, system logs, and reports, where all transaction data is stored and organized by date (Figure 3).
Step 4 - Select log file
In the Logs browser, you'll see folders organized by date. Navigate into the folder that corresponds to when you sent your Kilo Code prompt. Inside, you'll find an index.jlog file which is automatically selected, displaying a table of all transactions for that day (Figure 4).
Step 5 - Click Kilo Code transaction logs file
On the left sidebar, look for the log file where the "API key" says Kilo code and the "Owner" matches your user. Click on the it to view the details (Figure 5).
Step 6 - Open transaction
Clicking on a transaction row will open the corresponding JSON file that contains the complete transaction data. This JSON file includes the full API request sent to the AI provider, including all messages, system prompts, parameters, and the complete response received from the AI model (Figure 6).
Step 7 - Find system prompt
In the JSON transaction file, locate the "messages" array within the request data. The first message with "role": "system" contains the system prompt. Click on the text value next to "content" to open the JSON viewer, which displays the full prompt in a readable format (Figure 7).
Step 8 - View system prompt in viewer
The viewer opens displaying the complete system prompt that Kilo Code sent to the AI model. This viewer shows the full instructions, guidelines, and context that shape the AI's behavior for code generation tasks. You can read through the entire prompt to understand how Kilo Code configures the AI model to act as a coding assistant (Figure 8).
Conclusion
You have successfully accessed and viewed the Kilo Code system prompt through Ozeki AI Gateway transaction logs. By examining the system prompt, you can gain insights into how Kilo Code structures its requests, what guidelines it enforces, and how it optimizes the AI's behavior for code generation tasks. This information is useful for troubleshooting, understanding token usage, and learning how coding assistants interact with AI models.