Skip to content

feat(examples): kotlin-koog-engram-cloud-demo (re-target to main)#5

Merged
sunilp merged 1 commit intomainfrom
feat/kotlin-koog-engram-demo
May 8, 2026
Merged

feat(examples): kotlin-koog-engram-cloud-demo (re-target to main)#5
sunilp merged 1 commit intomainfrom
feat/kotlin-koog-engram-demo

Conversation

@sunilp
Copy link
Copy Markdown
Member

@sunilp sunilp commented May 8, 2026

Summary

Re-introduces the Kotlin Koog + Engram + JamJet Cloud demo to main. The original PR #4 was merged into PR #3's feature branch after PR #3 had already merged into main, so this commit (32c8a9b) never landed on main. This PR fixes that — same single commit, no drift, additive only (15 files / +1370 LOC under examples/kotlin-koog-engram-cloud-demo/).

What's in it

  • JamjetCloudExporter.kt (~165 LOC) — Koog 0.8.0 OpenTelemetry feature extension addJamjetCloudExporter(...) that ships spans to JamJet via OTLP/JSON. Includes a custom OTLP/JSON marshaler since published Koog 0.8.0 doesn't ship one.
  • Kotlin Koog agent with multi-turn chat + Engram-backed memory tools
  • PreflightCheck.kt — validates env vars + Engram /health before the server accepts requests
  • README + docker-compose.yml + .env.example covering the cross-platform run flow
  • Smoke verified locally end-to-end before the original PR; OTLP intake is now live in prod (api.jamjet.dev/v1/otlp/v1/traces, deployed 2026-05-08), so the demo points at prod by default.

Why now

OTLP/JSON intake (jamjet-cloud PR #15) shipped to prod today, which is what makes this demo land cleanly — Koog → OTLP exporter → api.jamjet.dev → dashboard at cloud.jamjet.dev/dashboard/graph (alias of app.jamjet.dev). Without the OTLP route this demo couldn't reach prod.

Test plan

  • cd examples/kotlin-koog-engram-cloud-demo && docker compose up -d && ./gradlew bootRun
  • curl -X POST localhost:8181/chat?session=alice -d '{"message":"my favorite color is teal"}'
  • Confirm trace appears in cloud.jamjet.dev/dashboard/graph tagged service.name=kotlin-koog-engram-demo

Followups (not blocking this PR)

  • Open upstream Koog PR contributing addJamjetCloudExporter as ai.koog:agents-features-opentelemetry-jamjet
  • Replace the inline OTLP/JSON marshaler once upstream Koog ships one

…Jet OTLP

A Kotlin/Spring Boot reference demo showing how a Koog agent (JetBrains'
Kotlin agent framework) ships traces to JamJet Cloud via OTLP/JSON.

The headline file is cloud/JamjetCloudExporter.kt: a single extension
function on Koog's OpenTelemetryConfig that mirrors the addDatadogExporter /
addLangfuseExporter pattern shipped by Koog itself. Drop it into any Koog
agent's install(OpenTelemetry) block and JamJet sees every LLM span,
tool span, and cost rollup.

The demo wires:
- Koog 0.8.0 AIAgent with singleRunStrategy + ToolRegistry
- koog-spring-boot-starter — autoconfigures OpenAI MultiLLMPromptExecutor
- agents-features-opentelemetry-jvm — the OpenTelemetry feature
- engram-spring-boot-starter — autoconfigures EngramClient
- MemoryTools as a Koog ToolSet with @tool / @LLMDescription methods backed
  by Engram for durable memory across chat turns
- A custom OTLP/JSON SpanExporter (Java OTel SDK has protobuf only in 1.37,
  JamJet's intake is JSON-only)

Smoke-tested end to end against the local JamJet stack: 8 traces ingested,
each tagged service.name=kotlin-koog-engram-demo, with LLM + tool spans and
cost data populated correctly.

Standalone Maven module — not registered in root pom <modules>.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Warning

Rate limit exceeded

@sunilp has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 31 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e2bcb6a2-7fae-4915-9bb2-56fc1d236530

📥 Commits

Reviewing files that changed from the base of the PR and between b4a33f8 and 32c8a9b.

📒 Files selected for processing (15)
  • examples/kotlin-koog-engram-cloud-demo/.env.example
  • examples/kotlin-koog-engram-cloud-demo/.gitignore
  • examples/kotlin-koog-engram-cloud-demo/.mvn/wrapper/maven-wrapper.properties
  • examples/kotlin-koog-engram-cloud-demo/README.md
  • examples/kotlin-koog-engram-cloud-demo/docker-compose.yml
  • examples/kotlin-koog-engram-cloud-demo/mvnw
  • examples/kotlin-koog-engram-cloud-demo/mvnw.cmd
  • examples/kotlin-koog-engram-cloud-demo/pom.xml
  • examples/kotlin-koog-engram-cloud-demo/src/main/kotlin/dev/jamjet/demo/koogengram/ChatController.kt
  • examples/kotlin-koog-engram-cloud-demo/src/main/kotlin/dev/jamjet/demo/koogengram/DemoApplication.kt
  • examples/kotlin-koog-engram-cloud-demo/src/main/kotlin/dev/jamjet/demo/koogengram/MemoryAgent.kt
  • examples/kotlin-koog-engram-cloud-demo/src/main/kotlin/dev/jamjet/demo/koogengram/MemoryTools.kt
  • examples/kotlin-koog-engram-cloud-demo/src/main/kotlin/dev/jamjet/demo/koogengram/cloud/JamjetCloudExporter.kt
  • examples/kotlin-koog-engram-cloud-demo/src/main/kotlin/dev/jamjet/demo/koogengram/startup/PreflightCheck.kt
  • examples/kotlin-koog-engram-cloud-demo/src/main/resources/application.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/kotlin-koog-engram-demo

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sunilp sunilp merged commit 77b1abf into main May 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant