Agent Operating System built on three primitives: Worker, Function, Trigger.
60+ tools · 2,556 tests · 25 LLM providers · 47 models · 40 channels · 35K LOC
Every capability — agents, memory, security, LLM routing, workflows, tools, swarms, knowledge graphs, session replay, vault, self-evolving functions — is a plain function registered on an iii-engine bus. No frameworks, no vendor lock-in, no magic.
┌──────────────────────────────────────────────────────────────┐
│ iii-engine │
│ Worker · Function · Trigger │
├──────────┬───────────┬───────────┬───────────┬───────────────┤
│ agent │ security │ llm │ memory │ wasm │
│ core │ rbac │ router │ store │ sandbox │
│ workflow │ audit │ 25 LLMs │ session │ (wasmtime) │
│ api │ taint │ catalog │ recall │ (Rust) │
│ hand │ sign │ (Rust) │ (Rust) │ │
│ (Rust) │ (Rust) │ │ │ │
├──────────┴───────────┴───────────┴───────────┴───────────────┤
│ Control Plane (Rust) │
│ realm · hierarchy · directive · mission · ledger │
│ council · pulse · bridge (8 crates, 45 functions) │
├──────────────────────────────────────────────────────────────┤
│ Evolve / Eval / Feedback Loop │
│ evolve (LLM code gen + vm sandbox + live registration) │
│ eval (pluggable scorers + suites + inline auto-scoring) │
│ feedback (review + improve + promote/kill + leaderboard) │
│ (TypeScript) │
├──────────────────────────────────────────────────────────────┤
│ api · workflows · tools(60+) · skills · channels · hooks │
│ approval · streaming · mcp · a2a · vault · browser · swarm │
│ knowledge-graph · session-replay · skillkit · tool-profiles │
│ (TypeScript) │
├──────────────────────────────────────────────────────────────┤
│ embedding (Python) │
├──────────────────────────────────────────────────────────────┤
│ CLI (Rust) TUI (Rust/ratatui) │
├──────────────────────────────────────────────────────────────┤
│ 45 agents · 7 hands · 25 integrations · 40 channels │
│ 8 tool profiles · 47 models · 21 TUI screens │
└──────────────────────────────────────────────────────────────┘
curl -fsSL https://raw.githubusercontent.com/iii-hq/agentos/main/scripts/install.sh | shInstalls both iii-engine (dependency) and agentos binary to ~/.local/bin.
Options:
AGENTOS_VERSION=v0.1.0 curl -fsSL ... | sh # specific version
BIN_DIR=/usr/local/bin curl -fsSL ... | sh # custom install dir# 1. Initialize and start
agentos init --quick
agentos config set-key anthropic $ANTHROPIC_API_KEY
agentos start
# 2. Chat with an agent
agentos chat default# 1. Start the engine
iii --config config.yaml
# 2. Start Rust workers (hot path)
cargo run --release -p agentos-core &
cargo run --release -p agentos-security &
cargo run --release -p agentos-memory &
cargo run --release -p agentos-llm-router &
cargo run --release -p agentos-wasm-sandbox &
# 3. Start control plane workers
cargo run --release -p agentos-realm &
cargo run --release -p agentos-hierarchy &
cargo run --release -p agentos-directive &
cargo run --release -p agentos-mission &
cargo run --release -p agentos-ledger &
cargo run --release -p agentos-council &
cargo run --release -p agentos-pulse &
cargo run --release -p agentos-bridge &
# 4. Start TypeScript workers
npx tsx src/api.ts &
npx tsx src/agent-core.ts &
npx tsx src/tools.ts &
npx tsx src/workflow.ts &
# 5. Start Python embedding worker
python workers/embedding/main.py &
# 6. Chat with an agent
cargo run -p agentos-cli -- chat defaultOr use the CLI:
cargo run -p agentos-cli -- init --quick
cargo run -p agentos-cli -- start
cargo run -p agentos-cli -- message default "What can you do?"Polyglot by design — Rust for hot path, TypeScript for iteration speed, Python for ML.
Every component connects to the iii-engine over WebSocket and registers functions. Functions call other functions via trigger(). That's it.
| Crate | Purpose | LOC |
|---|---|---|
agent-core |
ReAct agent loop — orchestrates LLM calls, tool execution, memory | ~320 |
security |
RBAC, Merkle audit chain, taint tracking, Ed25519 signing, tool policy, Docker sandbox | ~700 |
memory |
Session/episodic memory, recall, consolidation, eviction | ~840 |
llm-router |
Routes to 25 LLM providers with complexity-based model selection | ~320 |
wasm-sandbox |
Executes untrusted code in WASM via wasmtime | ~180 |
cli |
50+ commands across 15 subcommand groups | ~700 |
tui |
21-screen terminal dashboard (ratatui) | ~330 |
api |
Rust HTTP API layer | ~200 |
hand-runner |
Autonomous hand execution engine | ~150 |
workflow |
Rust workflow step execution | ~200 |
realm |
Multi-tenant isolation domains with export/import | ~280 |
hierarchy |
Agent org structure with cycle-safe DFS tree building | ~250 |
directive |
Hierarchical goal alignment with optimistic concurrency | ~280 |
mission |
Task lifecycle with state machine and atomic checkout | ~350 |
ledger |
Budget enforcement with soft/hard limits and versioned CAS | ~300 |
council |
Governance proposals with SHA-256 merkle-chained audit trail | ~450 |
pulse |
Scheduled agent invocation with context-aware ticks | ~250 |
bridge |
External runtime adapters (Process/HTTP/ClaudeCode/Codex/Cursor/OpenCode) | ~300 |
| Worker | Purpose |
|---|---|
api.ts |
OpenAI-compatible REST API |
agent-core.ts |
Agent loop with fail-closed security gates |
workflow.ts |
Multi-step workflow engine (5 step modes) |
tools.ts |
Built-in tool registry (22 tools) |
tools-extended.ts |
Extended tools (38 tools: scheduling, media, data, system, code) |
security.ts |
Prompt injection scanning, content filtering |
security-map.ts |
Mutual Authentication Protocol (MAP) with timing-safe HMAC |
security-headers.ts |
HTTP security headers |
security-zeroize.ts |
Sensitive data auto-zeroing |
skills.ts |
Skill discovery and execution |
skill-security.ts |
Skill manifest validation and sandboxing |
skillkit-bridge.ts |
SkillKit marketplace integration (15K+ skills) |
streaming.ts |
SSE streaming for chat responses |
approval.ts |
Human-in-the-loop approval gates |
approval-tiers.ts |
Auto/async/sync approval tier classification |
memory.ts |
TypeScript memory layer |
llm-router.ts |
25-provider LLM routing with complexity scoring |
model-catalog.ts |
47 models with pricing and capability metadata |
mcp-client.ts |
Model Context Protocol client |
a2a.ts |
Agent-to-Agent protocol (JSON-RPC 2.0) |
a2a-cards.ts |
A2A agent card discovery |
vault.ts |
AES-256-GCM encrypted vault with PBKDF2 key derivation |
browser.ts |
Headless browser automation with SSRF protection |
context-manager.ts |
Context window budget management |
context-monitor.ts |
Token usage monitoring |
cost-tracker.ts |
Per-agent cost tracking |
hooks.ts |
Lifecycle hook execution (8 hook types) |
rate-limiter.ts |
GCRA rate limiting |
loop-guard.ts |
Infinite loop detection with circuit breaker |
swarm.ts |
Multi-agent swarm coordination |
knowledge-graph.ts |
Entity-relation knowledge graph |
session-replay.ts |
Session action recording and playback |
tool-profiles.ts |
Tool filtering profiles (8 profiles) |
hand-runner.ts |
Autonomous hand execution |
migration.ts |
Framework migration utilities |
dashboard.ts |
Dashboard data aggregation |
telemetry.ts |
OpenTelemetry metrics (SDK-native, auto worker CPU/memory/event-loop) |
cron.ts |
Scheduled jobs (session cleanup, cost aggregation, rate limit reset) |
code-agent.ts |
Specialized coding agent |
evolve.ts |
Dynamic function evolution (LLM code gen + vm sandbox + live registration) |
eval.ts |
Production eval harness (pluggable scorers, suites, inline auto-scoring) |
feedback.ts |
Feedback loop (auto-review, improve/kill, promote, leaderboard) |
channels/*.ts |
40 channel adapters |
| Worker | Purpose |
|---|---|
embedding/main.py |
Text embeddings via SentenceTransformers (fallback: hash-based) |
Tools are organized into categories and filtered by profile to optimize token usage:
| Category | Count | Examples |
|---|---|---|
| File Operations | 6 | read, write, list, search, apply_patch, watch |
| Web | 4 | search, fetch, screenshot, browser actions |
| Code | 5 | analyze, format, lint, test, explain |
| Shell | 2 | exec, spawn |
| Data | 8 | json_parse/stringify/query/transform, csv_parse/stringify, yaml_parse/stringify |
| Memory | 3 | store, recall, search |
| Scheduling | 4 | schedule_reminder, cron_create/list/delete |
| Collaboration | 4 | todo_create/list/update/delete |
| Media | 5 | image_analyze, audio_transcribe, tts_speak, media_download, image_generate_prompt |
| Knowledge Graph | 3 | kg_add, kg_query, kg_visualize |
| Inter-Agent | 3 | agent_list, agent_delegate, channel_send |
| System | 5 | env_get, system_info, process_list, disk_usage, network_check |
| Utility | 4 | uuid_generate, hash_compute, regex_match/replace |
| Database | 4 | db_query, db_insert, db_update, db_delete |
Profiles filter tools per agent to reduce token overhead:
| Profile | Tools Included |
|---|---|
chat |
web_search, web_fetch, memory_recall, memory_store |
code |
file_, shell_exec, code_, apply_patch |
research |
web_, browser_, memory_* |
ops |
shell_exec, system_, process_, disk_, network_ |
data |
json_, csv_, yaml_, regex_, file_* |
full |
All tools |
The control plane layer provides full agent orchestration — multi-tenant isolation, org hierarchies, goal alignment, task management, budget enforcement, governance, scheduling, and external runtime adapters.
All 8 crates are Rust workers on iii-sdk, exposing 45 functions via 44 HTTP endpoints and 2 PubSub triggers.
trigger("realm::create", json!({ "name": "production", "description": "Prod environment" }))
trigger("hierarchy::set", json!({ "realmId": "r-1", "agentId": "agent-ceo", "title": "CEO" }))
trigger("directive::create", json!({ "realmId": "r-1", "title": "Ship v2", "level": "realm" }))
trigger("mission::create", json!({ "realmId": "r-1", "title": "Build auth", "directiveId": "dir-1" }))
trigger("ledger::set_budget", json!({ "realmId": "r-1", "monthlyCents": 500000 }))
trigger("council::submit", json!({ "realmId": "r-1", "kind": "hire_agent", "title": "Hire researcher" }))
trigger("pulse::register", json!({ "realmId": "r-1", "agentId": "agent-ops", "intervalSecs": 300 }))
trigger("bridge::invoke", json!({ "realmId": "r-1", "runtimeId": "rt-1", "input": "Review PR #42" }))| Crate | Endpoints | Key Features |
|---|---|---|
realm |
7 REST | Multi-tenant isolation, export/import with secret scrubbing |
hierarchy |
5 REST | Org charts, cycle detection (DFS), capability search, chain-of-command |
directive |
5 REST | Goal trees, ancestry tracing, optimistic concurrency (CAS) |
mission |
7 REST | State machine (Backlog→Queued→Active→Review→Complete), atomic checkout |
ledger |
4 REST + 1 PubSub | Soft/hard budget limits, versioned CAS, spend tracking by agent/model/provider |
council |
6 REST + 1 PubSub | Proposal governance, SHA-256 merkle audit chain, agent override (pause/resume/terminate) |
pulse |
4 REST | Scheduled invocation, context modes (thin/full), budget-gated ticks |
bridge |
5 REST | 6 runtime adapters, path traversal prevention, process timeout, JoinHandle cleanup |
Multi-agent swarm coordination for complex tasks:
trigger("swarm::create", {
goal: "Research and write a technical blog post",
agents: ["researcher", "writer", "editor"],
strategy: "sequential"
})Strategies: parallel, sequential, consensus, hierarchical.
Entity-relation graph for structured knowledge:
trigger("kg::add_entity", { type: "project", name: "agentos", properties: { ... } })
trigger("kg::add_relation", { from: "agentos", to: "iii-engine", type: "built_on" })
trigger("kg::query", { entity: "agentos", depth: 2 })Agents can write, register, evaluate, and improve functions at runtime. The evolve-eval-feedback loop turns AgentOS from a static orchestrator into a self-evolving system.
Agent goal/spec
↓
evolve::generate → LLM writes function code
↓
evolve::register → security scan → vm sandbox → register on iii bus
↓
eval::suite → invoke N times → score each → aggregate
↓
feedback::review → analyze scores → KEEP / IMPROVE / KILL
↓ ↓ ↓
↓ evolve::generate evolve::unregister
↓ (with feedback)
↓
feedback::promote → draft → staging → production
trigger("evolve::generate", { goal: "Double a number", name: "doubler", agentId: "agent-1" })
trigger("evolve::register", { functionId: "evolved::doubler_v1" })
trigger("evolve::list", { status: "production" })- LLM generates function code from a goal/spec
- Code runs in a
node:vmsandbox (no fetch, fs, process, require, setTimeout, eval) - Sandboxed
trigger()proxy only allowsevolved::,tool::,llm::prefixes - Pre-registration security scan via
skill::pipeline - Lifecycle:
draft→staging→production→deprecated→killed
trigger("eval::run", { functionId: "evolved::doubler_v1", input: { value: 5 }, expected: { doubled: 10 } })
trigger("eval::suite", { suiteId: "suite_doubler" })
trigger("eval::compare", { functionIdA: "evolved::doubler_v1", functionIdB: "evolved::doubler_v2", testCases: [...] })- Pluggable scorers:
exact_match,llm_judge,semantic_similarity,custom - Inline auto-scoring on every evolved function call (configurable: auto/sampled/manual/off)
- Score formula: correctness (50%) + safety (25%) + latency (15%) + cost (10%)
trigger("feedback::review", { functionId: "evolved::doubler_v1" })
trigger("feedback::promote", { functionId: "evolved::doubler_v1", targetStatus: "production" })
trigger("feedback::leaderboard", {})- Auto-review every 6 hours via cron
- Decision algorithm: kill (≥3 failures in last 5), improve (avg < 0.5), keep
- Recursive improvement: up to 3 attempts with LLM feedback
- Leaderboard ranking by overall score
Record and replay full agent sessions for debugging:
trigger("replay::record", { sessionId, agentId, action: "tool_call", data: { toolId, args } })
trigger("replay::get", { sessionId })
trigger("replay::summary", { sessionId })agentos init [--quick] Initialize project
agentos start Start all workers
agentos stop Stop all workers
agentos status [--json] Show system status
agentos health [--json] Health check
agentos doctor [--json] [--repair] Diagnose issues
agentos agent new [template] Create agent from template
agentos agent list List all agents
agentos agent chat <id> Interactive chat
agentos agent kill <id> Stop an agent
agentos agent spawn <template> Spawn from template
agentos chat [agent] Quick chat
agentos message <agent> <text> Send single message
agentos workflow list List workflows
agentos workflow create <file> Create workflow
agentos workflow run <id> Execute workflow
agentos trigger list List triggers
agentos trigger create <fn> <type> Create trigger
agentos trigger delete <id> Delete trigger
agentos skill list List skills
agentos skill install <path> Install skill
agentos skill remove <id> Remove skill
agentos skill search <query> Search skills
agentos skill create <name> Scaffold new skill
agentos channel list List channels
agentos channel setup <name> Configure channel
agentos channel test <name> Test channel
agentos channel enable <name> Enable channel
agentos channel disable <name> Disable channel
agentos config show Show configuration
agentos config get <key> Get config value
agentos config set <k> <v> Set config value
agentos config unset <key> Remove config value
agentos config set-key <p> <k> Set API key
agentos config keys List API keys
agentos models list List available models
agentos models aliases List model aliases
agentos models providers List LLM providers
agentos models describe <model> Describe model details
agentos memory get <agent> <key> Get memory entry
agentos memory set <agent> <k> <v> Set memory entry
agentos memory delete <agent> <key> Delete memory entry
agentos memory list <agent> List agent memories
agentos security audit View audit log
agentos security verify Verify audit chain
agentos security scan <text> Scan for injection
agentos approvals list List pending approvals
agentos approvals approve <id> Approve action
agentos approvals reject <id> Reject action
agentos sessions list [agent] List sessions
agentos sessions delete <id> Delete session
agentos vault init Initialize vault
agentos vault set <k> <v> Store secret
agentos vault list List secrets
agentos vault remove <key> Remove secret
agentos cron list List cron jobs
agentos cron create <expr> <fn> Create cron job
agentos cron delete <id> Delete cron job
agentos cron enable <id> Enable cron job
agentos cron disable <id> Disable cron job
agentos replay get <session> Get session replay
agentos replay list [--agent] List replays
agentos replay summary <session> Replay summary
agentos migrate scan Scan for migrations
agentos migrate openclaw [--dry-run] Migrate from OpenClaw
agentos migrate langchain [--dry-run] Migrate from LangChain
agentos migrate report Migration report
agentos logs [--lines N] [--follow] View logs
agentos integrations [query] Browse integrations
agentos add <name> [--key K] Add integration
agentos remove <name> Remove integration
agentos mcp MCP server mode
agentos onboard [--quick] Interactive onboarding
agentos reset [--confirm] Factory reset
agentos completion <shell> Shell completions
agentos tui Launch terminal UI
agentos dashboard Open web dashboard
21 screens accessible via keyboard shortcuts:
1 Dashboard 2 Agents 3 Chat 4 Channels 5 Skills
6 Hands 7 Workflows 8 Sessions 9 Approvals 0 Logs
m Memory a Audit s Security p Peers e Extensions
t Triggers T Templates u Usage S Settings w Wizard
W Wf Builder
Tab/Shift-Tab to cycle · r to refresh · q to quit
Pre-built agents ready to spawn across 9 divisions: assistant, coder, researcher, debugger, architect, code-reviewer, doc-writer, test-engineer, devops-lead, ops, orchestrator, planner, analyst, data-scientist, customer-support, email-assistant, health-tracker, home-automation, legal-assistant, meeting-assistant, personal-finance, recruiter, sales-assistant, security-auditor, social-media, translator, travel-planner, tutor, writer, hello-world, ux-architect, brand-guardian, image-prompt-engineer, growth-hacker, content-creator, app-store-optimizer, evidence-collector, performance-benchmarker, reality-checker, trend-researcher, feedback-synthesizer, sprint-prioritizer, rapid-prototyper, mobile-builder, ai-engineer.
Autonomous background workers: researcher, collector, predictor, twitter, browser, clip, lead.
GitHub, GitLab, Slack, Discord, Jira, Linear, Notion, Google Drive, Gmail, Google Calendar, AWS, Azure, GCP, PostgreSQL, MongoDB, Redis, Elasticsearch, SQLite, Sentry, Dropbox, Brave Search, Exa Search, Bitbucket, Teams, Todoist.
Telegram, Discord, Slack, WhatsApp, Email, Teams, Google Chat, IRC, Matrix, Mattermost, Signal, Bluesky, Mastodon, Reddit, Twitch, XMPP, Zulip, Rocket.Chat, Feishu, LINE, Messenger, Viber, Revolt, Webex, DingTalk, Discourse, Nostr, Threema, Guilded, Keybase, Nextcloud, Flock, Pumble, Twist, Gitter, Gotify, ntfy, Mumble, LinkedIn, Webhook.
- Fail-Closed Defaults: All security gates deny by default when services are unavailable
- RBAC: Per-agent capability enforcement with tool-level granularity
- Mutual Auth (MAP): Agent-to-agent authentication with HMAC-SHA256 challenge-response
- Timing-Safe Comparison: Constant-time HMAC verification prevents timing attacks
- Audit Chain: Merkle-linked SHA-256 audit log with tamper detection
- Taint Tracking: Information flow control (Secret, PII, UntrustedAgent labels)
- Manifest Signing: Ed25519 signatures for agent/skill manifests
- Tool Policy: Configurable allow/deny/approve policies per tool
- Approval Tiers: Auto (read-only), Async (write), Sync (destructive) with exponential backoff
- Docker Sandbox: Container-isolated code execution
- WASM Sandbox: wasmtime-based untrusted code execution with fuel limits
- Prompt Injection: Regex-based injection pattern scanning
- Rate Limiting: GCRA token bucket per agent
- Loop Guard: Infinite loop detection with circuit breaker
- Vault: AES-256-GCM encrypted secrets with PBKDF2 key derivation and auto-lock
- SQL Injection Prevention: Identifier validation on all dynamic query fields
- Sensitive Data Zeroing: Auto-zeroing of decrypted secrets after configurable TTL
| Provider | Models |
|---|---|
| Anthropic | Claude Opus, Sonnet, Haiku |
| OpenAI | GPT-4o, GPT-4o-mini, o1, o3-mini |
| Gemini 2.0 Flash, Pro | |
| AWS Bedrock | Claude, Titan |
| DeepSeek | V3, R1 |
| Groq | Llama, Mixtral |
| Mistral | Large, Medium, Small |
| Together | Open-source models |
| Fireworks | Fast inference |
| Cohere | Command R+ |
| Perplexity | Sonar |
| xAI | Grok |
| Replicate | Open-source |
| Ollama | Local models |
| vLLM | Self-hosted |
| LM Studio | Local models |
| OpenRouter | Multi-provider routing |
| HuggingFace | Inference API |
| AI21 | Jamba |
| Cerebras | Fast inference |
| SambaNova | Enterprise |
| Qwen | Qwen models |
| Minimax | Minimax models |
| Zhipu | GLM models |
| Moonshot | Kimi |
Access 15,000+ skills from the SkillKit marketplace:
agentos skill search "code review"
agentos skill install pro-workflowBuilt-in bridge to agenstskills.com for skill discovery, installation, and AI-powered recommendations.
config.yaml configures the iii-engine with modules:
| Module | Port | Purpose |
|---|---|---|
| WebSocket | 49134 | Worker connections |
| REST API | 3111 | HTTP API |
| Streams | 3112 | WebSocket streams |
| State | — | File-based KV store |
| Queue | — | Built-in job queue |
| PubSub | — | Event pub/sub |
| Cron | — | Scheduled jobs |
| KV Server | — | Key-value store |
| Observability | — | OpenTelemetry metrics |
agentos/
├── Cargo.toml Rust workspace
├── package.json Node.js package
├── config.yaml iii-engine configuration
├── vitest.config.ts Test configuration
│
├── crates/ Rust crates (18 — hot path + control plane)
│ ├── agent-core/ ReAct agent loop
│ ├── api/ Rust HTTP API
│ ├── bridge/ External runtime adapters (6 runtimes)
│ ├── cli/ CLI (50+ commands)
│ ├── council/ Governance proposals + merkle audit chain
│ ├── directive/ Hierarchical goal alignment
│ ├── hand-runner/ Autonomous hands
│ ├── hierarchy/ Agent org structure (cycle-safe)
│ ├── ledger/ Budget enforcement (soft/hard limits)
│ ├── llm-router/ 25 LLM providers
│ ├── memory/ Session memory
│ ├── mission/ Task lifecycle + state machine
│ ├── pulse/ Scheduled agent invocation
│ ├── realm/ Multi-tenant isolation domains
│ ├── security/ RBAC, audit, taint, signing, sandbox
│ ├── tui/ 21-screen terminal dashboard
│ ├── wasm-sandbox/ WASM execution
│ └── workflow/ Workflow engine
│
├── src/ TypeScript workers (43)
│ ├── api.ts OpenAI-compatible API
│ ├── agent-core.ts TS agent loop
│ ├── tools.ts 22 built-in tools
│ ├── tools-extended.ts 38 extended tools
│ ├── evolve.ts Dynamic function evolution
│ ├── eval.ts Production eval harness
│ ├── feedback.ts Feedback loop
│ ├── swarm.ts Multi-agent swarms
│ ├── knowledge-graph.ts Entity-relation graph
│ ├── session-replay.ts Session recording
│ ├── tool-profiles.ts 8 tool filtering profiles
│ ├── skillkit-bridge.ts SkillKit marketplace bridge
│ ├── security-map.ts Mutual Authentication Protocol
│ ├── channels/ 40 channel adapters
│ ├── shared/ Shared utilities
│ ├── __tests__/ 1,489 TypeScript tests
│ └── ... 25 more workers
│
├── workers/ Python workers
│ └── embedding/ Text embeddings
│
├── agents/ 45 agent templates
├── hands/ 7 autonomous hands
├── integrations/ 25 MCP integrations
└── identity/ System identity files
2,556 tests across three languages:
npx vitest --run # 1,489 TypeScript tests (51 files)
cargo test --workspace # 906 Rust tests (10 crates)
python3 -m pytest # 161 Python testsEvery component is a Worker that registers Functions and binds them to Triggers:
// Rust worker
let iii = III::new("ws://localhost:49134");
iii.register_function_with_description(
"agent::chat",
"Process a message through the agent loop",
move |input: Value| { /* ... */ },
);
iii.register_trigger("queue", "agent::chat", json!({ "topic": "agent.inbox" }))?;// TypeScript worker (iii-sdk v0.8.0)
import { initSDK } from "./shared/config.js";
const { registerFunction, registerTrigger, trigger } = initSDK("api");
registerFunction(
{
id: 'api::chat_completions',
description: 'OpenAI-compatible chat completions',
metadata: { category: 'api' },
request_format: [
{ name: 'model', type: 'string', required: true },
{ name: 'messages', type: 'array', required: true },
],
},
async (req) => { /* ... */ }
)
registerTrigger({
type: 'http',
function_id: 'api::chat_completions',
config: { api_path: 'v1/chat/completions', http_method: 'POST' }
})# Python worker
iii = III("ws://localhost:49134", worker_name="embedding")
@iii.function(id="embedding::generate", description="Generate text embeddings")
async def generate_embedding(input):
# ...Functions call each other via trigger() regardless of language:
HTTP POST /v1/chat/completions
→ api::chat_completions (TypeScript)
→ agent::chat (Rust)
→ security::check_capability (Rust)
→ approval::classify (TypeScript)
→ memory::recall (Rust)
→ llm::route (Rust)
→ llm::complete (TypeScript)
→ tool::web_search (TypeScript)
→ loop_guard::check (TypeScript)
→ memory::store (Rust)
→ replay::record (TypeScript)
- iii-engine v0.8+ (iii-sdk v0.8.0 with built-in OTel, cron triggers, metadata schemas)
- Rust 1.75+
- Node.js 20+
- Python 3.11+ (optional, for embeddings)
Apache-2.0