pi-subagents  by tintinweb

Autonomous sub-agents for IDEs with Claude Code-like interaction

Created 2 months ago
326 stars

Top 83.6% on SourcePulse

GitHubView on GitHub
Project Summary

This pi extension introduces autonomous sub-agents, mirroring Claude Code's interface and functionality. It empowers users to spawn specialized, isolated agents for parallel execution, mid-run steering, and custom configurations, significantly enhancing code exploration, task automation, and development workflows within the pi environment.

How It Works

The core mechanism leverages pi's Agent tool to instantiate sub-agents. Each sub-agent operates with its own distinct tools, system prompt, model, and "thinking" level. The system supports concurrent execution of multiple background agents, managed by a configurable concurrency limit and a "smart group join" strategy for consolidated notifications. Custom agent types can be defined via Markdown files with YAML frontmatter, enabling fine-grained control over agent behavior, tool access, and system prompts. Features like mid-run steering and session resumption provide dynamic control over agent execution.

Quick Start & Requirements

  • Primary install: pi install npm:@tintinweb/pi-subagents
  • Development install: pi -e ./src/index.ts
  • Prerequisites: Requires the pi environment. No other specific hardware or software dependencies are explicitly listed.
  • Links: The primary source of information is the repository itself.

Highlighted Details

  • Mimics Claude Code's UI patterns and tool conventions (Agent, get_subagent_result, steer_subagent).
  • Supports parallel background agents with automatic queuing and configurable concurrency (default 4).
  • Features a live, persistent widget displaying agent activity, token counts, and status.
  • Enables custom agent types defined in .pi/agents/<name>.md with YAML frontmatter for system prompts, models, and tools.
  • Allows mid-run steering to redirect agent tasks without restarting.
  • Supports session resumption, preserving conversation context.
  • Implements graceful turn limits, providing a wrap-up warning before aborting.
  • Offers scheduled agent execution via cron, interval, or one-shot timing.
  • Provides Git worktree isolation for agents, committing changes to a new branch upon completion.
  • Includes persistent agent memory across scopes (project, local, user).
  • Facilitates cross-extension communication via an event bus for programmatic agent control.

Maintenance & Community

No specific details regarding notable contributors, sponsorships, or community channels (e.g., Discord, Slack) are provided in the README text.

Licensing & Compatibility

  • License: MIT
  • Compatibility: No explicit restrictions are mentioned for commercial use or integration with closed-source projects.

Limitations & Caveats

The project is in "Early release" status. Scheduling features have specific restrictions: inherit_context and resume are incompatible with schedules; run_in_background is enforced; scheduled jobs bypass the concurrency queue. Worktree isolation requires the repository to be a Git repository with at least one commit.

Health Check
Last Commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
36
Issues (30d)
14
Star History
161 stars in the last 30 days

Explore Similar Projects

Starred by Lilian Weng Lilian Weng(Cofounder of Thinking Machines Lab), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
59 more.

AutoGPT by Significant-Gravitas

0.1%
184k
AI agent platform for building, deploying, and running autonomous workflows
Created 3 years ago
Updated 3 hours ago
Feedback? Help us improve.