AbstractTask
The foundational engine for all Cognotik operations. Provides standardized lifecycle management, UI rendering, and robust file system interaction for agentic tools.
Core Framework
Extensible
CustomTask.kt Implementation
class MyTask(config: MyConfig) : AbstractTask(...) {
override fun promptSegment() = "Analyze ${executionConfig?.file}"
override fun run(agent: TaskOrchestrator, ...) {
renderTaskHeader(task)
val content = getInputFileContent(listOf("src/*.kt"), root)
// ... logic ...
task.transcript("MyTask")
}
}
→
Standardized Session UI
Test Workspace Browser
Browse the artifacts and transcripts generated during the AbstractTask test suite execution.
Framework Capabilities
| Method | Purpose |
|---|---|
renderTaskHeader() |
Standardizes the UI header with task name and description. |
getInputFileContent() |
Handles glob patterns, LLM-ignore rules, and document parsing (PDF/Docx to Text). |
transcript() |
Automatically generates and links a Markdown/HTML transcript of the task's thought process. |
acceptButtonFooter() |
Injects a workflow-blocking "Accept" button into the UI for human-in-the-loop validation. |