AGISystem2 provides two distinct command-line interfaces, each designed for different use cases. Both interfaces share the same underlying engine and knowledge store, but differ in how users interact with them and what level of control they offer.

User Raw CLI AGISystem2Raw.sh Structured commands Chat Interface AGISystem2.sh Natural language + LLM AGISystem2 Engine Core Sys2DSL Execution Knowledge Store .AGISystem2/ data & theories Structured Natural

Both CLI interfaces connect to the same AGISystem2 engine core. The Raw CLI accepts structured Sys2DSL commands directly, while the Chat interface uses an LLM to translate natural language into the same underlying commands.

Two Modes, Different Purposes

Aspect Raw CLI (AGISystem2Raw.sh) Chat Interface (AGISystem2.sh)
Input Style Structured commands and canonical syntax Natural language (any language)
Primary Use Testing, automation, scripting, CI/CD Exploration, demonstration, learning
Dependencies Node.js only Node.js + LLM API (OpenAI, Anthropic, etc.)
Determinism Fully deterministic, reproducible LLM introduces variability in parsing
Batch Mode Full support (--batch, --exec, --json) Interactive only
Learning Curve Requires understanding Sys2DSL syntax Minimal – just type naturally
Control Level Fine-grained, exact commands High-level, intent-based

When to Use Each Interface

Use the Raw CLI When:

Use the Chat Interface When:

The Library Approach

Both command-line interfaces are convenience wrappers around the AGISystem2 JavaScript library. For production applications, most integrations will use the library directly through the APIs:

const AgentSystem2 = require('agisystem2');

// Create engine instance
const agent = new AgentSystem2({ profile: 'prod' });
const session = agent.createSession();

// Execute commands programmatically
session.run(['@f ASSERT Dog IS_A Animal']);
const result = session.run(['@q ASK "Is Dog an Animal?"']);
console.log(result.q.truth); // TRUE_CERTAIN

The library approach provides:

See the API Reference for complete documentation of the library interface.

Quick Start

Raw CLI Quick Start

# Start interactive session
./bin/AGISystem2Raw.sh

# Add facts
AGIS2> add Dog IS_A Animal
AGIS2> add Cat IS_A Animal

# Ask questions
AGIS2> ask Is Dog an Animal?
Result: TRUE_CERTAIN

# Batch mode
./bin/AGISystem2Raw.sh --exec "add Fire CAUSES Smoke" --json

Full Raw CLI Documentation →

Chat Interface Quick Start

# Start chat (requires LLM API key)
export OPENAI_API_KEY="sk-..."
./bin/AGISystem2.sh

# Natural conversation
You: Dogs are mammals that bark
AI: Got it! I've learned 2 fact(s):
    - Dog IS_A Mammal
    - Dog HAS_PROPERTY barks

You: Is a dog an animal?
AI: Yes, based on what I know...

Full Chat Documentation →

Shared State

Both interfaces work with the same .AGISystem2/ directory structure in the current working directory:

.AGISystem2/
├── data/           # Concept storage, binary blobs
│   ├── concepts/   # Bounded diamond data
│   └── audit/      # Operation logs
└── theories/       # Theory files (.sys2dsl, .txt)
    ├── health_compliance.sys2dsl
    ├── law_minimal.sys2dsl
    └── scifi_magic.sys2dsl

Facts and theories created in one interface are immediately available in the other. This allows workflows like:

  1. Use Chat interface to interactively build initial knowledge base
  2. Export theory with /theories or save theory
  3. Use Raw CLI for automated testing of that theory
  4. Return to Chat for exploratory questions