Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,49 @@ Grab the latest build from [GitHub Releases](https://github.com/agent0ai/space-a

<a id="host"></a>

#### With Nix (flakes)

```bash
nix run github:agent0ai/space-agent
```

Or install permanently:

```bash
nix profile install github:agent0ai/space-agent
```

#### With Devbox

```bash
# Install devbox first (if not already installed)
curl -fsSL https://get.jetify.dev/devbox | bash

# Clone the repository
git clone https://github.com/agent0ai/space-agent.git
cd space-agent

# Initialize the environment
devbox shell

# Install dependencies
devbox run install

# create yourself an admin
node space user create admin --password "change-me-now" --full-name "Admin" --groups _admin

# start the server
node space serve
```

Or install devbox via Homebrew:

```bash
brew install jetify-com/devbox/devbox
```

#### From source

```bash
git clone https://github.com/agent0ai/space-agent.git
cd space-agent
Expand Down
16 changes: 16 additions & 0 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
"packages": [
"nodejs_22"
],
"shell": {
"init_hook": [
"echo 'Welcome to the space-agent devbox environment!'"
],
"scripts": {
"install": "npm install",
"start": "node space serve",
"dev": "node server/dev_server.js"
}
}
}
66 changes: 66 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
description = "Browser-first AI agent with a thin Node.js server";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
space-agent = pkgs.buildNpmPackage {
pname = "space-agent";
version = "0.36.0";
src = ./.;

npmDeps = pkgs.fetchNpmDeps {
src = ./.;
hash = "sha256-GvKSULl2i+6pDjrodxFKgeA0FS/jeGnHS+sas8GVj38=";
};

dontNpmBuild = true;

installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib/node_modules/space-agent

# Copy all source files
cp -r . $out/lib/node_modules/space-agent/

# Create wrapper script
cat > $out/bin/space <<EOF
#!${pkgs.bash}/bin/bash
cd $out/lib/node_modules/space-agent
exec ${pkgs.nodejs_22}/bin/node space "\$@"
EOF

chmod +x $out/bin/space
'';

meta = {
description = "Browser-first AI agent with a thin Node.js server";
homepage = "https://github.com/agent0ai/space-agent";
license = pkgs.lib.licenses.mit;
mainProgram = "space";
};
};
in
{
packages.default = space-agent;
apps.default = {
type = "app";
program = "${space-agent}/bin/space";
};

overlays.default = final: prev: {
space-agent = space-agent;
};

checks = {
build = space-agent;
};
}
);
}