Skip to content

feat: v2 - ai assistant - architect subagent#2335

Open
maxy-shpfy wants to merge 1 commit into
05-27-refactor_v2_-_ai_assistant_-_split_tools_bridgesfrom
05-27-feat_v2_-_ai_assistant_-_architect_subagent
Open

feat: v2 - ai assistant - architect subagent#2335
maxy-shpfy wants to merge 1 commit into
05-27-refactor_v2_-_ai_assistant_-_split_tools_bridgesfrom
05-27-feat_v2_-_ai_assistant_-_architect_subagent

Conversation

@maxy-shpfy
Copy link
Copy Markdown
Collaborator

@maxy-shpfy maxy-shpfy commented May 28, 2026

Description

Introduces a Pipeline Architect sub-agent that designs and builds new pipelines — or new stages within an existing pipeline — from a high-level user goal. The architect translates intent into a concrete graph of tasks, bindings, inputs, and outputs using the CSOM tool surface, and can optionally submit a run after a successful build.

Key additions:

  • pipelineArchitect sub-agent (src/agent/agents/subagents/pipelineArchitect.ts): A new specialist agent backed by the orchestrator model. It loads reference skills (tangleBestPractices, componentYamlFormat) at construction time and appends them to its system prompt. It has access to all CSOM tools and submit_pipeline_run.
  • architect.md system prompt: Defines the architect's workflow — inspect current state, plan before mutating, build incrementally, validate, and summarize with entity links. Includes guidance on subgraph design, component-availability constraints, when to defer to repair or debug specialists, and run-submission rules.
  • SkillsLoader (src/agent/skills/loader.ts): Fetches SKILL.md documents over HTTP from a configurable base URL, caches them in IndexedDB keyed by a 6-character build SHA prefix so skills are warm across worker sessions and only re-fetched on deployment.
  • Two new agent skills under public/agent-skills/: componentYamlFormat (Tangle component YAML spec reference) and tangleBestPractices (pipeline structure, component selection, data flow, and common patterns guidelines).
  • skillsBaseUrl config key added to config.ts with a requireSkillsBaseUrl() helper.
  • skillsLoader added to AgentSession and wired into the worker so the loader instance is shared across turns.
  • Dispatcher updated: createDispatcherAgent is now async to await the architect's construction. The dispatcher routing table and prompt now include ask_pipeline_architect with clear guidance distinguishing it from ask_pipeline_repair (new structure vs. fixing existing structure).
  • Observability: ask_pipeline_architect maps to the status label "Designing pipeline...".

Screenshots (if applicable)

AI Assistant - Architect demo.mp4 (uploaded via Graphite)

Test Instructions

  1. Set skillsBaseUrl in src/config/aiAssistantConfig.json to the URL serving the public/agent-skills/ directory.
  2. Open the Tangle Pipeline Studio with an empty canvas and ask the agent to "build me a pipeline that loads a CSV and trains an XGBoost model."
  3. Verify the dispatcher routes to ask_pipeline_architect (status label "Designing pipeline..." should appear).
  4. Confirm the architect calls get_pipeline_state, plans, adds tasks/bindings, and calls validate_pipeline before summarizing.
  5. Ask to "fix a broken connection" on an existing pipeline and verify it routes to ask_pipeline_repair instead.
  6. Ask to "build it and run it" and verify the architect calls submit_pipeline_run only after a clean validation.
  7. Confirm skills are cached in IndexedDB (agentDb.skills) and served from cache on subsequent worker sessions without re-fetching.

Additional Comments

The component-availability constraint is intentional for this release: the architect can only reference components already present in the current pipeline spec. A future search_components tool will lift this restriction.

@github-actions
Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 05-27-feat_v2_-_ai_assistant_-_architect_subagent/a1a47ab

Copy link
Copy Markdown
Collaborator Author

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