← Guides
Extend kcode

Automate when work starts

Connect an event to a command or prompt instead of waiting to type it yourself.

Project hooks connect a trigger to an action

Schedule a weekly dependency review: ask the agent to check available updates and report which ones need attention. Or notify a running session when CI finishes so it can investigate a failed build. Project hooks declare the event and the command or prompt to run.

Decide what happens when events overlap

If a dependency review is already running, drop another scheduled request instead of starting the same review twice. If several build results arrive, queue them when each needs investigation. Hooks let you choose drop, queue, replace, or parallel behavior.

Connect outside systems

kcode trigger delivers external events to a running session. Webhook-related hooks and headless execution let scripts and CI participate through explicit command-line and event interfaces.

Headless is another way to run the agent

kcode -p runs a prompt without the window and can emit text, JSON, or newline-delimited JSON. A CI script can submit a prompt and consume structured results; its configured permission mode determines which actions the agent can take.

A trigger is not a capability

The hook answers “when should work start?” A skill answers “how do we perform this reusable task?” A scheduled video review might invoke the same frame-extraction skill that an interactive review uses.

Explore this area