An open API service indexing awesome lists of open source software.

https://github.com/ziteh/agent-pyramid-scheme

Agents delegating to agents, assigning tasks to a sub-agent, keep the context clean and reduce token costs
https://github.com/ziteh/agent-pyramid-scheme

multi-agent subagents

Last synced: 5 days ago
JSON representation

Agents delegating to agents, assigning tasks to a sub-agent, keep the context clean and reduce token costs

Awesome Lists containing this project

README

          

# Agent Pyramid Scheme (APS)

Agents delegating to agents — hand off implementation work to a sub-agent, keeping your main agent's context clean and your token costs down.

A layered agent architecture: the main agent (e.g. Claude Opus, Fable, the powerful and expensive models) handles planning and review, while well-scoped implementation tasks are delegated to a sub-agent (e.g. Qwen3-Coder, DeepSeek-V4, the cheap or local models). This keeps the main agent's context window focused and reduces token costs for repetitive implementation work.

## Usage

**Build:**

```bash
pnpm install
pnpm build
```

**MCP config:**

```json
{
"mcpServers": {
"agent-pyramid-scheme": {
"type": "stdio",
"command": "node",
"args": [
"/path/to/agent-pyramid-scheme/build/index.js",
"--base-url", "http://localhost:11434/v1",
"--model", "gemma4:26b",
"--project-dir", "/path/to/your/project"
]
}
}
}
```

API key env: `AGENT_PYRAMID_SCHEME_LLM_API_KEY`

**Inspector:**

```bash
AGENT_PYRAMID_SCHEME_LLM_API_KEY="$OPENROUTER_API_KEY" pnpm inspector node build/index.js \
--base-url "https://openrouter.ai/api/v1" \
--model "nvidia/nemotron-3-super-120b-a12b:free" \
--project-dir "/path/to/project/"
```

**Guide:**

Paste the contents of [USAGE.md](USAGE.md) into your `AGENTS.md` or `CLAUDE.md` to let the LLM know how to use APC.

## TODO

- [x] Abort task feature
- [ ] WebUI
- [ ] Assigning tasks based on expertise: Multiple distinct LLMs can be configured—some excel at critical thinking, others at coding, and still others at providing quick responses—and the main agent can select the appropriate one based on the task requirements.