Agent & Tools#

The Llamatik Code agent is a tool-driven loop that takes a natural-language instruction, plans steps, calls built-in tools, and applies changes to your project with a safe diff preview.

How the agent works#

  1. You type an instruction in Agent mode.
  2. The agent makes a first LLM pass to produce a plan.
  3. It executes each step by calling one or more tools.
  4. Results are fed back into the loop until the task is complete.
  5. File writes are shown as a diff preview — you approve before changes land on disk.
  6. After apply, the agent optionally triggers a build and interprets errors.

Built-in tools (available since 1.2.0)#

ToolDescription
read_fileRead the content of any project file
write_fileWrite or overwrite a file (always previewed)
list_filesList files in a directory
search_codeFull-text search across the project
run_terminalExecute a shell command
get_diagnosticsFetch current IDE inspection/compiler errors
explain_build_failureInterpret the last build failure
run_diagnosticsRun plugin self-diagnostics

Git tools (1.3.0+)#

ToolDescription
git_diffDiff of current changes (staged + unstaged)
git_statusWorking-tree status
git_logRecent commit history
git_blameLine-level blame for a file
git_changed_filesFiles changed in the current diff

Project intelligence tools (1.3.0+)#

ToolDescription
index_search_filesFast file search by name pattern
index_search_symbolsSymbol search across the project index
index_list_recentRecently opened or modified files
psi_find_usagesFind all usages of a symbol via PSI
psi_get_typeResolve the type of an expression
psi_get_declarationsList declarations in a file
smart_searchFuzzy search ranked by recency and relevance

Codebase rules (1.3.0+)#

Write persistent natural-language rules that the agent follows in every session:

ToolDescription
rules_getRead the current ruleset
rules_setReplace the ruleset with new content
rules_clearDelete all rules

Example rule: "Always use Result<T> for error returns. Never throw exceptions in repository classes."

Run config tools (1.3.0+)#

ToolDescription
run_config_listList available IDE run configurations
run_config_executeTrigger a run configuration

KMP native tools (1.3.0+)#

ToolDescription
kmp_diagnoseDetect Kotlin Multiplatform native compilation issues
kmp_fix_planGenerate a structured fix plan for KMP native errors

Agent trace panel#

Every tool call is recorded in the What I tried trace sidebar:

  • Tool name and arguments
  • Duration in milliseconds
  • Success / error result
  • MCP server name (for MCP tools)

Context actions#

Right-click any selection or file for quick one-shot operations:

  • Ask About Selection — ask a question about selected code
  • Explain This File — explain the entire current file
  • Refactor Selection — refactor selected code with a diff preview
  • Fix Selected Code — fix selected code
  • Generate Tests — generate a test class for the current file
  • Add Documentation — generate KDoc/Javadoc
  • Edit with Prompt — apply any instruction to the selection
  • Explain Failing Build — interpret the last build error
  • Explain Current Git Changes — explain the current diff and suggest a commit message