---
title: "llm-self-defense vs AutoDefense"
type: "comparison"
canonical_url: "https://www.graphcanon.com/compare/poloclub-llm-self-defense-vs-xhmy-autodefense"
tools: ["poloclub-llm-self-defense", "xhmy-autodefense"]
---

# llm-self-defense vs AutoDefense

*GraphCanon updated Jul 12, 2026*

## Verdict

Pick llm-self-defense when license: llm-self-defense is BSD-3-Clause, AutoDefense is MIT; pick AutoDefense when license: AutoDefense is MIT, llm-self-defense is BSD-3-Clause.

[llm-self-defense](https://github.com/poloclub/llm-self-defense) reports 52 GitHub stars, 7 forks, and 7 open issues, last pushed May 21, 2024. [AutoDefense](https://arxiv.org/abs/2403.04783) has 68 stars, 20 forks, and 1 open issues, last pushed Jan 15, 2026. Figures are from public GitHub metadata via [llm-self-defense's repository](https://github.com/poloclub/llm-self-defense) and [AutoDefense's repository](https://github.com/XHMY/AutoDefense).

| | [llm-self-defense](/tools/poloclub-llm-self-defense.md) | [AutoDefense](/tools/xhmy-autodefense.md) |
| --- | --- | --- |
| Tagline | LLM Self Defense: By Self Examination, LLMs know they are being tricked | AutoDefense: Multi-Agent LLM Defense against Jailbreak Attacks |
| Stars | 52 | 68 |
| Forks | 7 | 20 |
| Open issues | 7 | 1 |
| Language | Python | Python |
| Adopt for | - | - |
| Persona | - | - |
| Runtime | - | - |
| License | BSD-3-Clause | MIT |
| Categories | Developer Tools, Inference & Serving, LLM Frameworks | AI Agents, Inference & Serving, LLM Frameworks |

## Trust and health

_Sourced signals - not a safety guarantee. No winner column._

| | [llm-self-defense](/tools/poloclub-llm-self-defense.md) | [AutoDefense](/tools/xhmy-autodefense.md) |
| --- | --- | --- |
| Maintenance | Dormant (18%) | Slowing (36%) |
| Days since push | 781d | 177d |
| Open issues (now) | 7 | 1 |
| Owner type | Organization | User |
| Security scan | 157 low (157 low) | No lockfile |
| Full report | [trust report](/tools/poloclub-llm-self-defense/trust.md) | [trust report](/tools/xhmy-autodefense/trust.md) |

## Shared compatibility

- **Python**: [llm-self-defense](/tools/poloclub-llm-self-defense.md) - Python runtime; [AutoDefense](/tools/xhmy-autodefense.md) - Python runtime

## Choose when

### Choose llm-self-defense if…

- License: llm-self-defense is BSD-3-Clause, AutoDefense is MIT.
- Also covers Developer Tools.

### Choose AutoDefense if…

- License: AutoDefense is MIT, llm-self-defense is BSD-3-Clause.
- Also covers AI Agents.
- More GitHub stars (68 vs 52) - visibility, not fit.

## When NOT to use llm-self-defense

- Last GitHub push was 782 days ago (dormant maintenance, May 21, 2024). Validate activity before betting a new project on llm-self-defense.
- Developer Tools: A gateway is overkill when you're pinned to a single provider and model.
- Inference & Serving: Self-hosting rarely beats a hosted API on cost until you have steady, high-volume traffic.
- LLM Frameworks: Avoid a framework for a single prompt-and-retrieve call; the abstraction can cost more than it saves.

## When NOT to use AutoDefense

- Last GitHub push was 177 days ago (slowing maintenance, Jan 15, 2026). Validate activity before betting a new project on AutoDefense.
- AI Agents: Don't use an agent loop when a deterministic workflow would do; agents add latency, cost, and non-determinism.
- Inference & Serving: Self-hosting rarely beats a hosted API on cost until you have steady, high-volume traffic.
- LLM Frameworks: Avoid a framework for a single prompt-and-retrieve call; the abstraction can cost more than it saves.

## Common questions

### What is the difference between llm-self-defense and AutoDefense?

llm-self-defense: LLM Self Defense: By Self Examination, LLMs know they are being tricked. AutoDefense: AutoDefense: Multi-Agent LLM Defense against Jailbreak Attacks. See the comparison table for live GitHub stats and shared categories.

### When should I choose llm-self-defense over AutoDefense?

Choose llm-self-defense over AutoDefense when License: llm-self-defense is BSD-3-Clause, AutoDefense is MIT; Also covers Developer Tools.

### When should I choose AutoDefense over llm-self-defense?

Choose AutoDefense over llm-self-defense when License: AutoDefense is MIT, llm-self-defense is BSD-3-Clause; Also covers AI Agents; More GitHub stars (68 vs 52) - visibility, not fit.

### When should I avoid llm-self-defense?

Last GitHub push was 782 days ago (dormant maintenance, May 21, 2024). Validate activity before betting a new project on llm-self-defense. Developer Tools: A gateway is overkill when you're pinned to a single provider and model. Inference & Serving: Self-hosting rarely beats a hosted API on cost until you have steady, high-volume traffic. LLM Frameworks: Avoid a framework for a single prompt-and-retrieve call; the abstraction can cost more than it saves.

### When should I avoid AutoDefense?

Last GitHub push was 177 days ago (slowing maintenance, Jan 15, 2026). Validate activity before betting a new project on AutoDefense. AI Agents: Don't use an agent loop when a deterministic workflow would do; agents add latency, cost, and non-determinism. Inference & Serving: Self-hosting rarely beats a hosted API on cost until you have steady, high-volume traffic. LLM Frameworks: Avoid a framework for a single prompt-and-retrieve call; the abstraction can cost more than it saves.

### Is llm-self-defense or AutoDefense more popular on GitHub?

AutoDefense has more GitHub stars (68 vs 52). Stars measure visibility, not whether either tool fits your constraints.

### Are llm-self-defense and AutoDefense open source?

Yes - both are open-source projects on GitHub (llm-self-defense: BSD-3-Clause, AutoDefense: MIT).

### Where can I find alternatives to llm-self-defense or AutoDefense?

GraphCanon lists graph-backed alternatives at [llm-self-defense alternatives](/tools/poloclub-llm-self-defense/alternatives) and [AutoDefense alternatives](/tools/xhmy-autodefense/alternatives) ([llm-self-defense markdown twin](/tools/poloclub-llm-self-defense/alternatives.md), [AutoDefense markdown twin](/tools/xhmy-autodefense/alternatives.md)), ranked by typed relationship edges rather than popularity votes.

### Is there a machine-readable version of this comparison?

Yes. The markdown twin at [this comparison](/compare/poloclub-llm-self-defense-vs-xhmy-autodefense.md) mirrors this page for agents and LLM crawlers, with the same stats table and FAQ answers.

### Which is better maintained, llm-self-defense or AutoDefense?

llm-self-defense: Dormant. AutoDefense: Slowing. Compare maintenance labels, days since push, and release cadence in the trust section below - stars alone do not measure maintenance.

### Where are the full trust reports for llm-self-defense and AutoDefense?

GraphCanon publishes per-repo trust reports with dated maintenance, provenance, and scan summaries: [llm-self-defense trust report](/tools/poloclub-llm-self-defense/trust); [AutoDefense trust report](/tools/xhmy-autodefense/trust).

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/graph?tool=poloclub-llm-self-defense`](/api/graphcanon/graph?tool=poloclub-llm-self-defense)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
