# Agency

A Python library that provides an actor-model framework for connecting AI agents with traditional software systems, so developers can build custom agent-integrated applications on a minimal foundation.

In Agency, every entity, an AI-driven agent, a software interface, or a human user, is an instance of the `Agent` class, and agents expose "actions" that other agents can discover and invoke at runtime, for example by sending a message naming an action and its arguments. Actions can declare an access policy so some run freely and others require review before executing, for safety.

Agents can define lifecycle and action callbacks for observability, and a `Space` connects agents together; an agent cannot communicate with others until it joins a common Space. The library supports multiprocessing and multithreading for concurrency, and AMQP for networked agent systems, with access policies, permission callbacks and detailed logging for control.

A demo application includes two OpenAI agent examples, a Hugging Face Transformers agent example, an operating-system access example, a Gradio UI, and Docker configuration for reference and development.

Website: https://createwith.agency
