Skip to main content

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.

AgentRegistry

Singleton registry that tracks all agents and tools in the project.

Fields

agents
dict[str, AgentEntry]
Dictionary mapping agent names to their registry entries
tools
dict[str, ToolEntry]
Dictionary mapping tool names to their registry entries

Methods

get_instance

@classmethod
def get_instance(cls) -> AgentRegistry
Get the singleton instance of the registry.
return
AgentRegistry
The singleton AgentRegistry instance
Example:
from klisk.core.registry import AgentRegistry

registry = AgentRegistry.get_instance()

register_agent

def register_agent(self, entry: AgentEntry) -> None
Register an agent in the registry.
entry
AgentEntry
required
Agent entry to register
Example:
from klisk.core.registry import AgentRegistry, AgentEntry

registry = AgentRegistry.get_instance()
agent = AgentEntry(
    name="my_agent",
    instructions="You are a helpful assistant",
    model="claude-3-5-sonnet-20241022"
)
registry.register_agent(agent)

register_tool

def register_tool(self, entry: ToolEntry) -> None
Register a tool in the registry.
entry
ToolEntry
required
Tool entry to register
Example:
from klisk.core.registry import AgentRegistry, ToolEntry

registry = AgentRegistry.get_instance()
tool = ToolEntry(
    name="calculator",
    description="Performs calculations",
    parameters={"expression": {"type": "string"}}
)
registry.register_tool(tool)

get_agent

def get_agent(self, name: str) -> AgentEntry | None
Retrieve an agent by name.
name
str
required
Name of the agent to retrieve
return
AgentEntry | None
The agent entry if found, None otherwise
Example:
registry = AgentRegistry.get_instance()
agent = registry.get_agent("my_agent")
if agent:
    print(agent.instructions)

get_tool

def get_tool(self, name: str) -> ToolEntry | None
Retrieve a tool by name.
name
str
required
Name of the tool to retrieve
return
ToolEntry | None
The tool entry if found, None otherwise
Example:
registry = AgentRegistry.get_instance()
tool = registry.get_tool("calculator")
if tool:
    print(tool.description)

get_project_snapshot

def get_project_snapshot(self) -> ProjectSnapshot
Get a snapshot of all registered agents and tools.
return
ProjectSnapshot
Snapshot containing copies of all agents and tools
Example:
registry = AgentRegistry.get_instance()
snapshot = registry.get_project_snapshot()
print(snapshot.to_dict())

clear

def clear(self) -> None
Clear all registered agents and tools from the registry. Example:
registry = AgentRegistry.get_instance()
registry.clear()

reset

@classmethod
def reset(cls) -> None
Reset the singleton instance. Useful for testing. Example:
AgentRegistry.reset()

AgentEntry

Dataclass representing a registered agent.

Fields

name
str
required
Unique name of the agent
instructions
str | None
System instructions for the agent
model
str | None
Model identifier (e.g., “claude-3-5-sonnet-20241022”)
tools
list[str]
default:"[]"
List of tool names available to the agent
temperature
float | None
Temperature parameter for model sampling
reasoning_effort
str | None
Reasoning effort level for the agent
source_file
str | None
Path to the source file where the agent is defined
sdk_agent
Any
The underlying Agent object from the SDK
project
str | None
Project name this agent belongs to
Example:
from klisk.core.registry import AgentEntry

agent = AgentEntry(
    name="assistant",
    instructions="You are a helpful coding assistant",
    model="claude-3-5-sonnet-20241022",
    tools=["code_analyzer", "file_reader"],
    temperature=0.7,
    source_file="src/agents.py"
)

ToolEntry

Dataclass representing a registered tool.

Fields

name
str
required
Unique name of the tool
description
str
required
Description of what the tool does
parameters
dict[str, Any]
required
JSON Schema defining the tool’s parameters
source_file
str | None
Path to the source file where the tool is defined
function_tool
Any
The underlying FunctionTool object from the SDK
project
str | None
Project name this tool belongs to
Example:
from klisk.core.registry import ToolEntry

tool = ToolEntry(
    name="search",
    description="Search for information",
    parameters={
        "query": {"type": "string", "description": "Search query"},
        "limit": {"type": "integer", "default": 10}
    },
    source_file="src/tools.py"
)

ProjectSnapshot

Dataclass representing a snapshot of all agents and tools in a project. Returned by AgentRegistry.get_project_snapshot().

Fields

agents
dict[str, AgentEntry]
default:"{}"
Dictionary mapping agent names to their AgentEntry objects
tools
dict[str, ToolEntry]
default:"{}"
Dictionary mapping tool names to their ToolEntry objects
config
dict[str, Any]
default:"{}"
Project configuration dictionary

Methods

to_dict

def to_dict(self) -> dict[str, Any]
Convert the snapshot to a JSON-serializable dictionary. Useful for sending project state to the Studio UI or API clients. Returns: Dictionary with serialized agents, tools, and config Example:
from klisk.core.registry import AgentRegistry

registry = AgentRegistry.get_instance()
snapshot = registry.get_project_snapshot()

# Convert to dict for JSON serialization
data = snapshot.to_dict()

# Structure:
# {
#   "agents": {
#     "agent_name": {
#       "name": "agent_name",
#       "instructions": "...",
#       "model": "...",
#       "tools": [...],
#       "temperature": 0.7,
#       "reasoning_effort": None,
#       "source_file": "src/main.py",
#       "project": "my-agent"
#     }
#   },
#   "tools": {
#     "tool_name": {
#       "name": "tool_name",
#       "description": "...",
#       "parameters": {...},
#       "source_file": "src/tools/example.py",
#       "project": "my-agent"
#     }
#   },
#   "config": {}
# }
Source Reference: src/klisk/core/registry.py:34-66

Build docs developers (and LLMs) love