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.
npx agentmods add agents/wiseaidotdev/autogpt/optimizer-gptgit clone --depth 1 https://github.com/wiseaidotdev/autogptWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00618 |
| Opus 5 | $0.00000 | $0.00309 |
| Sonnet 5 | $0.00000 | $0.00124 |
| Haiku 4.5 | $0.00000 | $0.00062 |
Grade A, and why
optimizer-gpt 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OptimizerGPT
Feature: gpt
OptimizerGPT refactors messy or monolithic code files into clean, well-organized, modular structures. It reads a single large source file, identifies logical separation of concerns, and rewrites it as a set of focused modules following framework conventions.
What OptimizerGPT Solves
Agent-generated code (from BackendGPT or FrontendGPT) often starts as a single large file to satisfy the LLM context window. OptimizerGPT acts as a post-processor to enforce real-world code organization, splitting routes from handlers, models from services, and utilities from application logic.
How It Works
- OptimizerGPT receives a file path pointing to a monolithic source file
- It sends the file contents to the LLM with instructions to identify logical modules
- The LLM returns a restructured file layout following standard conventions for the target stack
- OptimizerGPT writes the new module files to the workspace, preserving the original
Supported Stacks
OptimizerGPT works with any language. It applies framework-idiomatic conventions when it recognizes the stack:
| Stack | Resulting Structure |
|---|---|
| FastAPI (Python) | routes/, models/, services/, utils/ |
| Axum (Rust) | routes.rs, models.rs, handlers.rs, state.rs |
| React (JS) | components/, hooks/, services/, utils/ |
| Express (JS) | routes/, controllers/, middleware/, models/ |
SDK Usage
use autogpt::prelude::*;
#[tokio::main]
async fn main() {
let persona = "Senior Software Engineer";
let behavior = "Refactor workspace/backend/main.py into a clean FastAPI project structure.";
let agent = OptimizerGPT::new(persona, behavior).await;
AutoGPT::default()
.with(agents![agent])
.build()
.expect("Failed to build AutoGPT")
.run()
.await
.unwrap();
}
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.
- 2d ago First seen · 73 lines · 0 tokens per session scan A c4aed49c3961
optimizer-gpt is an agent published in the GitHub repository wiseaidotdev/autogpt (115 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 618 tokens. 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.
Other agents, from other repositories
agent_class
The Agent class is the core orchestrator in AgentForge. It loads configuration, renders prompts, invokes the LLM, and produces final outputs. Agents can be subclassed for custom logic.
custom_agents
This is an advanced extension reference.
agent_prompts
AgentForge uses YAML-based prompt templates to drive agent behaviors. All prompt files live under.
agents
Agents are the orchestrators in AgentForge, binding configuration, prompts, models, and storage into end-to-end AI workflows. An agent.
verify
Verifies edits conform to project AGENTS.md and suggests simplifications.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.