This guide will walk you through creating your first Klisk agent from scratch. You’ll learn how to scaffold a project, define an agent, create custom tools, and run your agent.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Evincere/klisk/llms.txt
Use this file to discover all available pages before exploring further.
Before starting, make sure you have installed Klisk and have an OpenAI API key ready.
Create Your First Project
Create a new project
Use the This creates a ready-to-run project with the following structure:
klisk create command to scaffold a new agent project:Define Your Agent
Your agent is defined insrc/main.py. Let’s examine the default agent:
src/main.py
Agent Parameters
name— Display name for your agentinstructions— System prompt that defines the agent’s behaviormodel— LLM model to use (supports OpenAI and LiteLLM provider format)tools— List of custom tools to enablebuiltin_tools— Provider-hosted tools like web search (OpenAI only)temperature— Controls randomness (0.0 to 2.0, optional)reasoning_effort— For reasoning models like o3 (optional)
Create Custom Tools
Tools are functions that your agent can call. Let’s look at the example tool insrc/tools/example.py:
src/tools/example.py
How Tools Work
- Decorator — The
@tooldecorator registers your function and automatically generates a JSON schema from type hints - Docstring — The function’s docstring becomes the tool description that the LLM sees
- Type hints — Required for all parameters and return values. The LLM uses these to understand the tool’s interface
- Async — Tools should be async functions (use
async def)
Create a New Tool
Let’s create a tool that searches for information. Createsrc/tools/search.py:
src/tools/search.py
Register Tools with Your Agent
Updatesrc/main.py to use your new tools:
src/main.py
The
get_tools() function looks up tools by their function name. Make sure your tools are imported before calling define_agent(). Klisk automatically imports all Python files in src/tools/.Run Your Agent
There are several ways to interact with your agent:CLI (One-off commands)
Run a single command and get a response:greet tool and respond:
Interactive Chat Mode
Start an interactive chat session:Development Studio
Launch the visual development environment:http://localhost:3000 with:
Agent Graph
Visual representation of your agents and their connected tools
Live Chat
Test your agent with file attachments and see tool calls in real-time
Inline Editing
Modify agent configuration directly from the UI
Hot Reload
Code changes update instantly without restarting
Use Different Models
Klisk supports any LLM provider via LiteLLM. Just prefix the model name:.env file:
.env
Enable Builtin Tools
OpenAI models support provider-hosted tools like web search:src/main.py
web_search— Search the web for informationcode_interpreter— Execute Python code in a sandboxed environmentimage_generation— Generate images from text descriptionsfile_search— Search uploaded files (requiresFileSearchconfiguration)
Next Steps
Congratulations! You’ve created your first Klisk agent. Here’s what to explore next:Core Concepts
Learn about agents, tools, and how they work together
CLI Reference
Explore all available CLI commands
Deploy to Production
Learn how to deploy your agent to Google Cloud Run
API Reference
Detailed API documentation for all functions