{"id":51214858,"url":"https://github.com/ziteh/agent-pyramid-scheme","last_synced_at":"2026-06-28T03:31:31.012Z","repository":{"id":364692576,"uuid":"1267573784","full_name":"ziteh/agent-pyramid-scheme","owner":"ziteh","description":"Agents delegating to agents, assigning tasks to a sub-agent, keep the context clean and reduce token costs","archived":false,"fork":false,"pushed_at":"2026-06-14T03:46:43.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T05:19:20.039Z","etag":null,"topics":["multi-agent","subagents"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ziteh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-12T17:01:58.000Z","updated_at":"2026-06-14T03:47:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ziteh/agent-pyramid-scheme","commit_stats":null,"previous_names":["ziteh/agent-pyramid-scheme"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ziteh/agent-pyramid-scheme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziteh%2Fagent-pyramid-scheme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziteh%2Fagent-pyramid-scheme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziteh%2Fagent-pyramid-scheme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziteh%2Fagent-pyramid-scheme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziteh","download_url":"https://codeload.github.com/ziteh/agent-pyramid-scheme/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziteh%2Fagent-pyramid-scheme/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34876271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["multi-agent","subagents"],"created_at":"2026-06-28T03:31:30.160Z","updated_at":"2026-06-28T03:31:30.992Z","avatar_url":"https://github.com/ziteh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent Pyramid Scheme (APS)\n\nAgents delegating to agents — hand off implementation work to a sub-agent, keeping your main agent's context clean and your token costs down.\n\nA 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.\n\n## Usage\n\n**Build:**\n\n```bash\npnpm install\npnpm build\n```\n\n**MCP config:**\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-pyramid-scheme\": {\n      \"type\": \"stdio\",\n      \"command\": \"node\",\n      \"args\": [\n        \"/path/to/agent-pyramid-scheme/build/index.js\",\n        \"--base-url\", \"http://localhost:11434/v1\",\n        \"--model\", \"gemma4:26b\",\n        \"--project-dir\", \"/path/to/your/project\"\n      ]\n    }\n  }\n}\n```\n\nAPI key env: `AGENT_PYRAMID_SCHEME_LLM_API_KEY`\n\n**Inspector:**\n\n```bash\nAGENT_PYRAMID_SCHEME_LLM_API_KEY=\"$OPENROUTER_API_KEY\" pnpm inspector node build/index.js \\\n  --base-url \"https://openrouter.ai/api/v1\" \\\n  --model \"nvidia/nemotron-3-super-120b-a12b:free\" \\\n  --project-dir \"/path/to/project/\"\n```\n\n**Guide:**\n\nPaste the contents of [USAGE.md](USAGE.md) into your `AGENTS.md` or `CLAUDE.md` to let the LLM know how to use APC.\n\n## TODO\n\n- [x] Abort task feature\n- [ ] WebUI\n- [ ] 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziteh%2Fagent-pyramid-scheme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziteh%2Fagent-pyramid-scheme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziteh%2Fagent-pyramid-scheme/lists"}