Skip to content

Latest commit

 

History

History
241 lines (174 loc) · 4.58 KB

installation.md

File metadata and controls

241 lines (174 loc) · 4.58 KB

Installation

This guide covers installing and starting managed-agents in a local workspace. The runtime is a single Node.js process that serves both the HTTP API and the local Console.

Requirements

  • Node.js 22 or newer
  • npm 10 or newer
  • A model provider API key or an OpenAI-compatible local endpoint
  • Docker, only when using Docker-backed sandboxes

Install With npx

Use npx when you want to try the runtime without installing a global package:

mkdir my-agents
cd my-agents
npx managed-agents init
npx managed-agents start

The Console will be available at:

http://127.0.0.1:3000/ui

The API will be available at:

http://127.0.0.1:3000/v1

Global Install

Use a global install for a workstation or shared development machine:

npm install -g managed-agents
managed-agents init
managed-agents start

Upgrade the global install with:

npm update -g managed-agents

Remove it with:

npm uninstall -g managed-agents

Build From Source

Use a source checkout when contributing to the project:

git clone git@github.com:sandbaseai/managed-agents.git
cd managed-agents
npm ci
npm run build
npm start

During development, run the TypeScript entry point directly:

npm run dev

Run the Console Vite server separately when iterating on UI code:

npm run dev:console

Initialize A Workspace

Create a workspace with the default seed directories and example files:

managed-agents init

This creates:

agents/
skills/
managed-agents.config.yaml

agents/ and skills/ are optional seed/import folders. Runtime metadata and uploaded resource state are stored outside the repository under ~/.managed-agents/<workspace-name>-<hash>/ by default.

Configure A Model

Edit managed-agents.config.yaml and configure at least one model.

OpenAI-compatible hosted provider:

models:
  - name: gpt-4o
    provider: openai
    model: gpt-4o
    api_key: ${OPENAI_API_KEY}

OpenAI-compatible local endpoint:

models:
  - name: local-llama
    provider: openai
    model: llama3.1
    base_url: http://127.0.0.1:11434/v1
    api_key: ${LOCAL_MODEL_API_KEY}

Anthropic model provider:

models:
  - name: claude-sonnet
    provider: anthropic
    model: claude-sonnet-4-5
    api_key: ${ANTHROPIC_API_KEY}

Environment variables in the config file are resolved at startup.

Configure Environments

Every session runs in an environment. The default local environment is enough for a first run:

environments:
  local:
    sandbox_provider: local
    timeout: 300

Docker-backed environments can be added when command execution needs stronger process isolation:

environments:
  docker:
    sandbox_provider: docker
    timeout: 300

Start Options

managed-agents start \
  --host 127.0.0.1 \
  --port 3000 \
  --config managed-agents.config.yaml \
  --agents-dir agents \
  --skills-dir skills
Option Default Purpose
--host 127.0.0.1 Bind address for the API and Console.
--port 3000 HTTP port.
--config managed-agents.config.yaml Runtime configuration file.
--agents-dir agents Directory containing agent YAML files.
--skills-dir skills Directory containing skill packages.
--data-dir ~/.managed-agents/<workspace-name>-<hash> SQLite database, uploaded files, and runtime data.
--target unset Optional runtime target label surfaced in the Console.

Set MANAGED_AGENTS_HOME to move all workspace runtime folders together, or pass --data-dir for a single workspace override.

Enable API Authentication

Local development is open by default. To require bearer tokens, set:

export MANAGED_AGENTS_API_KEY=sk-local-example
managed-agents start

Or configure API keys in managed-agents.config.yaml:

api_keys:
  - ${MANAGED_AGENTS_API_KEY}

Clients must then send:

Authorization: Bearer sk-local-example

Verify The Install

Check the runtime:

curl http://127.0.0.1:3000/v1/x/health

List agents:

curl http://127.0.0.1:3000/v1/agents

Open the Console:

http://127.0.0.1:3000/ui

Troubleshooting

If the Console loads but agents are missing, run:

managed-agents reload

If sessions fail to start, check:

  • The agent model.id matches a configured model name.
  • Required provider API keys are set in the shell that started the runtime.
  • The requested environment_id exists and is active.
  • Uploaded file resources use mount paths under /uploads/.