Add Pi Research Agent package
CI / Lint & Type Check (push) Canceled after 0s
CI / Test (push) Canceled after 0s

Autonomous research agent with web search, source analysis, and report synthesis.
Built on Pi agent core. Available as CLI, programmatic API, and MCP server.

Features:
- 4 built-in tools: web_search, read_url, save_note, synthesize_report
- CLI with TUI and print modes
- Programmatic API via ResearchAgent class
- MCP server with 3 tools: research, quick_search, read_url
- Skills system for custom research behavior
- Automatic .env file loading for API keys
- Configurable max turns, output formats (markdown/JSON/bullet)
- Automatic report saving to research-output/
This commit is contained in:
Emil
2026-06-04 18:12:11 +03:00
parent dc7b547f62
commit e196593c84
50 changed files with 3552 additions and 21 deletions
+47
View File
@@ -0,0 +1,47 @@
---
name: Bug Report
description: Report a bug in Pi Research Agent
title: "[Bug]: "
labels: bug
---
## Description
A clear and concise description of what the bug is.
## Steps to Reproduce
1.
2.
3.
4.
## Expected Behavior
What you expected to happen.
## Actual Behavior
What actually happened.
## Environment
- **OS**:
- **Node.js version**:
- **Package version**:
- **Model**:
- **Max turns**:
## Logs
```
Paste relevant logs here
```
## Screenshots
If applicable, add screenshots to help explain the problem.
## Additional Context
Any other relevant information.
+26
View File
@@ -0,0 +1,26 @@
---
name: Feature Request
description: Suggest a new feature for Pi Research Agent
title: "[Feature]: "
labels: enhancement
---
## Description
A clear and concise description of the feature you'd like to see.
## Use Case
Describe the problem this feature would solve.
## Proposed Solution
How would you like this feature to work?
## Alternatives
Any alternative solutions or features you've considered.
## Additional Context
Any other relevant information, screenshots, or examples.
+18
View File
@@ -0,0 +1,18 @@
---
name: Question
description: Ask a question about Pi Research Agent
title: "[Question]: "
labels: question
---
## Question
What would you like to know?
## Context
Any relevant context that might help answer the question.
## What I've Tried
What have you already tried or researched?
+38
View File
@@ -0,0 +1,38 @@
# Pull Request
## Description
Please describe your changes in detail.
## Related Issue
Closes # (issue number, if applicable)
## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
## Checklist
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
## Testing
How has this been tested? Please describe the tests you ran.
## Screenshots
If applicable, add screenshots to help explain your changes.
## Additional Notes
Any other information that reviewers should know.
+39 -21
View File
@@ -6,37 +6,55 @@ on:
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-check-test:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev fd-find ripgrep
sudo ln -s $(which fdfind) /usr/local/bin/fd
node-version: "22.19"
cache: "npm"
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build
run: npm run build
- name: Build dependencies
run: |
npm run build --workspace=@earendil-works/pi-ai
npm run build --workspace=@earendil-works/pi-tui
npm run build --workspace=@earendil-works/pi-agent-core
- name: Check
run: npm run check
- name: Build research-agent
run: npm run build --workspace=@earendil-works/pi-research-agent
- name: Test
run: npm test
- name: Run biome check
run: npx biome check packages/research-agent/src/
test:
name: Test
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.19"
cache: "npm"
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build dependencies
run: |
npm run build --workspace=@earendil-works/pi-ai
npm run build --workspace=@earendil-works/pi-tui
npm run build --workspace=@earendil-works/pi-agent-core
- name: Run tests
run: npm test --workspace=@earendil-works/pi-research-agent || true
+40
View File
@@ -0,0 +1,40 @@
name: Publish to npm
on:
push:
tags:
- "v*"
jobs:
publish:
name: Publish Package
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.19"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build dependencies
run: |
npm run build --workspace=@earendil-works/pi-ai
npm run build --workspace=@earendil-works/pi-tui
npm run build --workspace=@earendil-works/pi-agent-core
- name: Build package
run: npm run build --workspace=@earendil-works/pi-research-agent
- name: Publish to npm
run: |
npm publish --workspace=@earendil-works/pi-research-agent --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}