The CLI Contract
Every AOS connector is a Python CLI tool that implements a standard interface. The contract is defined in the Harness Spec and enforced at runtime.Global Flags
Every connector must support these flags:Required Commands
Every connector must implement three built-in commands:JSON Output Envelope
All connector output follows a standard envelope format:Success
Error
Exit Codes
Permission Model
Connectors enforce a four-tier permission model via the--mode flag:
Permission enforcement happens inside the command execution path, not just at the documentation level. Every command is mapped to a minimum mode in
permissions.json:
write command with --mode readonly, the connector returns a structured error with exit code 3 (permission denied).
Discovery System
ArgentOS discovers connectors automatically from multiple sources:1. Vendored connectors (tools/aos/)
Shipped with the ArgentOS repository. These are the 61 built-in connectors.
2. User connectors (~/.argentos/connectors/)
Installed by the user or downloaded from the marketplace.
3. PATH executables
Any binary on your system PATH that starts withaos- is discovered automatically.
4. Custom directories
SetARGENT_CONNECTOR_REPOS environment variable to a comma-separated list of directories to scan.
Discovery Process
Each discovered connector gets aninstallState:
The connector.json Manifest
Every connector has a connector.json file that describes its metadata, commands, auth requirements, and UI field definitions:
Security Baseline
All connectors must follow these security rules:- No shell execution of unsanitized user input
- Path-based tools must enforce root allowlist boundaries
config showmust redact secrets (API keys, tokens, passwords)- Error messages must not leak credentials
- Write operations must respect the permission tier
- Destructive operations (
delete,revoke) requireadminmode
Integration with ArgentOS
When ArgentOS discovers a connector, it:- Registers it in the connector catalog (
src/connectors/catalog.ts) - Makes its commands available as agent tools (
src/connectors/tools.ts) - Shows it in the dashboard Systems panel with setup status
- Allows it to be used in Workflows as action nodes
- Makes it available to the execution worker for autonomous task processing
