Agent Reference - micgo/maf-standalone GitHub Wiki
This page provides detailed documentation for each specialized agent in the Multi-Agent Framework.
- Agent Overview
- Orchestrator Agent
- Frontend Agent
- Backend Agent
- Database Agent
- QA Agent
- Security Agent
- DevOps Agent
- Documentation Agent
- UX/UI Agent
- Agent Configuration
Each agent in MAF is designed with specific expertise and responsibilities:
Agent | Primary Role | Key Capabilities |
---|---|---|
Orchestrator | Task coordination | Planning, assignment, monitoring |
Frontend | UI development | Components, styling, interactions |
Backend | API development | Business logic, endpoints, auth |
Database | Data management | Schema design, queries, migrations |
QA | Quality assurance | Testing, code review, standards |
Security | Security audit | Vulnerability scanning, best practices |
DevOps | Infrastructure | CI/CD, deployment, monitoring |
Documentation | Technical writing | API docs, guides, comments |
UX/UI | Design | Mockups, user flows, accessibility |
The Orchestrator is the central coordinator that breaks down high-level requests into specific tasks and manages the overall workflow.
- Task Decomposition: Breaks features into manageable subtasks
- Dependency Management: Ensures tasks are completed in order
- Agent Assignment: Routes tasks to appropriate specialists
- Progress Monitoring: Tracks task status and completion
- Failure Recovery: Handles retries and fallback strategies
User Request: "Add user authentication"
Orchestrator Actions:
1. Create database schema task → Database Agent
2. Create API endpoints task → Backend Agent
3. Create login UI task → Frontend Agent
4. Create auth tests task → QA Agent
5. Security review task → Security Agent
{
"orchestrator": {
"model_provider": "anthropic",
"model_name": "claude-3-sonnet-20240229",
"max_retries": 3,
"task_timeout": 300
}
}
Specializes in building user interfaces, handling user interactions, and implementing responsive designs.
- Component Development: Creates reusable UI components
- State Management: Implements client-side state logic
- Styling: Applies CSS/styling frameworks
- Responsive Design: Ensures mobile compatibility
- Framework Expertise: React, Vue, Angular, Svelte
- React/Next.js: Hooks, SSR/SSG, App Router
- Vue/Nuxt: Composition API, Vuex, layouts
- Angular: Services, directives, RxJS
- CSS: Tailwind, Styled Components, SASS
// User Profile Component
export default function UserProfile({ user }) {
const [isEditing, setIsEditing] = useState(false);
return (
<div className="user-profile">
<Avatar src={user.avatar} />
<h2>{user.name}</h2>
{isEditing ? (
<ProfileEditor user={user} onSave={handleSave} />
) : (
<ProfileDisplay user={user} onEdit={() => setIsEditing(true)} />
)}
</div>
);
}
Develops server-side logic, APIs, and handles data processing and business rules.
- API Development: RESTful and GraphQL endpoints
- Authentication: JWT, OAuth, session management
- Data Validation: Input sanitization and validation
- Business Logic: Complex calculations and workflows
- Integration: Third-party APIs and services
- Python: Django, FastAPI, Flask
- JavaScript: Express, NestJS, Hono
- Java: Spring Boot
- Ruby: Rails
# FastAPI endpoint
@router.post("/users/", response_model=UserResponse)
async def create_user(
user: UserCreate,
db: AsyncSession = Depends(get_db),
current_user: User = Depends(get_current_user)
):
"""Create a new user with proper validation and permissions."""
if not current_user.is_admin:
raise HTTPException(status_code=403, detail="Admin access required")
db_user = await crud.create_user(db, user)
await send_welcome_email(db_user.email)
return db_user
Manages data persistence, schema design, and query optimization.
- Schema Design: Creates efficient database structures
- Migrations: Handles schema versioning and updates
- Query Optimization: Writes performant queries
- Indexing: Implements appropriate indexes
- Data Modeling: Designs relationships and constraints
- Relational: PostgreSQL, MySQL, SQLite
- NoSQL: MongoDB, Redis, DynamoDB
- ORMs: SQLAlchemy, Prisma, TypeORM
-- User authentication schema
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR(255) UNIQUE NOT NULL,
password_hash VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE sessions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID REFERENCES users(id) ON DELETE CASCADE,
token VARCHAR(255) UNIQUE NOT NULL,
expires_at TIMESTAMP NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_sessions_token ON sessions(token);
CREATE INDEX idx_sessions_user_id ON sessions(user_id);
Ensures code quality through testing, reviews, and adherence to standards.
- Test Creation: Unit, integration, and e2e tests
- Code Review: Identifies issues and improvements
- Coverage Analysis: Ensures adequate test coverage
- Performance Testing: Load and stress testing
- Standards Enforcement: Linting and formatting
- JavaScript: Jest, Vitest, Cypress, Playwright
- Python: pytest, unittest, Selenium
- Java: JUnit, TestNG, Mockito
# Test for user creation endpoint
@pytest.mark.asyncio
async def test_create_user_success(client, admin_token):
"""Test successful user creation by admin."""
response = await client.post(
"/api/users/",
json={
"email": "[email protected]",
"password": "SecurePass123!",
"name": "Test User"
},
headers={"Authorization": f"Bearer {admin_token}"}
)
assert response.status_code == 201
data = response.json()
assert data["email"] == "[email protected]"
assert "id" in data
assert "password" not in data # Ensure password not exposed
Audits code for vulnerabilities and implements security best practices.
- Vulnerability Scanning: Identifies security issues
- Authentication Review: Ensures proper auth implementation
- Data Protection: Encryption and secure storage
- Input Validation: Prevents injection attacks
- Dependency Audit: Checks for vulnerable packages
- OWASP Best Practices: Implements security standards
- Security Report Generation: Creates detailed audit reports
- SQL injection prevention
- XSS protection
- CSRF tokens
- Rate limiting
- Secure headers
- Password policies
- Command injection prevention
- Path traversal protection
-
.md
for security audit reports -
.ts
/.js
for security implementations - Middleware and authentication files
- "Review authentication implementation for security vulnerabilities"
- "Implement secure session management with JWT"
- "Audit API endpoints for injection vulnerabilities"
- "Add rate limiting to prevent brute force attacks"
- "Create security audit report for the application"
# Security improvements for user authentication
def secure_login(email: str, password: str) -> Optional[User]:
"""Secure login with rate limiting and audit logging."""
# Rate limiting
if not rate_limiter.check_rate(email):
audit_log.warning(f"Rate limit exceeded for {email}")
raise HTTPException(status_code=429, detail="Too many attempts")
# Timing-safe password comparison
user = get_user_by_email(email)
if not user or not verify_password_safe(password, user.password_hash):
audit_log.info(f"Failed login attempt for {email}")
# Generic error to prevent user enumeration
raise HTTPException(status_code=401, detail="Invalid credentials")
audit_log.info(f"Successful login for {user.id}")
return user
Handles deployment configurations, CI/CD pipelines, containerization, and infrastructure.
- Docker/Dockerfile Generation: Multi-stage builds with security scanning
- CI/CD Pipelines: GitHub Actions, GitLab CI, CircleCI workflows
- Kubernetes Manifests: Deployment, service, and scaling configs
- Cloud Deployment: Vercel, Netlify, AWS configurations
- Infrastructure as Code: Terraform scripts
- Monitoring Setup: Prometheus, logging configurations
- Containerization: Docker, Docker Compose
- Orchestration: Kubernetes, Helm
- CI/CD: GitHub Actions, GitLab CI, CircleCI
- Cloud Platforms: AWS, GCP, Azure, Vercel, Netlify
- IaC: Terraform, CloudFormation
-
Dockerfile
,docker-compose.yml
.github/workflows/*.yml
k8s/*.yaml
-
vercel.json
,netlify.toml
-
*.tf
for Terraform
- "Create a Dockerfile for a Python Flask application"
- "Set up GitHub Actions workflow for CI/CD"
- "Create Kubernetes deployment configuration"
- "Configure Vercel deployment for Next.js app"
- "Set up Docker compose for local development"
# GitHub Actions workflow
name: Deploy to Production
on:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run tests
run: |
npm install
npm test
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- name: Deploy to AWS
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync ./build s3://${{ secrets.S3_BUCKET }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DIST_ID }} --paths "/*"
Generates and maintains project documentation.
- API Documentation: OpenAPI/Swagger specs, endpoint descriptions
- README Generation: Comprehensive project documentation
- Component Documentation: Props, methods, usage examples
- Architecture Diagrams: System design with mermaid syntax
- User Guides: Tutorials and how-to guides
- Code Documentation: JSDoc, docstrings, inline comments
- API: REST/GraphQL endpoint documentation
- Component: UI component usage and props
- Architecture: System design and data flow
- Guides: User and developer tutorials
- README: Project overview and setup
-
.md
for markdown documentation -
.yaml
for OpenAPI specifications -
README.md
for project docs - Component-specific docs in
docs/
folders
- "Create API documentation for user authentication endpoints"
- "Generate README for the project with setup instructions"
- "Document the UserProfile component with props and examples"
- "Create architecture documentation with system diagrams"
- "Write a user guide for the admin dashboard"
## User Authentication API
### POST /api/auth/login
Authenticates a user and returns a JWT token.
#### Request Body
```json
{
"email": "[email protected]",
"password": "securepassword"
}
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "123",
"email": "[email protected]",
"name": "John Doe"
}
}
-
401
: Invalid credentials -
429
: Too many login attempts
## UX/UI Agent
### Purpose
Handles design systems, UI components, and user experience.
### Capabilities
- **Design System Creation**: Comprehensive color, typography, spacing systems
- **Color Palette Generation**: Semantic colors with light/dark themes
- **Typography Systems**: Font scales, line heights, responsive sizing
- **Component Styling**: Reusable UI component styles
- **Responsive Layouts**: Grid systems, breakpoints, mobile-first
- **Animations**: Transitions, micro-interactions, hover effects
- **Accessibility**: WCAG AA compliance, ARIA labels
### Supported Frameworks
- **CSS**: Vanilla CSS with custom properties
- **SCSS/Sass**: Advanced styling with mixins
- **Tailwind CSS**: Utility-first configurations
- **CSS-in-JS**: Styled-components, Emotion
- **Design Tokens**: JSON format for design systems
### Design Areas
- **Color Systems**: Primary, secondary, semantic colors
- **Typography**: Font families, sizes, weights
- **Spacing**: Consistent padding/margin systems
- **Components**: Buttons, cards, forms, modals
- **Layout**: Grid, flexbox, containers
- **Animations**: Smooth transitions, loading states
### File Types
- `.css`, `.scss` for stylesheets
- `.js` for CSS-in-JS
- `.json` for design tokens
- Style files in `styles/` directory
### Example Tasks
- "Create a design system color palette for a professional web app"
- "Build a responsive navigation component with mobile menu"
- "Implement dark mode theme with CSS variables"
- "Create a consistent spacing system using rem units"
- "Design an accessible form component with proper labels"
### Example Recommendations
```css
/* Design tokens for consistent styling */
:root {
/* Colors */
--primary-color: #3B82F6;
--primary-hover: #2563EB;
--text-primary: #1F2937;
--text-secondary: #6B7280;
--background: #FFFFFF;
--surface: #F9FAFB;
/* Spacing */
--spacing-xs: 0.5rem;
--spacing-sm: 1rem;
--spacing-md: 1.5rem;
--spacing-lg: 2rem;
/* Typography */
--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--font-heading: var(--font-body);
}
/* Accessible button component */
.btn {
padding: var(--spacing-xs) var(--spacing-md);
font-family: var(--font-body);
font-size: 1rem;
border-radius: 0.375rem;
transition: all 0.2s;
cursor: pointer;
/* Accessibility */
min-height: 44px; /* Touch target size */
position: relative;
overflow: hidden;
}
.btn:focus-visible {
outline: 2px solid var(--primary-color);
outline-offset: 2px;
}
{
"agent_config": {
"default_model_provider": "gemini",
"default_model_name": "gemini-2.0-flash-exp",
"enabled_agents": [
"orchestrator",
"frontend_agent",
"backend_agent",
"db_agent",
"qa_agent"
]
}
}
{
"agent_models": {
"orchestrator": {
"provider": "anthropic",
"name": "claude-3-sonnet-20240229",
"temperature": 0.3
},
"frontend_agent": {
"provider": "openai",
"name": "gpt-4-turbo-preview",
"temperature": 0.7
},
"qa_agent": {
"provider": "gemini",
"name": "gemini-2.0-flash-exp",
"temperature": 0.1
}
}
}
- Orchestrator: High reasoning capability for planning
- Frontend/Backend: Balanced creativity and accuracy
- QA/Security: Low temperature for precise analysis
- Documentation: Clear, structured output
- UX/UI: Creative suggestions with constraints
- Learn about CLI commands to control agents
- Explore Configuration options for customization
- Read Architecture to understand agent communication
- See Custom Agents guide to create your own