Skip to content

[feat] LLM Based Template Logic Executor#123

Open
devanshi00 wants to merge 4 commits intoaccordproject:mainfrom
devanshi00:main
Open

[feat] LLM Based Template Logic Executor#123
devanshi00 wants to merge 4 commits intoaccordproject:mainfrom
devanshi00:main

Conversation

@devanshi00
Copy link
Copy Markdown

@devanshi00 devanshi00 commented Mar 25, 2026

Overview

This PR introduces an LLM-based generic logic executor for Accord Project templates. It enables execution of templates even when no logic.ts is provided, using a reasoning-based fallback powered by an LLM.

The goal is to explore a flexible, extensible alternative to traditional TypeScript-based logic while maintaining full backward compatibility.

  • LLM Executor

    • Acts as a fallback or replacement for logic.ts
    • Processes:
      • contract text
      • Concerto models
      • current state
      • incoming request
    • Produces:
      • updated state
      • response object
      • emitted events
  • Execution Modes

    • disabled – default behavior (TypeScript only)
    • fallback – use LLM only if logic.ts is absent/fails
    • force – always use LLM executor
  • Integration

    • Integrated into TemplateArchiveProcessor
    • Seamlessly fits into existing execution pipeline
  • Normalization Layer

    • Ensures outputs conform to Accord runtime expectations:
      • timestamps
      • identifiers
      • ordering
  • Backward Compatibility

    • Existing templates with logic.ts remain unaffected
  • Logging

    • Clear indication of execution path:
      • TypeScript vs LLM

PR Review

@DianaLease @dselman

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