Skip to content

For validation of generated code, we only have validateModule , we should support validateSyntax or similar which can validate standalone code #522

@pratik-fractl

Description

@pratik-fractl

This is what we do for validating a code we generate. This requires we have module <something>.<name>

agent workflowCreator {
  instruction "${WORKFLOW_CREATOR_INSTRUCTION}",
  llm "sonnet_llm",
  validate agentlang/validateModule,
  retry AgentCraft/classifyRetry,
  responseSchema AgentCraft/Generated
}

We must support something like:

agent workflowCreator {
  instruction "${WORKFLOW_CREATOR_INSTRUCTION}",
  llm "sonnet_llm",
  validate agentlang/validateSyntax,
  retry AgentCraft/classifyRetry,
  responseSchema AgentCraft/Generated
}

So, if it generates just this:

workflow createHubspotContact {
    {hubspot/Contact {
        email createHubspotContact.email,
        first_name createHubspotContact.firstName,
        last_name createHubspotContact.lastName
    }} @as contact;

    {ContactSearchResult {
        contactFound true,
        existingContactId contact.id
    }}
}

The validator must work.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions