Page cover

API Reference

This reference documents the key APIs for JuliaOS, including Node.js, Julia, and Python interfaces.

Node.js/TypeScript API

Julia Bridge

The Julia Bridge provides a communication channel between Node.js and the Julia backend.

import { JuliaBridge } from './packages/julia-bridge';

// Initialize
const juliaBridge = new JuliaBridge({
  host: 'localhost',
  port: 8052
});

// Connect
const connected = await juliaBridge.connect();

// Run a Julia command
const result = await juliaBridge.runJuliaCommand('agents.list_agents', {});

Agent Manager

Swarm Manager

Wallet Manager

Python API

JuliaOS Client

Agent API

Swarm API

Wallet API

Julia API

Julia APIs are exposed via the command handler in the Julia backend:

Command Reference

These commands can be called via the Julia Bridge:

Category
Command
Description
Parameters

Agents

agents.list_agents

List all agents

None

Agents

agents.create_agent

Create a new agent

name, type, config

Agents

agents.get_agent

Get agent details

id

Agents

agents.start_agent

Start an agent

id

Agents

agents.stop_agent

Stop an agent

id

Agents

agents.delete_agent

Delete an agent

id

Swarms

swarms.list_swarms

List all swarms

None

Swarms

swarms.create_swarm

Create a new swarm

name, algorithm, config

Swarms

swarms.get_swarm

Get swarm details

id

Swarms

swarms.start_swarm

Start a swarm

id

Swarms

swarms.stop_swarm

Stop a swarm

id

Swarms

swarms.delete_swarm

Delete a swarm

id

Wallets

wallets.connect_wallet

Connect a wallet

address, chain

Wallets

wallets.disconnect_wallet

Disconnect a wallet

address

Wallets

wallets.get_balance

Get wallet balance

address

System

system.get_status

Get system status

None

System

system.get_metrics

Get system metrics

None

Event Reference

JuliaOS components emit various events that can be listened to:

Category
Event
Description
Data

Agents

agent:created

Agent created

{ id, name, type }

Agents

agent:started

Agent started

{ id }

Agents

agent:stopped

Agent stopped

{ id }

Swarms

swarm:created

Swarm created

{ id, name, algorithm }

Swarms

swarm:started

Swarm started

{ id }

Swarms

swarm:stopped

Swarm stopped

{ id }

Wallets

wallet:connected

Wallet connected

{ address, chain }

Wallets

wallet:disconnected

Wallet disconnected

{ address }

System

system:started

System started

{ timestamp }

System

system:stopped

System stopped

{ timestamp }