Quickstart
Requirements
- A running NATS.io cluster
- A running Postgres DB (See included
docker-compose.ymlfile) - Poetry
- (Optional for now) A Weaviate instance (See included
docker-compose.ymlfile)
Quickstart
-
Clone the repo, and install dependencies with poetry.
-
Run the NATS Jetstream cluster.
You can simply use the NATS CLI to run a test cluster:
-
Run Postgres.
You can use the included
docker-compose.ymlfile: -
Create a
.envfile in./based on the included.env.examplefile. -
Run the coordinator process.
The coordinator updates state, and triggers state transitions/enqueues tasks as appropriate based on your Workflow state machine + tasks DAGs definitions.
-
Run one or more workers.
Workers execute tasks that are assigned to them.
-
Run a workflow.
TEMP: Ideally, you would be able to create workflows in your own project and use Germinate as a framework. But, until we implement pickling and sending task executors over the wire to remote workers, its easiest to write workflows in ./germinate_ai/workflows and execute them as shown above.
The last argument is the input to the first set of tasks in the workflows initial state's tasks DAG.
Refer to ./germinate_ai/workflows/metagpt to see our (WIP) first example workflow.
Commands
Temporary limited CLI:
germinate coordinator- Start the Coordinator process.germinate worker- Start the Worker process.germinate workflow germinate_ai.workflows.metagpt.main- Enqueue the simple MetaGPT-(ish) workflow.germinate db- Create all Postgres tables.germinate --help- Print help message and exit.