Complete reference for all 43 adapters available in AI_Native_Lang.
Foundation operations - Variables, control flow, data structures
- Targets: SET, GET, LEN, APPEND, LIST, DICT, KEYS, VALUES, MERGE, FILTER, MAP, REDUCE, RANGE, CONTAINS, TYPE_OF, TO_STRING, TO_INT, TO_FLOAT, PARSE_JSON, TO_JSON, SPLIT, JOIN, SLICE, CONCAT, FLATTEN, UNIQUE, SORT, REVERSE, ZIP, ENUMERATE, GROUP_BY, SET_MULTI
- Example: Used in every AINL program for basic operations
- Network: No | Side Effects: None
No operation - Returns empty dict, used for placeholder/testing
- Targets: noop
- Network: No | Side Effects: None
Debugging utilities - Print, inspect, assert, breakpoint
- Targets: print, inspect, assert, breakpoint, log
- Example:
R debug.print "Debug output" ->result - Network: No | Side Effects: Logs/prints to stderr
Error handling - Raise, catch, retry mechanisms
- Targets: raise, catch, retry, is_error
- Network: No | Side Effects: May terminate execution
File system operations - Read, write, list, delete files
- Targets: READ, WRITE, DELETE, LIST, EXISTS, MKDIR, RMDIR, COPY, MOVE, STAT, CHMOD
- Example:
R fs.READ "/path/file.txt" ->content - Network: No | Side Effects: Modifies file system
Path manipulation - Join, dirname, basename, resolve
- Targets: join, dirname, basename, exists, resolve, ext
- Network: No | Side Effects: None
I/O operations - stdin, stdout, file descriptors
- Targets: read_stdin, write_stdout, read_file, write_file
- Network: No | Side Effects: I/O operations
HTTP client - GET, POST, PUT, DELETE requests
- Targets: get, post, put, delete, request
- Example:
examples/http_example.ainl - Network: Yes | Side Effects: External HTTP calls
A2A (Agent-to-Agent) client - Agent Card discovery, JSON-RPC tasks/send and tasks/get (ArmaraOS wire)
- Targets: discover, send, get_task
- Example:
examples/compact/a2a_delegate.ainl - Config:
ainl runuses--a2a-allow-host,--a2a-allow-insecure-local,--a2a-strict-ssrf,--a2a-follow-redirects; or envAINL_A2A_*(see docs/integrations/A2A_ADAPTER.md) - Network: Yes | Side Effects: Outbound HTTP only
Generic REST API wrapper - Configurable HTTP with auth
- Targets: call, get, post, put, delete
- Example:
examples/api_example.ainl - Config:
AINL_API_BASE_URL,AINL_API_TOKEN - Network: Yes | Side Effects: External API calls
Email integration - IMAP/SMTP with threading, attachments, HTML
- Targets: send, read, search, reply, draft, G (OpenClaw legacy)
- Examples:
examples/email_send_example.ainl,examples/email_reply_example.ainl,examples/email_html_example.ainl,examples/email_attachment_example.ainl - Config:
EMAIL_SMTP_HOST,EMAIL_IMAP_HOST,EMAIL_USERNAME,EMAIL_PASSWORD - Features: ✅ HTML email, ✅ Attachments, ✅ Threading (In-Reply-To), ✅ Drafts
- Network: Yes | Side Effects: Sends/reads emails
Web scraping - Fetch and parse web pages
- Targets: G (get page content)
- Example:
R web.G "https://example.com" ->html - Network: Yes | Side Effects: HTTP requests
GitHub API - Repos, issues, pull requests
- Targets: get_repo, list_issues, create_issue, get_pr
- Example:
examples/github_example.ainl - Config:
GITHUB_TOKEN - Network: Yes | Side Effects: May create/modify GitHub resources
Webhook receiver - Listen for HTTP callbacks
- Targets: listen, respond
- Network: Yes | Side Effects: Opens HTTP server
GraphQL client - Query and mutation execution
- Targets: query, mutate
- Network: Yes | Side Effects: External GraphQL calls
Database operations - Query, insert, update, delete
- Targets: query, insert, update, delete, transaction
- Config:
AINL_DB_URL,AINL_DB_TYPE(postgres, mysql, sqlite) - Network: Depends on DB | Side Effects: Modifies database
Key-value store - Get, set, delete key-value pairs
- Targets: get, set, delete, exists, keys, incr, decr
- Config:
AINL_KV_BACKEND(redis, memcached, file) - Network: Depends on backend | Side Effects: Modifies KV store
Caching layer - TTL-based caching
- Targets: get, set, delete, clear, ttl
- Network: No (in-memory) | Side Effects: Memory usage
Transaction management - Begin, commit, rollback
- Targets: begin, commit, rollback
- Example: Database transaction workflows
- Network: No | Side Effects: Transaction state
Message queue - Enqueue, dequeue, pub/sub
- Targets: enqueue, dequeue, peek, size, clear
- Config:
AINL_QUEUE_BACKEND(rabbitmq, sqs, redis) - Network: Depends on backend | Side Effects: Queue operations
CRM integration - Contacts, leads, opportunities
- Targets: create_contact, get_contact, update_contact, list_contacts
- Config:
AINL_CRM_PROVIDER(salesforce, hubspot) - Network: Yes | Side Effects: Modifies CRM data
Semantic search - Vector embeddings for RAG
- Targets: UPSERT_REF, SEARCH, REMOVE_REF
- Example:
examples/embedding_memory_example.ainl - Config:
AINL_EMBEDDING_MODE(stub, local, openai),OPENAI_API_KEY - Network: Depends on mode | Side Effects: Stores embeddings
Code analysis - Tiered chunking (Tier 0/1/2)
- Targets: INDEX, QUERY_CONTEXT, GET_FULL_SOURCE, GET_CHUNK, COMPRESS_CONTEXT, CLEAR
- Example:
examples/code_context_example.ainl - Config:
AINL_CODE_CONTEXT_MAX_TIER(default: 2) - Network: No | Side Effects: Creates index files
LLM provider - OpenAI, Anthropic, etc.
- Targets: GENERATE, CHAT
- Example:
examples/llm_example.ainl - Config:
AINL_LLM_PROVIDER(openai, anthropic),OPENAI_API_KEY,ANTHROPIC_API_KEY,AINL_LLM_MODEL - Network: Yes | Side Effects: API calls, costs money
LangChain integration - Call @tool decorated functions
- Targets: CALL
- Example:
examples/langchain_tool_example.ainl - Config:
LANGCHAIN_TOOL_PATH(Python module path) - Network: Depends on tool | Side Effects: Depends on tool
Extensions/subprocess - Execute shell commands
- Targets: echo, EXEC, RUN
- Example:
R ext.EXEC "ls -la" ->output - Network: No | Side Effects: Subprocess execution
Tool invocation bridge - Dynamic tool calling
- Targets: call, list, describe
- Network: Depends on tool | Side Effects: Depends on tool
Executor bridge - Cross-runtime communication
- Targets: send, receive, status
- Network: Depends on transport | Side Effects: IPC/RPC calls
Background workers - Async task execution
- Targets: spawn, wait, status, cancel, result
- Network: No | Side Effects: Background processes
Time operations - Current time, formatting, parsing
- Targets: now, format, parse, sleep, timezone
- Example:
R time.now ->timestamp - Network: No | Side Effects: None (sleep blocks)
Timers - Scheduled execution, intervals
- Targets: set, clear, interval, timeout
- Network: No | Side Effects: Scheduled callbacks
Cron scheduling - Periodic task execution
- Targets: add, remove, list, run_now
- Config:
AINL_CRON_BACKEND(system, internal) - Network: No | Side Effects: Scheduled execution
Authentication - Login, logout, token management
- Targets: login, logout, verify
- Config:
AINL_AUTH_PROVIDER,AINL_AUTH_SECRET - Network: Depends on provider | Side Effects: Auth state changes
Secret management - Encrypted storage
- Targets: get, set, delete, list
- Config:
AINL_SECRETS_BACKEND(vault, env, file) - Network: Depends on backend | Side Effects: Secret storage
Cryptography - Hash, encrypt, decrypt, sign
- Targets: hash, encrypt, decrypt, sign, verify
- Example:
R crypto.hash "sha256" "data" ->digest - Network: No | Side Effects: None
Mathematical operations - Trig, log, random
- Targets: add, sub, mul, div, mod, pow, sqrt, sin, cos, tan, log, exp, random, round, floor, ceil, abs, min, max
- Example:
R math.sqrt 144 ->result(returns 12) - Network: No | Side Effects: None
Statistics - Mean, median, std dev
- Targets: mean, median, mode, stddev, variance, percentile
- Network: No | Side Effects: None
Solana blockchain - Wallet, transactions, programs
- Targets: get_balance, send_transaction, get_account, deploy_program
- Config:
SOLANA_RPC_URL,SOLANA_KEYPAIR_PATH - Network: Yes | Side Effects: Blockchain transactions
Ethereum/Web3 - Smart contracts, transactions
- Targets: call, send, deploy, estimate_gas
- Config:
WEB3_PROVIDER_URL,WEB3_PRIVATE_KEY - Network: Yes | Side Effects: Blockchain transactions
Slack integration - Send messages, read channels
- Targets: send_message, read_channel, create_channel
- Config:
SLACK_BOT_TOKEN,SLACK_APP_TOKEN - Network: Yes | Side Effects: Sends Slack messages
- Total Adapters: 42
- Network-enabled: 15 (http, api, email, web, github, webhook, graphql, llm, db, kv, queue, crm, solana, web3, slack)
- Side Effects: 25 (modify external state)
- Examples Created: 12 (email x5, embedding_memory, code_context, langchain_tool, llm, github, api)
Key environment variables for commonly used adapters:
# Email
export EMAIL_USERNAME=your.email@gmail.com
export EMAIL_PASSWORD=app_specific_password
# LLM
export AINL_LLM_PROVIDER=openai
export OPENAI_API_KEY=sk-...
# GitHub
export GITHUB_TOKEN=ghp_...
# Database
export AINL_DB_URL=postgresql://user:pass@host/db
# API
export AINL_API_TOKEN=your_token
# Embedding
export AINL_EMBEDDING_MODE=openai
export OPENAI_API_KEY=sk-...
# Adapter Security
export AINL_ALLOW_IR_DECLARED_ADAPTERS=1
# OR
export AINL_HOST_ADAPTER_ALLOWLIST=core,http,email,llmAll examples located in examples/:
| Adapter | Example File | Description |
|---|---|---|
email_send_example.ainl |
Basic email sending | |
email_read_example.ainl |
Read inbox with filters | |
email_autoresponder.ainl |
Auto-reply pattern | |
email_reply_example.ainl |
Reply with threading | |
email_draft_example.ainl |
Draft management | |
email_html_example.ainl |
HTML email with fallback | |
email_attachment_example.ainl |
Send attachments | |
email_search_example.ainl |
IMAP search queries | |
| embedding_memory | embedding_memory_example.ainl |
Semantic RAG pattern |
| code_context | code_context_example.ainl |
Code analysis |
| langchain_tool | langchain_tool_example.ainl |
LangChain integration |
| llm | llm_example.ainl |
LLM generation/chat |
| github | github_example.ainl |
GitHub API usage |
| api | api_example.ainl |
REST API calls |
R fs.READ "config.json" ->config
R core.PARSE_JSON config ->data
R http.post "https://api.example.com/webhook" data ->response
R embedding_memory.SEARCH "Python best practices" 5 ->docs
R llm.GENERATE "Summarize these docs: {docs}" 500 0.7 ->summary
R email.read "INBOX" 10 true "urgent@company.com" ->emails
R fs.WRITE "/tmp/urgent_emails.json" emails ->result
R email.send "team@company.com" "Urgent Emails Report" emails ->sent
R db.query "SELECT * FROM users WHERE active=true" ->users
R queue.enqueue "process_users" users ->queued
R cache.set "active_users_count" users.length 3600 ->cached
AINL adapters integrate with ArmaraOS in two ways:
- Scheduled AINL Programs - ArmaraOS daemon runs .ainl files with all adapters available
- Agent Tool Bridge - ArmaraOS agents can invoke AINL programs as tools
See docs/armaraos-integration.md for details.
Capability Gating:
- All adapters respect
AINL_HOST_ADAPTER_ALLOWLIST/AINL_HOST_ADAPTER_DENYLIST - Set
AINL_ALLOW_IR_DECLARED_ADAPTERS=1to auto-allow registry adapters - Network-enabled adapters flagged with
"network": truein registry
Credential Management:
- Use environment variables (not hardcoded)
- ArmaraOS encrypts secrets in config
- Use app-specific passwords for email (not main password)
- Rotate API tokens regularly
Audit Trail:
- Side-effect adapters log operations
- Database/blockchain transactions are immutable
- Email sends create Message-ID for tracking
- Test Examples - Validate and run example programs
- Custom Adapters - Add project-specific adapters to registry
- ArmaraOS Integration - Sync AINL library to
~/.armaraos/ainl-library/ - Production Deployment - Set up proper secret management
To add a new adapter:
- Add definition to
ADAPTER_REGISTRY.json - Implement in
adapters/your_adapter.py - Create example in
examples/your_adapter_example.ainl - Update this catalog with entry
- Test with
ainl validateandainl run
See docs/ADAPTERS.md for implementation guide.