AgentDash - Multi-Agent Systems Failure Taxonomy Library
A Python library for annotating multi-agent system traces with MAST (Multi-Agent Systems Failure Taxonomy) failure modes using LLM-as-a-Judge methodology.
Overview
AgentDash provides a comprehensive taxonomy of 14 failure modes across 3 categories for analyzing multi-agent system behavior:
🔧 Specification Issues
- Task & Role Compliance failures
- Modes: 1.1-1.5
🤝 Inter-Agent Misalignment
- Communication & Coordination failures
- Modes: 2.1-2.6
✅ Task Verification
- Completion & Validation failures
- Modes: 3.1-3.3
Installation
pip install agentdash
Development Installation
git clone https://github.com/multi-agent-systems-failure-taxonomy/MAST.git
cd MAST
pip install -e .[dev]
Quick Start
from agentdash import annotator
# Initialize the annotator with your OpenAI API key
openai_api_key = "your-openai-api-key-here"
Annotator = annotator(openai_api_key)
# Annotate a multi-agent system trace
trace = """
Agent1: I need to calculate the sum of 1 + 1.
Agent2: I'll help you with that. The answer is 3.
Agent1: Thank you! Task completed.
"""
annotation = Annotator.produce_taxonomy(trace)
# View results
print("Failure Modes Detected:")
for mode_id, detected in annotation['failure_modes'].items():
if detected:
info = Annotator.get_failure_mode_info(mode_id)
print(f" {mode_id}: {info['name']}")
print(f"\nSummary: {annotation['summary']}")
print(f"Task Completed: {annotation['task_completion']}")
print(f"Total Failures: {annotation['total_failures']}")
API Reference
agentdash.annotator
The main class for annotating multi-agent system traces.
Constructor
annotator(openai_api_key: str, model: str = "o1-mini")
Parameters:
openai_api_key(str): Your OpenAI API keymodel(str, optional): OpenAI model to use. Default: "o1-mini"
Methods
produce_taxonomy(trace: str) -> Dict[str, Any]
Annotate a trace with MAST taxonomy failure modes.
Parameters:
trace(str): The multi-agent system trace to annotate
Returns:
Dict[str, Any]: Annotation results containing:failure_modes(Dict[str, int]): Binary detection for each failure mode (1=detected, 0=not detected)summary(str): Brief summary of detected issuestask_completion(bool): Whether the task was completed successfullytotal_failures(int): Total number of failure modes detectedraw_response(str): Raw LLM response for debugging
Example:
annotation = Annotator.produce_taxonomy(trace)
print(annotation['failure_modes'])
# {'1.1': 0, '1.2': 0, '1.3': 0, '1.4': 0, '1.5': 0, ...}
get_failure_mode_info(mode_id: str) -> Dict[str, str]
Get detailed information about a specific failure mode.
Parameters:
mode_id(str): The failure mode ID (e.g., "1.1", "2.3")
Returns:
Dict[str, str]: Mode information with keys:name,category,description,stage_span
Example:
info = Annotator.get_failure_mode_info("1.1")
print(info['name']) # "Disobey Task Specification"
print(info['description']) # "Agent fails to follow the given task instructions..."
list_failure_modes() -> Dict[str, Dict[str, str]]
Get the complete MAST taxonomy with all failure modes.
Returns:
Dict[str, Dict[str, str]]: Complete taxonomy dictionary
MAST Taxonomy
Specification Issues (1.1-1.5)
| Mode | Name | Description | Stage |
|---|---|---|---|
| 1.1 | Disobey Task Specification | Agent fails to follow given task instructions | Pre |
| 1.2 | Disobey Role Specification | Agent acts outside its designated role | Pre |
| 1.3 | Step Repetition | Agent repeats same action unnecessarily | Exec |
| 1.4 | Loss of Conversation History | Agent loses track of previous context | Exec |
| 1.5 | Unaware of Termination Conditions | Agent doesn't recognize task completion | Post |
Inter-Agent Misalignment (2.1-2.6)
| Mode | Name | Description | Stage |
|---|---|---|---|
| 2.1 | Conversation Reset | Agents start fresh ignoring previous context | Pre |
| 2.2 | Fail to Ask for Clarification | Agent proceeds without needed clarification | Exec |
| 2.3 | Task Derailment | Conversation goes off-topic from original task | Exec |
| 2.4 | Information Withholding | Agent withholds relevant information | Exec |
| 2.5 | Ignored Other Agent's Input | Agent ignores relevant input from others | Exec |
| 2.6 | Action-Reasoning Mismatch | Actions don't match stated reasoning | Exec |
Task Verification (3.1-3.3)
| Mode | Name | Description | Stage |
|---|---|---|---|
| 3.1 | Premature Termination | Task ends before actual completion | Post |
| 3.2 | No or Incorrect Verification | Verification missing or contains errors | Post |
| 3.3 | Weak Verification | Verification insufficient or superficial | Post |
Advanced Usage
Batch Processing
traces = [
"Agent1: Let's start task A...",
"Agent1: Now for task B...",
"Agent1: Finally task C..."
]
results = []
for i, trace in enumerate(traces):
print(f"Processing trace {i+1}/{len(traces)}")
annotation = Annotator.produce_taxonomy(trace)
results.append({
'trace_id': i,
'annotation': annotation
})
# Analyze results
total_failures = sum(r['annotation']['total_failures'] for r in results)
print(f"Total failures across all traces: {total_failures}")
Custom Analysis
# Analyze failure patterns
from collections import defaultdict
failure_counts = defaultdict(int)
annotations = [Annotator.produce_taxonomy(trace) for trace in traces]
for annotation in annotations:
for mode_id, detected in annotation['failure_modes'].items():
if detected:
failure_counts[mode_id] += 1
# Show most common failure modes
sorted_failures = sorted(failure_counts.items(), key=lambda x: x[1], reverse=True)
for mode_id, count in sorted_failures[:5]:
info = Annotator.get_failure_mode_info(mode_id)
print(f"{mode_id}: {info['name']} - {count} occurrences")
Configuration
Environment Variables
You can set your OpenAI API key as an environment variable:
export OPENAI_API_KEY="your-openai-api-key-here"
Then initialize without passing the key:
import os
from agentdash import annotator
# Will automatically use OPENAI_API_KEY from environment
Annotator = annotator(os.getenv("OPENAI_API_KEY"))
Custom Models
AgentDash supports different OpenAI models:
# Use GPT-4 for higher accuracy (more expensive)
Annotator = annotator(api_key, model="gpt-4")
# Use GPT-3.5-turbo for faster/cheaper annotation
Annotator = annotator(api_key, model="gpt-3.5-turbo")
# Use O1-mini (default) for balanced performance
Annotator = annotator(api_key, model="o1-mini")
Error Handling
from agentdash import annotator
try:
Annotator = annotator("invalid-api-key")
annotation = Annotator.produce_taxonomy(trace)
except ImportError:
print("OpenAI package not installed. Run: pip install openai")
except ValueError as e:
print(f"Configuration error: {e}")
except Exception as e:
print(f"API error: {e}")
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Setup
git clone https://github.com/multi-agent-systems-failure-taxonomy/MAST.git
cd MAST
pip install -e .[dev]
# Run tests
pytest
# Format code
black agentdash/
isort agentdash/
# Lint code
flake8 agentdash/
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citation
If you use AgentDash in your research, please cite:
@software{agentdash2024,
title = {AgentDash: Multi-Agent Systems Failure Taxonomy Library},
author = {MAST Research Team},
year = {2024},
url = {https://github.com/multi-agent-systems-failure-taxonomy/MAST},
version = {0.1.0}
}
Support
Changelog
v0.1.0 (2024)
- Initial release
- Complete MAST taxonomy with 14 failure modes
- LLM-as-a-Judge annotation using OpenAI
- Comprehensive API with detailed documentation
- Support for batch processing and custom analysis
Metadata
Release files for agentdash 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentdash-0.1.0.tar.gz | 19.1 kB | Without provenance | Details for agentdash-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentdash-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentdash-0.1.0-py3-none-any.whl |
Total release size: 32.1 kB
Release files / agentdash-0.1.0.tar.gz
| Download URL | agentdash-0.1.0.tar.gz |
|---|---|
| Size | 19.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8d1c1f147b411338d7af9b5ca88b312f160e4d9a82806a47d182267301be5c6
|
|
BLAKE2b-256 checksum How to use checksums |
0d027e0911d81e0ebf0cc0f1634b229dafaa13b5a483837d9fc5b9542b673b87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.18
|
Release files / agentdash-0.1.0-py3-none-any.whl
| Download URL | agentdash-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
891ef8a058b79f98fb041bf01e5f467818805324404fd27f081da6ce1a01f9cb
|
|
BLAKE2b-256 checksum How to use checksums |
a7c8701bf3540daf54f99329dccb31b0c5319420b1b0c7310aeae63bfe608766
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.18
|
Security for agentdash 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.