create-koog
v1.2.1
Published
Initialize a new Coral Koog agent project
Readme
Koog Coral Agent (Kotlin)
This is a template for building autonomous agents in Kotlin using the Koog framework and CoralOS.
Hydration
You can transform this template into your own project using either NPM (recommended) or Gradle:
Option 1: Using NPM (Recommended)
Run the following to create a new project. You will be prompted for a name if you don't provide one:
npm create koog <my-cool-agent>You can also pass hydration options (see below):
npm create koog <my-cool-agent> --packageName=com.example.myagentor just:
npm create koogOption 2: Using Gradle
If you have already cloned the repository, run the hydration task directly:
./gradlew -q hydrateThe tool will prompt you for:
- Agent name: kebab-case name (e.g.,
my-cool-agent). - Package name: Java/Kotlin package (e.g.,
com.example.myagent).
Alternatively, you can provide these (and other options) as arguments:
./gradlew -q hydrate --agentName=my-cool-agent --packageName=com.example.myagentHydration Options
--agentName: Name for the agent (kebab-case, e.g.,my-cool-agent).--packageName: Java/Kotlin package name (e.g.,com.example.myagent).
What hydration does:
- Updates
build.gradle.kts,settings.gradle.kts, andcoral-agent.tomlwith your project info. - Renames packages in all Kotlin source files.
- Moves source files to the correct directory structure.
- Removes the template's git remote.
- Commits the changes using the CoralOS identity.
- Removes the hydrator code (
buildSrc,package.json,create-koog.js, and thehydratetask) so the project is clean.
Requirements
- JDK 24
- Git
- (Optional) Node.js/NPM (for
npm create koog)
Running the Agent
Once hydrated, you can run the agent with:
./gradlew -q run