feat: Research Agent v2 — pi-agent-core rewrite#296
Open
Conversation
Complete rewrite foundation: - Express 5 TS-style backend (~35 files, lean core) - Agent engine with soul + seed loading (pi-agent-core) - Agent mailbox (JSONL) with steer/queue primitives - 9 tools across 3 categories (coding, communication, orchestration) - Agent seeds: researcher + debugger persona templates - Chat routes with direct SSE streaming (no OpenCode) - Agent routes: spawn, steer, queue, status, output - 37/37 unit tests passing - CI workflow (lint + test)
- Eval runner with JSON scenario definitions and assertions - 5 eval scenarios: file creation, bash exec, read+summarize, multi-file, debug - Assertions: file_exists, file_contains, response_contains, min_tool_calls - Minimal dark-themed chat frontend (pure HTML/CSS/JS, no React) - SSE streaming display with tool event indicators
…ensions
BREAKING: All tools now use the correct AgentTool interface:
- TypeBox schemas for parameters (@sinclair/typebox)
- label property for display
- execute(toolCallId, params) signature
- AgentToolResult<T> return: {content: TextContent[], details: T}
Phase 3 additions:
- Extension loader (lib/extension-loader.js) scans extensions/ on startup
- tmux-runner extension (manifest + 5 tools: spawn, read, send, list, kill)
- Server updated to load extensions and serve /extensions route
Eval results: 5/5 scenarios pass against live Anthropic LLM
- file-creation: 3.8s (1 tool, 2 turns)
- bash-execution: 4.7s (1 tool, 2 turns)
- read-and-summarize: 5.1s (1 tool, 2 turns)
- multi-file-task: 7.1s (2 tools, 2 turns)
- debug-error: 12.6s (3 tools, 4 turns)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Research Agent v2: Full Rewrite
Complete rewrite of the research agent backend from Python/OpenCode to TypeScript/pi-agent-core.
What Changed
researcher/anddebugger/persona templates (soul.md + tools.json + defaults.json)Architecture
Test Results
Unit Tests: 38/38 ✅
Eval Tests (live LLM): 5/5 ✅
Key Design Decisions
Reflection