Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeLalor committed Dec 6, 2024
1 parent 8eb6029 commit a55792c
Show file tree
Hide file tree
Showing 8 changed files with 6,695 additions and 71 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG EIDOLON_VERSION=latest
ARG EIDOLON_VERSION=0.1.178
FROM python:3.11-slim AS builder
RUN pip install poetry
RUN poetry config virtualenvs.create false --local
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DOCKER_REPO_NAME ?= my-eidolon-project
DOCKER_REPO_NAME ?= browser-agent
VERSION := $(shell grep -m 1 '^version = ' pyproject.toml | awk -F '"' '{print $$2}')
WEBUI_TAG := latest
REQUIRED_ENVS := OPENAI_API_KEY
WEBUI_TAG := 1.0.67
REQUIRED_ENVS := ANTHROPIC_API_KEY
NAMESPACE ?= default

.PHONY: docker-serve _docker-serve .env sync update docker-build docker-push pull-webui k8s-operator check-kubectl check-helm check-cluster-running verify-k8s-permissions check-install-operator k8s-serve k8s-env k8s-mongo k8s-chroma test
Expand Down
69 changes: 6 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Eidolon Agent Machine Template
# Eidolon Browser Agent

This project serves as a template for individuals interested in building agents with Eidolon.
This project serves as an example browser agent.

## Directory Structure
This agent can manipulate a browser when directed by another user / agent.

- `resources`: This directory contains additional resources for the project. An example agent is provided for reference.
- `components`: This directory is where any custom code should be placed.
This respository is a WIP. Prompt engineering is evolving and kubernetes is not yet preconfigured (browser-service needs to be launched manually).

## Running the Server in Docker

First you need to clone the project and navigate to the project directory:

```bash
git clone https://github.com/eidolon-ai/agent-machine.git
git clone https://github.com/eidolon-ai/browser-agent.git
cd agent-machine
```

Expand All @@ -23,10 +22,7 @@ make docker-serve
```

The first time you run this command, you may be prompted to enter credentials that the machine needs
to run (ie, OpenAI API Key).

This command will download the dependencies required to run your agent machine and start the Eidolon http server in
"dev-mode".
to run (ie, ANTHROPIC API Key).

If the server starts successfully, you should see the following output:

Expand All @@ -38,56 +34,3 @@ INFO - Building machine 'local_dev'
...
INFO - Server Started in 1.50s
```

## Running the server in K8s

### Prerequisites

WARNING: This will work for local k8s environments only. See [Readme.md in the k8s directory](./k8s/Readme.md) if you are using this against a cloud based k8s environment.

To use kubernetes for local development, you will need to have the following installed:

- [Docker](https://docs.docker.com/get-docker/)
- [Kubernetes](https://kubernetes.io/docs/tasks/tools/)
- [Helm](https://helm.sh/docs/intro/install/)

Clone the project and navigate to the project directory:

```bash
git clone https://github.com/eidolon-ai/agent-machine.git
cd agent-machine
```

### Installation

If you are using Minikube, run the following commands before any make commands:

```bash
alias kubectl="minikube kubectl --"
eval $(minikube docker-env)
```

Make sure your kubernetes environment is set up properly and install the Eidolon k8s operator.

```bash
make k8s-operator
```

This will install the Eidolon operator in your k8s cluster. **This only needs to be done once.**

Next install the Eidolon resources. This will create an Eidolon machine and an Eidolon agent in your cluster, start them, and tail the logs:

```bash
make k8s-serve
```

If the server starts successfully, you should see the following output:

```
Deployment is ready. Tailing logs from new pods...
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO - Building machine 'local-dev'
INFO - Starting agent 'hello-world'
INFO - Server Started in 0.86s
```
10 changes: 8 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
agent-server:
image: my-eidolon-project:latest
image: browser-agent:latest
build:
context: .
dockerfile: Dockerfile
Expand All @@ -21,9 +21,10 @@ services:
depends_on:
- mongo
- chromadb
- browser-service

webui:
image: eidolonai/webui:latest
image: eidolonai/webui:1.0.67
environment:
- NEXTAUTH_SECRET=secret
- EIDOLON_SERVER=http://agent-server:8080
Expand All @@ -35,6 +36,11 @@ services:
depends_on:
- agent-server

browser-service:
image: eidolonai/browser_service:latest
ports:
- "7468:7468"

mongo:
image: mongo
command:
Expand Down
2 changes: 1 addition & 1 deletion k8s/webui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
name: webui-apps-config
containers:
- name: eidolon-webui
image: docker.io/eidolonai/webui:latest
image: docker.io/eidolonai/webui:1.0.67
volumeMounts:
- name: config-volume
mountPath: /app/apps/eidolon-ui2/eidolon-apps-override.json
Expand Down
Loading

0 comments on commit a55792c

Please sign in to comment.