Skip to content

feat: Add live-api-debugger template#201

Open
AniketKu23 wants to merge 2 commits into
Lamatic:mainfrom
AniketKu23:main
Open

feat: Add live-api-debugger template#201
AniketKu23 wants to merge 2 commits into
Lamatic:mainfrom
AniketKu23:main

Conversation

@AniketKu23

@AniketKu23 AniketKu23 commented Jul 9, 2026

Copy link
Copy Markdown

PR Checklist

1. Select Contribution Type

  • Kit (kits/<category>/<kit-name>/)
  • Bundle (bundles/<bundle-name>/)
  • Template (templates/<template-name>/)

2. General Requirements

  • PR is for one project only (no unrelated changes)
  • No secrets, API keys, or real credentials are committed
  • Folder name uses kebab-case and matches the flow ID
  • All changes are documented in README.md (purpose, setup, usage)

3. File Structure (Check what applies)

  • config.json present with valid metadata (name, description, tags, steps, author, env keys)
  • All flows in flows/<flow-name>/ (where applicable) include:
    • config.json (Lamatic flow export)
    • inputs.json
    • meta.json
    • README.md
  • .env.example with placeholder values only (kits only)
  • No hand‑edited flow config.json node graphs (changes via Lamatic Studio export)

4. Validation

  • npm install && npm run dev works locally (kits: UI runs; bundles/templates: flows are valid)
  • PR title is clear (e.g., [kit] Add <name> for <use case>)
  • GitHub Actions workflows pass (all checks are green)
  • All CodeRabbit or other PR review comments are addressed and resolved
  • No unrelated files or projects are modified
  • Added a new live-api-debugger kit with these new files:
    • kits/live-api-debugger/README.md
    • kits/live-api-debugger/agent.md
    • kits/live-api-debugger/constitutions/default.md
    • kits/live-api-debugger/lamatic.config.ts
    • kits/live-api-debugger/model-configs/live-api-debugger_generate-text.ts
    • kits/live-api-debugger/prompts/live-api-debugger_generate-text_system.md
    • kits/live-api-debugger/prompts/live-api-debugger_generate-text_user.md
    • kits/live-api-debugger/flows/live-api-debugger.ts (flow definition)
  • Flow wiring (kits/live-api-debugger/flows/live-api-debugger.ts; no flow.json present):
    • Node types used: triggerNode, dynamicNode (for scraper, LLM, and response nodes).
    • How it works:
      • A triggerNode (“API Request”) accepts error_message, failing_code, and api_docs_url (via advance_schema; note: responeType is misspelled in the flow config).
      • A scraper dynamicNode fetches the provided api_docs_url and extracts main content (onlyMainContent: true) to produce documentation context.
      • An LLM dynamicNode (“Generate Text”) runs with:
        • the user prompt (@prompts/live-api-debugger_generate-text_user.md) and system prompt (@prompts/live-api-debugger_generate-text_system.md)
        • model settings from @model-configs/live-api-debugger_generate-text.ts (OpenAI gpt-4o, temperature: 0.2)
        • and outputs generatedResponse.
      • A graphqlResponseNode dynamicNode (“API Response”) maps the LLM output into the GraphQL response as { fix: "{{LLMNode_3.output.generatedResponse}}" }.
      • Edges connect the steps sequentially via defaultEdge, and also include a responseEdge from the trigger to the response node.
  • Added kit configuration and templates:
    • lamatic.config.ts defines the kit metadata and a single step referencing live-api-debugger.
    • constitutions/default.md provides the default behavior rules (helpful/professional; safe, secure code fixes).
    • The prompt templates instruct the model to produce a structured response with Root Cause Analysis, The Fix (Code), and Verification.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7e1f449d-c952-4fab-bd9d-2e9de15013a3

📥 Commits

Reviewing files that changed from the base of the PR and between e413a3f and 5ba0ad1.

📒 Files selected for processing (2)
  • kits/live-api-debugger/README.md
  • kits/live-api-debugger/agent.md

Walkthrough

Live API Debugger adds a new Lamatic kit that accepts an error, failing code, and API docs URL, scrapes the docs, runs the context through an LLM, and returns a markdown fix. It also adds the kit template config, model config, prompts, constitution, and documentation.

