Dynamic Composition of Agent Grammars