We propose a programming language, Flage, for building software systems whi
ch dynamically adapt to changing local situations. In our language, we cons
truct applications by agents; concurrent mobile objects with the metalevel
architecture. Metalevel programming facilities realize a self-control of an
agent's actions and an autonomous adaptation to changes. We also introduce
another kind of program element called field. A field represents a local s
ituation around agents. For example, one field represents a virtual place t
o get local information in a network environment and another represents a v
irtual place where agents do cooperative works. If an agent enters a field,
it gets programs and shared information in the field. By moving field to f
ield, an agent can change its program composition by itself and it adapts t
o changing local situations. In this paper, we describe the language specif
ication of Flage, the implementation of the platform for Flage programming
and show some program examples.