Changes

Live API Debugger Kit

Layer / File(s) Summary
Flow definition: nodes, edges, meta, references
kits/live-api-debugger/flows/live-api-debugger.ts
Exports meta, inputs, references, nodes (trigger, scraper, LLM generate-text, response), edges (including responseEdge), and a bundled default export; the trigger node includes a responeType field.
Template config, model config, prompts, and constitution
kits/live-api-debugger/lamatic.config.ts, kits/live-api-debugger/model-configs/live-api-debugger_generate-text.ts, kits/live-api-debugger/prompts/live-api-debugger_generate-text_system.md, kits/live-api-debugger/prompts/live-api-debugger_generate-text_user.md, kits/live-api-debugger/constitutions/default.md
Adds template metadata and GitHub link, sets the OpenAI gpt-4o model with temperature: 0.2, updates the system prompt sections, adds the user prompt template, and adds the default constitution string.
Kit documentation
kits/live-api-debugger/README.md, kits/live-api-debugger/agent.md
Documents the kit workflow and test inputs.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the new Live API Debugger addition.
Description check ✅ Passed The PR checklist template is present and the required sections are filled out well enough.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@AniketKu23

Copy link
Copy Markdown
Author

Please add the agentkit-challenge label.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh pr edit 201 --repo Lamatic/AgentKit --add-label "agentkit-challenge"
gh pr view 201 --repo Lamatic/AgentKit --json labels

Length of output: 560


@AniketKu23 This mission comes with a catch — the command to add the agentkit-challenge label was blocked by workflow restriction settings in this sandbox, so I wasn't able to apply it myself. You'll need to add it manually via the GitHub UI or ask a maintainer with the right permissions to do so.

As for the review — mission accepted, this message will self-destruct... well, not really, but I'm kicking off the review now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/live-api-debugger

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

2 similar comments
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/live-api-debugger

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/live-api-debugger

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/live-api-debugger/agent.md`:
- Line 10: Update the API Response bullet in the agent docs so it matches the
actual contract from live-api-debugger flow output: the runtime returns a JSON
object with a fix field rather than raw Markdown. Change the wording in the
agent.md entry to reference the JSON response envelope and keep it aligned with
the behavior implemented in live-api-debugger.ts.
- Around line 3-9: The markdown in the agent overview is missing required blank
lines after headings, causing the MD022 lint failure. Update the content under
the `## Overview` and `## Flow` headings in `agent.md` to insert a blank line
immediately after each heading while keeping the existing section text
unchanged. This should keep the document markdownlint-clean without altering the
meaning of the `Overview` and `Flow` sections.

In `@kits/live-api-debugger/README.md`:
- Around line 5-13: The README markdown headings in the live-api-debugger docs
are missing required blank lines, causing the MD022 lint warning. Update the
sections headed by “Why this exists”, “How it works”, and “How to test it” in
the README so each heading is followed by an empty line, keeping the existing
content under those headings unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: c0168eb0-40a4-44a2-8a36-da63b2b99613

📥 Commits

Reviewing files that changed from the base of the PR and between dafde4c and e413a3f.

📒 Files selected for processing (8)
  • kits/live-api-debugger/README.md
  • kits/live-api-debugger/agent.md
  • kits/live-api-debugger/constitutions/default.md
  • kits/live-api-debugger/flows/live-api-debugger.ts
  • kits/live-api-debugger/lamatic.config.ts
  • kits/live-api-debugger/model-configs/live-api-debugger_generate-text.ts
  • kits/live-api-debugger/prompts/live-api-debugger_generate-text_system.md
  • kits/live-api-debugger/prompts/live-api-debugger_generate-text_user.md

Comment thread kits/live-api-debugger/agent.md
Comment thread kits/live-api-debugger/agent.md Outdated
Comment thread kits/live-api-debugger/README.md
@github-actions

Copy link
Copy Markdown
Contributor

Hi @AniketKu23! 👋

Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review.

Steps to follow:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

@AniketKu23

Copy link
Copy Markdown
Author

I have already read through all the comments of CodeRabbit and adressed the issues raised.
Please re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant