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.
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.
| 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 |
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.
# 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
# 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...
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:
/theories or save theory