Skip to content

Add KAI implementation guide for AI agent context#32

Closed
ottomansky wants to merge 1 commit into
keboola:mainfrom
ottomansky:docs/kai-implementation-guide
Closed

Add KAI implementation guide for AI agent context#32
ottomansky wants to merge 1 commit into
keboola:mainfrom
ottomansky:docs/kai-implementation-guide

Conversation

@ottomansky
Copy link
Copy Markdown
Contributor

Summary

  • Adds KAI_IMPLEMENTATION_GUIDE.md — a comprehensive reference document extracted from the profitline-js-app fi-demo branch
  • Covers the full KAI integration architecture: polling proxy pattern, backend (FastAPI) and frontend (React/Next.js) implementation, chat message protocol, UI patterns, and file reference map
  • Intended as system prompt/context for AI agents implementing KAI in Keboola Data Apps

Contents

  1. Architecture overview (three-tier deployment, polling proxy pattern, service discovery)
  2. Environment & configuration (env vars, Nginx, Next.js rewrites)
  3. Backend implementation (FastAPI endpoints, stream buffering, auth)
  4. Frontend implementation (React Context, polling client, system context injection, conversation storage)
  5. Chat message protocol (message formats, SSE event types, tool approval)
  6. Key code patterns (3 minimal, reusable snippets)
  7. UI patterns (floating widget, pin-to-dashboard, suggestions, markdown rendering)
  8. File reference map & design decisions table

Test plan

  • Review document for accuracy against profitline-js-app fi-demo branch
  • Verify code snippets compile/run correctly when used as reference
  • Confirm no sensitive tokens or credentials are included

🤖 Generated with Claude Code

Comprehensive architecture and integration reference extracted from
the profitline-js-app fi-demo branch, covering the polling proxy
pattern, backend/frontend implementation, chat protocol, and UI
patterns for implementing KAI in Keboola Data Apps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jordanrburger
Copy link
Copy Markdown
Collaborator

ngl, seems like a lot. Also, it will go stale quickly if it's just referencing some branch in another repo. I'd say to extract out the branch of profitline-js-app into a new repo and consider it a "reference" python JS app that can be included in the docs too.

@ottomansky ottomansky closed this by deleting the head repository Apr 4, 2026
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.

2 participants