Phase 1 — Core DSL (in progress)
-
Agent<IN, OUT>with SRP enforcement -
Agent.prompt— base context string for the LLM - Skills-only execution — all agents run through
skills { implementedBy { } } -
Skill.description— sells the skill to the LLM alongside its type signature -
Skill.knowledge("key", "description") { }— named lazy context providers;loadFile()inside lambdas -
Skill.toLlmDescription()— auto-generated markdown (name, types, description, knowledge index);llmDescription("...")override -
Skill.toLlmContext()— full context: description markdown + all knowledge content -
Skill.knowledgeTools()/KnowledgeTool(name, description, call)— tools model with lazy per-entry loading -
then— sequential pipeline with composed execution (no runtime casts) -
/— parallel fan-out with coroutine concurrency -
*— forum shorthand with concurrent participants, last-agent captain, andonMentionEmitted -
forum { participant(...); captain(...); allowForumReturn(...) }— explicit forum roles and finalization permissions - Single-placement enforcement across all structure types
-
.loop {}— iterative execution with(OUT) -> IN?feedback block -
.branch {}— conditional routing on sealed types, composable withthen -
@Generable("desc")/@Guide/@LlmDescription— runtime reflection:toLlmDescription(),jsonSchema(),promptFragment(),fromLlmOutput<T>(),PartiallyGenerated<T> -
model { }— Ollama backend;host,port,temperature; injectableModelClientfor tests; auto-fallback to inline JSON tool-call format for models without native tool support (#706) - Agentic execution loop — multi-turn tool calling with budget controls (
maxTurns,maxToolCalls,maxDuration,perToolTimeout,maxTokens,maxConsecutiveSameTool) +onToolUseobservability hook (#637, #963, #969) - Skill selection — manual
skillSelection {}+ automatic LLM routing when multiple skills match -
onError { Throwable -> }— infrastructure-error observability hook (LLM transport, response parse, budget); pure observability — original exception always rethrows (#962) -
Agent.observe { event -> }— sealedPipelineEventbridges the four hooks (skill / tool / knowledge / error) into one typed stream; composes additively (#965) -
Agent.toString()+Agent.describe()— readable single-line + multi-line debug output replacing the JVM identity-hash default (#970) -
onBudgetThreshold(threshold) { reason, usedPercent -> }— pre-cap warning hook; fires once perBudgetReasonwhen cumulative usage crosses the fraction, before the cap throws (#966) -
loadResource(path)/loadResourceOrNull(path)— read agent system prompts from classpath resources; fail-fast at agent construction when path is missing; UTF-8 decoded; leading-slash normalized (#980) -
>>— security/education wrap
Phase 2 — Runtime + Distribution (Q2 2026)
Priority:
-
Tool<IN, OUT>hierarchy +McpTool<IN, OUT>— MCP as native Tool inheritance, not a wrapper - MCP client integration —
McpToolinstances consumable alongside local tools -
grants { tools(...) }— Layer 2 permissions use actualTool<*,*>references - Permission model: 3 states — Granted (auto-runs), Confirmed (user approval), Absent (unavailable)
- KSP annotation processor — compile-time
@Generable; constrained decoding (Ollama) + guided JSON mode (Anthropic/OpenAI) - Native CLI binary (GraalVM — no JRE required);
brew, npm, pip, curl, apt - jlink minimal JRE bundle for runtime (~35MB)
Secondary:
- Session model — multi-turn
AgentSession, automatic compaction (SUMMARIZE,SLIDING_WINDOW,CUSTOM) - Reactive context hooks —
beforeInference,afterToolCall(context-mutating) - Agent memory —
MemoryBank,memory_read/memory_write/memory_searchauto-injected tools -
.spawn {}— independent sub-agent lifecycle,AgentHandle<OUT>, parent-managed join -
Flow<PipelineEvent>for reactive UIs + Pipeline-level events (StageStarted,PipelineCompleted, etc) — depends on streaming, sub-agents, sessions - Serialization —
agent.json, A2A AgentCard - JAR bundles and folder-based assembly
- Gradle plugin
Phase 3 — Production (Q3 2026)
- Layer 2: Full Structure DSL with delegates, grants, authority, routing, escalation
- All 37 compile-time validations enforced by Gradle plugin
- AgentUnit testing framework — unit, semantic (LLM-as-judge), Skill Coverage metrics
- A2A protocol support (server + client)
- File-based knowledge:
skill.md,reference,examples,checklist+ RAG pipeline - Production observability: OpenTelemetry traces
- Team DSL — swarm coordination (if isolated execution available)
Phase 4 — Ecosystem (Q4 2026)
- Knowledge packs — battle-tested prompt libraries for common domains
- Agent generation from natural language (NL → Kotlin DSL)
- Skillify — extract reusable skills from session transcripts
- Visual structure editor, UML bidirectional conversion
- Knowledge marketplace