← Guides
Extend kcode

Tools and plugin runtimes

Let the agent work with your services, data, and project-specific operations.

A tool performs one operation

Read a ticket, inspect a build, or query an internal service. The agent sees a tool description and input shape, calls it, and receives a result it can use in its next step. A reusable task that composes operations belongs at the skill level.

Lua is the direct scripting option

Lua plugins can register tools and commands, react to events, and use supported loop hooks. Their manifests declare capabilities. Existing plugin directories hot-reload, making Lua useful for iterating on project-specific behavior.

Wasm is the compiled option

A WebAssembly module implements kcode’s host ABI and runs under Wasmtime. It can register tools and supported intercepts through explicit host imports. This makes it an option for compiled extensions that communicate through the documented imports and exports.

MCP connects an external server

Configure an MCP server through .mcp.json to bring its tools into the session registry. This is useful for existing integrations. It does not give that external server the same loop-interception surface as an in-process plugin.

Packaging and access are separate

A plugin can carry runtime code, content, or both. Capability declarations govern host APIs; session permissions govern tool execution. Shadowing a safety-critical built-in requires additional grants and trust. Plugins do not provide arbitrary native UI panels.

Explore this area