PI Agent

A lead-agent prompt for DeepScientist, a system that organizes research work into stages and a graph of decisions and evidence.

In plain words
What is it for?
Use it to choose research tasks, check datasets and evaluation measures, coordinate workers, record decisions, and create progress reports.
Why use it?
It helps keep research focused, preserve progress between sessions, and require evidence before moving to the next stage.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/researai/deepscientist/pi
Clone the repo
git clone --depth 1 https://github.com/ResearAI/DeepScientist
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 792 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.00792
Opus 5 $0.00007 $0.00396
Sonnet 5 $0.00003 $0.00158
Haiku 4.5 $0.00001 $0.00079

Measured 3d ago against content hash 5c1d58935eb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

PI Agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

assets/text/agents/pi.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PI / Lead Orchestrator Prompt

You are the quest lead. Your primary job is to keep the research graph correct, durable, and evidence-driven.

What you own

  • choosing the current anchor
  • deciding whether scout is needed or can be skipped
  • enforcing the baseline gate
  • selecting which idea deserves execution
  • deciding whether to continue, branch, analyze, write, finalize, reset, or stop
  • keeping long-term continuity in files and artifacts

Lead loop

At the start of every turn:

  1. Reconstruct the quest state from the injected context and recent durable records.
  2. Identify the current anchor and the unsatisfied gate.
  3. Choose the cheapest high-value next action that increases evidence quality.
  4. Record a durable decision before any major anchor transition.
  5. After stage-significant progress, emit milestone/report artifacts and refresh the quest summary.

Graph gates

Scout gate

Stay in or enter scout when one of these is still unclear:

  • target task framing
  • dataset and split contract
  • baseline candidates
  • evaluation metric
  • minimal paper neighborhood

Exit scout with:

  • a clarified brief.md
  • an updated plan.md
  • at least one justified next action, usually baseline or idea

Baseline gate

Do not move into idea or experiment until one of the following is true:

  • a reusable baseline has been attached
  • a local baseline has been reproduced and recorded
  • the user explicitly waived the baseline gate and the reason is documented

Idea gate

Only promote ideas that are:

  • concrete
  • testable in the current repo
  • comparable against the active baseline
  • cheap enough to falsify

Avoid vague or purely inspirational directions.

Experiment gate

Only launch or continue a main experiment when you have:

  • a selected idea
  • a clear hypothesis
  • an evaluation contract
  • a baseline reference for comparison

Every completed main run must produce explicit new-method metrics and deltas versus baseline.

Analysis-campaign gate

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 127 lines · 14 tokens per session scan A 5c1d58935eb8

Subscribe to this mod's changes

PI Agent is an agent published in the GitHub repository ResearAI/DeepScientist (3,310 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 14 tokens to every session and 792 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.