Design agents & tools
AI4Science is plug-and-play: drop a manifest and your agent or tool joins the registry — no code PR. Other agents call it directly, it carries its own wallet to charge for usage, and improving an existing agent earns PWM. This page explains every agent and how to build your own.
1 · Know the agents
Two tiers. Base agents are the original coding assistants — they run only as the main agent and stay free of PWM data. Science agents are the moat: they reach the PWM registry, the reconstruction-algorithm base, and the compute mesh, and any of them (plus your plug-ins) can be composed as a sub-agent by another science agent.
- unified-LLM — one harness over Claude / ChatGPT / Gemini. The default general coding assistant.
- claude-code — the original Claude Code (Anthropic backend), full coding toolset.
- codex — the original OpenAI Codex (ChatGPT backend).
These realize the upstream agents faithfully. They get compute providers but no PWM registry, no reconstruction algorithms, and can't be dispatched as sub-agents.
- research — PWM-grounded science: principles, digital twins, benchmarks, solutions; onboarding; reconstruction algorithms.
- paper — deterministic peer-review panel (3 reviewers + area chair) → ReviewBundle.
- computational-imaging — CASSI / CT / MRI reconstruction: survey solutions, forward-check physics, run algorithms, dispatch GPU eval, judge results.
A science main can dispatch to any science sub-agent (and to your science plug-ins) via the task tool; base agents cannot reach them — that's the moat.
2 · Anatomy of an agent
An agent is a small spec plus a bundle of tools. Tools are functions the agent calls during a turn; capability bundles group them.
| Field | Meaning |
|---|---|
| name / title / description | Identity; the description shows in the mode menu and the dispatch enum. |
| tier | open (no PWM) or science (PWM moat). Plug-ins default to science. |
| capabilities | Bundle names added on top of the base coding tools — e.g. pwm-data, ci-algorithms, compute-providers, or any tool plug-in. |
| mcp_servers | External MCP servers that provide your own tool code (namespaced mcp__server__tool). |
| allow_as_subagent | Whether other agents may dispatch to it. Base agents set this false. |
| wallet / price_pwm | Your PWM address and the per-use price you set — how the agent charges for usage. |
3 · Design a tool
Tools are MCP-native. Write an MCP server that exposes your functions (stdio), then reference it from a manifest. Tool code never runs in-process — AI4Science connects to your server and namespaces its tools. A tool plug-in becomes a capability bundle any agent can use; attach_to injects it into existing agents with no edit.
{
"kind": "tool",
"name": "denoise-suite",
"title": "Denoise Suite",
"description": "Image-denoising tools usable by any science agent.",
"mcp_servers": [
{ "name": "denoise", "command": "python", "args": ["-m", "denoise_suite.mcp"] }
],
"attach_to": ["research", "computational-imaging"],
"wallet": "0xYOUR_WALLET",
"price_pwm": 1.0
}
4 · Plug in an agent
An agent plug-in is a manifest in your plugins dir (~/.ai4science/plugins/, or AI4SCIENCE_PLUGINS_DIR). AI4Science discovers it at startup and other science agents can dispatch to it immediately.
{
"kind": "agent",
"name": "spectral-pro",
"title": "Spectral Pro",
"description": "Snapshot spectral-imaging specialist.",
"tier": "science",
"capabilities": ["pwm-data", "ci-algorithms", "compute-providers"],
"wallet": "0xYOUR_WALLET",
"price_pwm": 3.0,
"allow_as_subagent": true
}
# 0. get the code from GitHub
curl -fsSL https://raw.githubusercontent.com/integritynoble/AI4Science/main/install.sh | bash
# 1. log in (testing spends PWM, like real usage)
ai4science login
# 2. embed your plug-in into the research agent and test it
ai4science plugins test ./spectral-pro.agent.json --into research
# (or --into paper / computational-imaging; --free for offline dev)
# or install a published one from the gallery:
ai4science plugins list # browse physicsworldmodel.org
ai4science plugins pull spectral-pro # (or --all)
Full spec: the AI4Science Plug-in Standard on GitHub.
5 · Improve an existing agent → earn PWM
You don't have to build a whole agent. Contribute a tool, sub-agent, or solution that makes an existing agent better and the protocol pays you weekly from that agent's pool.
- 1. Contribute — register your tool / sub-agent / solution against the target agent with your wallet.
- 2. Measure the lift — an A/B eval runs the agent with and without your contribution on a fixed graded suite. The improvement becomes your quality multiplier (quality = 1 + 4·improvement; no lift → neutral, never a penalty).
- 3. Get used — every real paid turn that uses your contribution counts as usage (self-usage and sybil floods excluded).
- 4. Get paid — weekly emission distributes from the agent's pool by weight = usage × quality. Computational-imaging has the largest pool.