Prerequisites
- Python 3.11+
- Target vendor API docs reviewed
- ArgentOS repo cloned (
tools/aos/directory available)
Directory Structure
Every connector lives attools/aos/aos-{name}/:
Step 1: Copy the Reference Template
Step 2: Write connector.json
This is the authoritative manifest. It tells ArgentOS what your connector does, what commands it supports, what auth it needs, and how to render it in the dashboard.
Step 3: Write permissions.json
Map every CLI command to a permission tier:
Step 4: Implement client.py
This is the core — the HTTP client that calls the actual vendor API.
- Use stdlib
urllib(no external HTTP dependencies) - One method per command
- Return structured dicts, not raw responses
- Auth resolved from constructor params (injected by
config.py)
Step 5: Implement runtime.py
Command result functions and the three required contracts:
Step 6: Implement cli.py
Wire commands to runtime functions using Click:
pyproject.toml:
Step 7: Write Tests
- Commands match
connector.jsonmanifest - Health: missing creds returns
needs_setup, valid creds returnshealthy - Read commands return expected data shapes (use FakeClient)
- Write commands respect mode gating (calling write in readonly mode fails)
Step 8: Verify End-to-End
Certification Gates
Before a connector is production-ready:| Gate | Requirement |
|---|---|
| Contract | Valid connector.json, working capabilities, health, config show |
| Safety | Write actions classified, destructive actions gated at admin mode |
| Audit | Tool calls preserve evidence, failures return understandable errors |
| Docs | README exists with setup instructions and known limitations |
| Tests | All required test categories pass |
Risk Tiers
| Tier | Access Level | Examples | Review Required |
|---|---|---|---|
| 1: Read-heavy | Queries only | Search tickets, list contacts | Minimal |
| 2: Bounded write | Scoped mutations | Reply to message, create event | Standard |
| 3: Business mutation | Business state changes | CRM stage change, invoice creation | Thorough |
| 4: Destructive/admin | Irreversible operations | Delete records, revoke access | Explicit approval |
