Skip to main content

A library and runtime to build autonomous AI agents.

Project description

Howdy Friend! This project is still in stealthy "friends only mode", meaning I'm sharing it with a few select people to gather initial feedback. Please don't share it with others yet because it is very much only a prototype at the moment.

If you want to give me feedback and understand what I'm up to here, start with the documentation link below, which leads to a long design and architecture document. It describes the rationale and structure of the entire project. But also feel free to browse the codebase. I'm excited to hear from you!

Agent OS

🌞 Build autonomous AI agents!

🛠️The Agent OS is a an experimental runtime to construct sophisticated, long-running, self-modifying AI agents. It's desigend to interact with large language models and execute functions and code that are generated by them. The OS provides a strongly consistent actor model that is built on a content-addressable storage layer that is inspired by Git.

❓To learn how everything works, start reading the design docs.

Getting Started

As long as the project is still in alpha, the best way to get started is to clone this repository.

Requires Python >= 3.10 and Poetry.

Once cloned, cd into the repository and run:

poetry install

The project comes with a CLI that can be used to initiate and run agents. To see the avialble commands run:

poetry run aos --help

Your First Agent 🤖

To run your first agent, put an .env file in the project root that contains the OpenAI API key, like so:

OPENAI_API_KEY=sk-myspecialkey

Then run the following CLI commands:

poetry run aos -d examples/first push
poetry run aos -d examples/first run

This 'first' agent comes with a web interface, and the Agent OS hosts a web server. To chat with your agent, browse to http://127.0.0.1:5000/ag/first/wit/actors/frontend/query/web.

Project Structure

  • examples/: examples of agent implementations.
    • first/: a simple GTP chatbot. See "Your First Agent" above.
  • src/: contains all relevant modules that are part of the Agent OS.
    • grit/: object store, inspired by Git.
    • wit/: libraries to help write "wit" state transition functions
    • runtime/: the Agent OS runtime: actor executor, custom python module loader, and wit function resolver.
    • sync/: modules to push and pull data into grit from the developer's file system.
    • web/: the web server that provides the web interface.
    • cli.py: the "aos" (agent OS) CLI.
  • tests/: extensive unit tests that cover most of the /src packages and modules.
  • docs/: documentation, intented to be renderd as a GitBook.

Running the Tests

If you want to hack on the code, it is helful to run the tests. The project uses pytest and has almost 100 unit tests.

poetry run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_os_py-0.0.1.tar.gz (60.1 kB view hashes)

Uploaded Source

Built Distribution

agent_os_py-0.0.1-py3-none-any.whl (71.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page