# AI Agent System

A comprehensive AI agent framework with CLI and web interfaces, built using Python and integrating with the Symphony framework.

## Features

- **CLI Interface**: Command-line interface for interacting with the agent system
- **Orchestration Engine**: Schedule and manage agent tasks and workflows
- **NLP Capabilities**: Natural language processing for intent recognition
- **Security Framework**: Role-based access control and audit logging
- **Storage Adapters**: Modular storage backends including SQLite
- **Testing Infrastructure**: Comprehensive test suite for all components
- **Symphony Integration**: Works with the Symphony agent coordination framework

## Installation

### Prerequisites

- Python 3.9+
- pip
- virtualenv (recommended)

### Steps

1. Clone the repository:
   ```bash
   git clone https://github.com/your-repo/ai-agent.git
   cd ai-agent
   ```

2. Create and activate a virtual environment:
   ```bash
   python -m venv venv
   source venv/bin/activate  # Linux/MacOS
   venv\Scripts\activate     # Windows
   ```

3. Install dependencies:
   ```bash
   pip install -e .
   ```

## CLI Usage

The system provides a command-line interface with these main commands:

```bash
# Start the agent system
python -m cli_interface start

# Run specific agent tasks
python -m cli_interface run-task [task_name]

# View system status
python -m cli_interface status

# Get help
python -m cli_interface --help
```

## Web Interface

The web interface provides a dashboard for monitoring and controlling agents:

1. Start the web server:
   ```bash
   python -m web_interface
   ```

2. Access the interface at: `http://localhost:8000`

Features include:
- Agent status monitoring
- Task scheduling
- Performance metrics
- Security audit logs

## Configuration

Configuration is managed through environment variables and config files:

1. Copy the example config:
   ```bash
   cp config.example.yaml config.yaml
   ```

2. Edit `config.yaml` with your settings:
   ```yaml
   database:
     adapter: sqlite
     path: ./agent.db
   
   security:
     rbac_enabled: true
     audit_log: ./audit.log
   ```

## Testing

Run the test suite with:

```bash
pytest tests/
```

Key test categories:
- Unit tests
- Integration tests
- Performance benchmarks
- Security validation

## Contributing

1. Fork the repository
2. Create a feature branch
3. Submit a pull request

Please follow the coding standards and include tests with new features.

## License

MIT License - See LICENSE file for details.