In the paper, we describe the model of heterogeneous agents with an internal structure and a set of parameters. These agents can generate an endogenous activity in definite time intervals. During the activation phase, the agent emits a spe-cific mediator with an assigned color into a common medium. In case agents cor-respond to the biological neurons, this medium is an extracellular space, and me-diators are neurotransmitters. Every agent has a set of colored receptors which are sensitive to a mediator of the same color. We consider three types of receptors and, correspondingly, three types of effects on agents. The first two types, activa-tion and inhibition, are direct. They speed up or slow down the oscillatory regime of an agent. The third type is modulatory. This type of receptors, being activated, starts the chain of changes in the internal parameters of an agent, which, in turn, causes a change in the weights of receptors of the two first types. We show that using this representation of agents, it is possible to force an agent to generate the activity with any given time interval.