Building a Multi-Agent System from Scratch: Architecture Patterns