Metadata-Version: 2.4
Name: embodied-ai-architect
Version: 1.0.0
Summary: Hardware/Software Codesign Space Exploration and Optimization Environment for Embodied AI systems
Author: Branes-ai Team
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: click>=8.1.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Provides-Extra: remote
Requires-Dist: paramiko>=3.0.0; extra == "remote"
Provides-Extra: kubernetes
Requires-Dist: kubernetes>=28.0.0; extra == "kubernetes"
Provides-Extra: chat
Requires-Dist: anthropic>=0.39.0; extra == "chat"
Provides-Extra: optimization
Requires-Dist: pymoo>=0.6.0; extra == "optimization"
Requires-Dist: botorch>=0.11.0; extra == "optimization"
Requires-Dist: gpytorch>=1.12; extra == "optimization"
Requires-Dist: scipy>=1.10.0; extra == "optimization"
Provides-Extra: mcp
Requires-Dist: mcp>=1.0.0; extra == "mcp"
Requires-Dist: uvicorn>=0.25.0; extra == "mcp"
Requires-Dist: httpx>=0.25.0; extra == "mcp"
Provides-Extra: langgraph
Requires-Dist: langgraph>=0.2.0; extra == "langgraph"
Requires-Dist: langchain-anthropic>=0.3.0; extra == "langgraph"
Requires-Dist: langgraph-checkpoint-sqlite>=2.0.0; extra == "langgraph"
Provides-Extra: jetson
Requires-Dist: tensorrt>=8.6.0; extra == "jetson"
Requires-Dist: pycuda>=2022.1; extra == "jetson"
Requires-Dist: onnxruntime>=1.16.0; extra == "jetson"
Requires-Dist: Pillow>=9.0.0; extra == "jetson"
Provides-Extra: openvino
Requires-Dist: openvino>=2024.0.0; extra == "openvino"
Requires-Dist: nncf>=2.7.0; extra == "openvino"
Requires-Dist: onnxruntime>=1.16.0; extra == "openvino"
Requires-Dist: Pillow>=9.0.0; extra == "openvino"
Provides-Extra: coral
Requires-Dist: tensorflow>=2.13.0; extra == "coral"
Requires-Dist: onnx2tf>=1.20.0; extra == "coral"
Requires-Dist: onnxruntime>=1.16.0; extra == "coral"
Requires-Dist: Pillow>=9.0.0; extra == "coral"
Provides-Extra: all
Requires-Dist: paramiko>=3.0.0; extra == "all"
Requires-Dist: kubernetes>=28.0.0; extra == "all"
Requires-Dist: anthropic>=0.39.0; extra == "all"
Requires-Dist: langgraph>=0.2.0; extra == "all"
Requires-Dist: langchain-anthropic>=0.3.0; extra == "all"
Requires-Dist: onnxruntime>=1.16.0; extra == "all"
Requires-Dist: Pillow>=9.0.0; extra == "all"
Dynamic: license-file

# Embodied AI Architect

A design environment for creating and evaluating autonomous agents, with hardware/software codesign space exploration and optimization.

## Features

- **Model Analysis**: Analyze PyTorch model structure and compute requirements
- **Hardware Profiling**: Recommendations for edge/cloud deployment
- **Multi-Hardware Benchmarking**: Local CPU, remote SSH, Kubernetes backends
- **Interactive Chat**: Claude-powered architect for design decisions
- **SoC Optimization**: LangGraph-based RTL optimization loop (experimental)

## Quick Start

### Automated Setup (Recommended)

```bash
# Clone the repository
git clone https://github.com/branes-ai/embodied-ai-architect.git
cd embodied-ai-architect

# Run the setup script
./bin/setup-dev-env.sh

# Activate the environment
source .venv/bin/activate

# Verify installation
embodied-ai --help
```

### Setup Options

```bash
# Full installation (Python deps + EDA tools)
./bin/setup-dev-env.sh --all

# Minimal installation (Python deps only)
./bin/setup-dev-env.sh --minimal

# SoC optimizer only (Python deps + EDA tools)
./bin/setup-dev-env.sh --soc
```

### Manual Setup

If you prefer manual installation:

```bash
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install core dependencies
pip install -e .

# Install with all optional dependencies
pip install -e ".[all,dev]"

# For SoC optimizer experiments, also install:
pip install langgraph langchain-anthropic
```

### EDA Tools (for SoC Optimizer)

The SoC optimizer requires open-source EDA tools. The setup script installs [OSS CAD Suite](https://github.com/YosysHQ/oss-cad-suite-build) which includes:

- **Yosys**: RTL synthesis
- **Verilator**: Fast Verilog linting and simulation
- **Icarus Verilog**: Verilog simulation

Manual installation:
```bash
# Download OSS CAD Suite
wget https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2025-12-12/oss-cad-suite-linux-x64-20251212.tgz
sudo tar -xzf oss-cad-suite-linux-x64-20251212.tgz -C /opt

# Add to PATH
export PATH="/opt/oss-cad-suite/bin:$PATH"
```

## Usage

### CLI Commands

```bash
# Show available commands
embodied-ai --help

# Analyze a PyTorch model
embodied-ai analyze model.pt

# Run full workflow
embodied-ai workflow run model.pt

# Benchmark on local CPU
embodied-ai benchmark model.pt --backend local

# Interactive chat session (requires ANTHROPIC_API_KEY)
export ANTHROPIC_API_KEY=your-key-here
embodied-ai chat
```

### SoC Optimizer (Experimental)

The LangGraph-based SoC optimizer demonstrates agentic RTL optimization:

```bash
cd experiments/langgraph/soc_optimizer

# Run with mock mode (no LLM)
python workflow.py

# Run with Claude for RTL optimization
export ANTHROPIC_API_KEY=your-key-here
python workflow.py --with-llm

# Run simple loop (no LangGraph dependency)
python workflow.py --simple
```

## Project Structure

```
embodied-ai-architect/
├── bin/                    # Setup scripts
│   └── setup-dev-env.sh    # Development environment setup
├── src/embodied_ai_architect/
│   ├── agents/             # Agent implementations
│   ├── cli/                # Click-based CLI
│   └── llm/                # LLM integration
├── experiments/
│   └── langgraph/          # LangGraph experiments
│       └── soc_optimizer/  # RTL optimization loop
├── prototypes/             # Research prototypes
│   ├── drone_perception/   # Real-time perception pipeline
│   └── multi_rate_framework/  # Zenoh-based multi-rate control
├── docs/                   # Documentation
└── tests/                  # Test suite
```

## Development

```bash
# Run tests
pytest tests/

# Run single test
pytest tests/test_file.py::test_function -v

# Linting and formatting
black src/ tests/ --line-length 100
ruff check src/ tests/
```

## Environment Variables

| Variable | Description |
|----------|-------------|
| `ANTHROPIC_API_KEY` | Required for Claude-powered features |

## Related Repositories

- [embodied-schemas](https://github.com/branes-ai/embodied-schemas): Shared Pydantic schemas
- [graphs](https://github.com/branes-ai/graphs): Analysis tools and roofline models
- [systars](https://github.com/stillwater-sc/systars): Amaranth HDL systolic array generator

## License

MIT License - see [LICENSE](LICENSE) for details.
