diff --git a/.gitignore b/.gitignore index cdcc4c9..c19a41f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,6 @@ /target /node_modules/ /.idea -prompt.md -todo chrome stream_store data/ diff --git a/Cargo.lock b/Cargo.lock index f208495..c82ba1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -624,6 +624,33 @@ version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +[[package]] +name = "open-web-agent-rs" +version = "0.1.0" +dependencies = [ + "anyhow", + "axum", + "base64", + "bytes", + "dotenv", + "fips204", + "futures", + "http", + "lazy_static", + "rust-embed", + "serde", + "serde_json", + "shell-escape", + "sled", + "tokio", + "tokio-stream", + "tokio-util", + "tower-http", + "tracing", + "tracing-subscriber", + "uuid", +] + [[package]] name = "overload" version = "0.1.1" @@ -1239,33 +1266,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "web-agent-rs" -version = "0.1.0" -dependencies = [ - "anyhow", - "axum", - "base64", - "bytes", - "dotenv", - "fips204", - "futures", - "http", - "lazy_static", - "rust-embed", - "serde", - "serde_json", - "shell-escape", - "sled", - "tokio", - "tokio-stream", - "tokio-util", - "tower-http", - "tracing", - "tracing-subscriber", - "uuid", -] - [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 302d024..5b28c73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "web-agent-rs" +name = "open-web-agent-rs" version = "0.1.0" edition = "2021" license = "MIT" diff --git a/docs/configuration.md b/docs/configuration.md index e1a1c8a..11719d4 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -2,7 +2,7 @@ ## Environment Variables -web-agent-rs uses environment variables for configuration. These can be set in a `.env` file in the root directory or directly in your environment. +open-web-agent-rs uses environment variables for configuration. These can be set in a `.env` file in the root directory or directly in your environment. ### Required Environment Variables diff --git a/docs/index.md b/docs/index.md index b8a00c8..f8d0993 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ -# web-agent-rs Documentation +# open-web-agent-rs Documentation -Welcome to the documentation for web-agent-rs, a GenAIScript host for integration into conversational AI applications. +Welcome to the documentation for open-web-agent-rs, a GenAIScript host for integration into conversational AI applications. ## Table of Contents @@ -12,7 +12,7 @@ Welcome to the documentation for web-agent-rs, a GenAIScript host for integratio ## Overview -web-agent-rs is a server that hosts GenAIScript agents for integration into conversational AI applications. It provides a simple API for creating and consuming stream resources that execute various agents to perform tasks like web search, news search, image generation, and web scraping. +open-web-agent-rs is a server that hosts GenAIScript agents for integration into conversational AI applications. It provides a simple API for creating and consuming stream resources that execute various agents to perform tasks like web search, news search, image generation, and web scraping. ## Architecture @@ -28,7 +28,7 @@ The application is built with Rust using the Axum web framework. It uses GenAISc ## Getting Started -To get started with web-agent-rs, follow these steps: +To get started with open-web-agent-rs, follow these steps: 1. Read the [Installation Guide](./installation.md) to set up the project 2. Configure the application using the [Configuration Guide](./configuration.md) @@ -42,4 +42,4 @@ Please note that this project has not undergone a formal security assessment. Yo ## Contributing -Contributions to web-agent-rs are welcome! Please feel free to submit issues and pull requests to improve the project. +Contributions to open-web-agent-rs are welcome! Please feel free to submit issues and pull requests to improve the project. diff --git a/docs/input.md b/docs/input.md index 85b06f8..c5db9cd 100644 --- a/docs/input.md +++ b/docs/input.md @@ -2,7 +2,7 @@ ## Overview -This document explains how input works for agents in the web-agent-rs project. Understanding how input is processed is essential for creating effective agents and integrating them with client applications. +This document explains how input works for agents in the open-web-agent-rs project. Understanding how input is processed is essential for creating effective agents and integrating them with client applications. ## Input Flow diff --git a/docs/installation.md b/docs/installation.md index 53a9a54..933ccea 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -2,7 +2,7 @@ ## Prerequisites -Before installing web-agent-rs, ensure you have the following prerequisites: +Before installing open-open-web-agent-rs, ensure you have the following prerequisites: - [Rust](https://www.rust-lang.org/tools/install) (latest stable version) - [Node.js](https://nodejs.org/) (for GenAIScript) @@ -52,12 +52,12 @@ You can also run the application using Docker: 1. Build the Docker image: ```bash - docker build -t web-agent-rs -f Dockerfile . + docker build -t open-web-agent-rs -f .Dockerfile . ``` 2. Run the container: ```bash - docker run -p 3006:3006 --env-file .env web-agent-rs + docker run -p 3006:3006 --env-file .env open-web-agent-rs ``` Alternatively, you can use Docker Compose: diff --git a/docs/streams.md b/docs/streams.md index 60303c7..bb7aed6 100644 --- a/docs/streams.md +++ b/docs/streams.md @@ -4,7 +4,7 @@ This document describes how the stream data is formatted as it comes across the ## Overview -The web-agent-rs uses Server-Sent Events (SSE) to stream data from agents to clients. This allows for real-time updates as the agent processes the request and generates responses. +The open-web-agent-rs uses Server-Sent Events (SSE) to stream data from agents to clients. This allows for real-time updates as the agent processes the request and generates responses. ## Stream Format diff --git a/docs/tokens.md b/docs/tokens.md index c2afdfa..e092f36 100644 --- a/docs/tokens.md +++ b/docs/tokens.md @@ -2,7 +2,7 @@ ## Overview -This document outlines the token-based authentication system used in web-agent-rs. The system uses FIPS204 signatures to +This document outlines the token-based authentication system used in open-web-agent-rs. The system uses FIPS204 signatures to generate secure session tokens containing user data. ## Core Components diff --git a/fly.toml b/fly.toml index b7fdefc..4645059 100644 --- a/fly.toml +++ b/fly.toml @@ -1,4 +1,4 @@ -app = "web-agent-rs" +app = "open-web-agent-rs" primary_region = "iad" [deploy] diff --git a/package.json b/package.json index f8f2973..14dcdbb 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "web-agent-rs", + "name": "open-web-agent-rs", "type": "module", "workspaces": ["packages/*"], "private": true, diff --git a/packages/genaiscript-rust-shim/package.json b/packages/genaiscript-rust-shim/package.json index 959e8b0..407c085 100644 --- a/packages/genaiscript-rust-shim/package.json +++ b/packages/genaiscript-rust-shim/package.json @@ -1,5 +1,5 @@ { - "name": "@web-agent-rs/genaiscript-rust-shim", + "name": "@open-web-agent-rs/genaiscript-rust-shim", "module": "index.ts", "private": true, "type": "module", diff --git a/packages/genaiscript/package.json b/packages/genaiscript/package.json index 08a85d5..a0acc39 100644 --- a/packages/genaiscript/package.json +++ b/packages/genaiscript/package.json @@ -1,5 +1,5 @@ { - "name": "@web-agent-rs/genaiscript", + "name": "@open-web-agent-rs/genaiscript", "type": "module", "workspaces": ["packages/*"], "private": true, @@ -9,20 +9,13 @@ "shim:ai:search": "pnpm build && ./dist/shim.js --file=genaisrc/search.genai.mts USER_INPUT=\"Who won the 2024 presidential election?\"\n", "ai:news": "genaiscript run genaisrc/news-search.genai.mts --vars USER_INPUT='What are the latest updates and developments in the Ukraine war?'", "ai:url:read": "genaiscript run genaisrc/web-scrape.genai.mts --vars USER_INPUT='{\"url\":\"https://geoff.seemueller.io/about\",\"query\":\"Describe the details of the page.\", \"action\": \"read\"}'", - "ai:url:scrape": "npx genaiscript run genaisrc/web-scrape.genai.mts --vars USER_INPUT='{\"url\":\"https://www.time4learning.com/homeschool-curriculum/high-school/eleventh-grade/math.html\",\"query\":\"What is on this page?\", \"action\": \"scrape\"}'", - "crypto:quote": "npx genaiscript run genaisrc/finance-query.genai.mts --vars USER_INPUT='Get a quote for BTC'", - "crypto:news": "npx genaiscript run genaisrc/finance-query.genai.mts --vars USER_INPUT='What is the news for Bitcoin?'", - "crypto:overview": "npx genaiscript run genaisrc/finance-query.genai.mts --vars USER_INPUT='What are the trending symbols in the market?'" + "ai:url:scrape": "npx genaiscript run genaisrc/web-scrape.genai.mts --vars USER_INPUT='{\"url\":\"https://www.time4learning.com/homeschool-curriculum/high-school/eleventh-grade/math.html\",\"query\":\"What is on this page?\", \"action\": \"scrape\"}'" }, "dependencies": { - "@agentic/perigon": "^7.2.0", "@agentic/searxng": "7.5.3", - "@kevinwatt/mcp-server-searxng": "^0.3.9", "@types/node": "^22.10.2", "genaiscript": "^1.95.1", "happy-dom": "^16.0.1", - "@web-agent-rs/perigon": "workspace:*", - "@web-agent-rs/core": "workspace:*", "ky": "^1.8.0" } } diff --git a/src/handlers/agents.rs b/src/handlers/agents.rs index 7436267..913e92a 100644 --- a/src/handlers/agents.rs +++ b/src/handlers/agents.rs @@ -18,7 +18,7 @@ use tokio::sync::Mutex; // init sled lazy_static! { static ref DB: Arc> = Arc::new(Mutex::new( - sled::open("./web-agent-rs/db/stream_store").expect("Failed to open sled database") + sled::open("./open-web-agent-rs/db/stream_store").expect("Failed to open sled database") )); }