gmpetrov / databerry

The no-code platform for building custom LLM Agents

Home Page:https://chaindesk.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Agent Jobs

OdapX opened this issue · comments

Goal
Possibility to define scheduled jobs

Example:

  • Generate 10 tweets every day
  • Generate draft email for churn customers
  • Update dev dependencies every friday and tag responsible.
model Worfklow { 
  id String @id @default(cuid())
  name String
  query String?

  agent   Agent?   @relation(fields: [agentId], references: [id], onDelete: Cascade)
  agentId String? @map("agent_id")

  interval WorkflowInterval

  runs Job[]

  createdAt DateTime @default(now()) @map("created_at")
  updatedAt DateTime @default(now()) @updatedAt @map("updated_at")
  @@map("jobs")
}

model Job { 
  id String @id @default(cuid())

  workflow   Workflow?   @relation(fields: [workflowId], references: [id], onDelete: Cascade)
  workflowId String? @map("workflow_id")


  conversation  Conversation?   @relation(fields: [conversationId], references: [id], onDelete: Cascade)
  conversationId String? @map("conversation_id")

  status JobStatus @default(QUEUED)

  createdAt DateTime @default(now()) @map("created_at")
  updatedAt DateTime @default(now()) @updatedAt @map("updated_at")
  @@map("jobs")
}

enum WorkflowInterval {
  HOURLY
  WEEKLY
  DAILY
}

enum JobStatus {
  QUEUED
  PENDING
  DONE
  ERROR
}

Rename Job -> Workflow
Rename JobRun -> Job

JobStatus -> Add RUNNING
JobStatus -> Remove PENDING

UX

  • Same user flow as Datastores with same UI
  • 2 pages: /workflows /workflows/:workflowId
  • /workflow
    • ability to trigger a job manually
  • /workflow/:workflowId
    • 2 tabs -> Jobs | Settings

Image
Image

Adopt same layout as google calendar

Image