Skip to content

[Hackathon] feat: Custom Agent Library + Workflow Time Machine#5096

Open
EmilySun621 wants to merge 1 commit into
apache:mainfrom
EmilySun621:hackathon/agent-library-time-machine
Open

[Hackathon] feat: Custom Agent Library + Workflow Time Machine#5096
EmilySun621 wants to merge 1 commit into
apache:mainfrom
EmilySun621:hackathon/agent-library-time-machine

Conversation

@EmilySun621
Copy link
Copy Markdown

@EmilySun621 EmilySun621 commented May 16, 2026

TL;DR: Users create their own specialized AI agents (like a "GPTs Store" for data science workflows) and get Git-like visual version control to track and revert every change — human or AI.

⚠️ Still under testing


😤 The Problem

A biomedical researcher asks Texera's generic AI agent to build a workflow. It uses the wrong methodology, skips evaluation metrics, and ignores her lab's standards. She spends an hour fixing it. Her student asks the same question next week and gets different, equally wrong results.

No customization. No consistency. No undo.


✨ What We Built

🤖 1. Custom Agent Library

A platform where users create, configure, and share domain-specific AI agents — each with its own expertise baked in.

  Feature Details
🎛️ Agent creation Domain, methodology, guardrails, custom rules, knowledge base uploads
🧩 Operator-aware prompts 163 built-in Texera operators injected into the agent's context — agents generate native DAGs, not Python UDFs
🧠 Model selection Claude Opus for complex tasks, Haiku for simple ones
💬 Per-agent chat history Each agent maintains its own conversation per workflow
👥 Sharing Create once, share with your entire lab/team

🎬 Demo Walkthrough

  1. 🧬 Create a "Diabetes Research Agent" with CRISP-DM methodology + guardrails
  2. 💬 Ask it to build a classification workflow → proper DAG appears on canvas using built-in operators
  3. ⏳ Open Time Machine → see the 🤖 agent snapshot in the timeline
  4. 💥 Make a mistake → one-click revert
  5. 🔍 Compare two versions → see exactly what changed

🏗️ Architecture

┌─────────────────────────────────────────────────┐
│  🖥️  Frontend (Angular)                         │
│  • Agent Library page (browse/create/edit)      │
│  • Agent selector in chat panel                 │
│  • Time Machine panel + timeline UI             │
├─────────────────────────────────────────────────┤
│  ⚙️  Backend                                     │
│  • agent-service (TS) — system prompt builder   │
│    with operator catalog injection              │
│  • workflow_snapshot table + REST endpoints      │
│    (Amber/Scala)                                │
│  • workflow-history-tool — agent tool for        │
│    version control                              │
├─────────────────────────────────────────────────┤
│  🔒 Texera Core Engine (Amber) — UNMODIFIED     │
│  Everything is additive: new modules,           │
│  new endpoints, new components                  │
└─────────────────────────────────────────────────┘

📊 +3,903 / -533 lines across 44 files · 🔒 Zero modifications to Texera's core engine


💡 Why This Matters

Most approaches build one agent that does one thing. We built a platform where users create their own agents that do anything — plus a safety net so they never lose work.

For researchers who don't write code, this is the difference between:

"AI that sometimes helps"

"AI that works the way my lab works, every time."

This bundles the feature work that built up on this branch:

- Custom agents: dashboard CRUD page and editor dialog (48px icon tile,
  chip-style guardrails, model selector). Each custom agent now carries a
  LiteLLM model_name (Opus 4.7 / Haiku 4.5) that is passed through to the
  agent-service so different agents can use different models.

- Conversation history is scoped per (workflowId, agentId): switching
  agent or workflow yields a different conversation list. localStorage
  key: texera.workflowConversations.v1.{workflowId}.{agentId}.

- Time machine: workflow snapshot list, revert, and agent-tagged
  checkpoints. New workflow-history-tool in agent-service backs the
  "undo my last change" flow; amber gains a WorkflowSnapshotResource;
  sql/updates/23.sql adds the snapshot table.

- Operator-aware custom-agent prompts: the system prompt now injects the
  full operator catalog with a "prefer built-in operators over Python
  UDFs" rule, sourced from WorkflowSystemMetadata at request time.

- LiteLLM: added the claude-opus-4.7 entry alongside claude-haiku-4.5
  and gpt-5-mini in bin/litellm-config.yaml.

- Agent panel rewritten around the (conversation list / chat) two-view
  model with subscription-managed list reloads and per-step persistence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added engine ddl-change Changes to the TexeraDB DDL frontend Changes related to the frontend GUI dev common agent-service labels May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-service common ddl-change Changes to the TexeraDB DDL dev engine frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant