Expand description
NEAR AI Agentic Worker Framework
An LLM-powered autonomous agent that operates on the NEAR AI marketplace.
§Architecture
┌─────────────────────────────────────────────────────────────────────────────────┐
│ User Interaction Layer │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ CLI │ │ Slack │ │ Telegram │ │ HTTP │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ └─────────────┴────────────┬┴─────────────┘ │
└──────────────────────────────────┼──────────────────────────────────────────────┘
▼
┌──────────────────────────────────────────────────────────────────────────────────┐
│ Main Agent Loop │
│ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐ │
│ │ Message Router │──│ LLM Reasoning │──│ Action Executor│ │
│ └────────────────┘ └───────┬────────┘ └───────┬────────┘ │
│ ▲ │ │ │
│ │ ┌──────────┴───────────────────┴──────────┐ │
│ │ ▼ ▼ │
│ ┌──────┴─────────────┐ ┌───────────────────────┐ │
│ │ Safety Layer │ │ Self-Repair │ │
│ │ - Input sanitizer │ │ - Stuck job detection │ │
│ │ - Injection defense│ │ - Tool fixer │ │
│ └────────────────────┘ └───────────────────────┘ │
└──────────────────────────────────────────────────────────────────────────────────┘§Features
- Multi-channel interaction - CLI, Slack, Telegram, HTTP webhooks
- Parallel job execution - Run multiple jobs with isolated contexts
- Pluggable tools - MCP, 3rd party services, dynamic tools
- Self-repair - Detect and fix stuck jobs and broken tools
- Prompt injection defense - Sanitize all external data
- Continuous learning - Improve estimates from historical data
Re-exports§
Modules§
- agent
- Core agent logic.
- app
- Application builder for initializing core IronClaw components.
- boot_
screen - Boot screen displayed after all initialization completes.
- bootstrap
- Bootstrap helpers for IronClaw.
- channels
- Multi-channel input system.
- cli
- CLI command handling.
- config
- Configuration for IronClaw.
- context
- Per-job context isolation and state management.
- db
- Database abstraction layer.
- document_
extraction - Document text extraction pipeline.
- error
- Error types for IronClaw.
- estimation
- Cost, time, and value estimation with continuous learning.
- evaluation
- Success evaluation for completed jobs.
- extensions
- Lifecycle management for extensions: discovery, installation, authentication, and activation of channels, tools, and MCP servers.
- history
- History and persistence layer.
- hooks
- Lifecycle hooks for intercepting and transforming agent operations.
- llm
- LLM integration for the agent.
- observability
- Observability subsystem: trait-based event and metric recording.
- orchestrator
- Orchestrator for managing sandboxed worker containers.
- pairing
- DM pairing for channels.
- prelude
- Re-export commonly used types.
- profile
- Psychographic profile types for user onboarding.
- registry
- Extension registry: metadata catalog for tools and channels.
- safety
- Safety layer for prompt injection defense.
- sandbox
- Docker execution sandbox for secure command execution.
- secrets
- Secrets management for secure credential storage and injection.
- service
- OS service management for running IronClaw as a daemon.
- settings
- User settings persistence.
- setup
- Interactive setup wizard for IronClaw.
- skills
- OpenClaw SKILL.md-based skills system for IronClaw.
- tenant
- Compile-time tenant isolation.
- timezone
- Timezone resolution and utilities.
- tools
- Extensible tool system.
- tracing_
fmt - Truncating terminal writer for tracing.
- tunnel
- Tunnel abstraction for exposing the agent to the internet.
- util
- Shared utility functions used across the codebase.
- webhooks
- Generic webhook ingress for tools.
- worker
- Worker mode for running inside Docker containers.
- workspace
- Workspace and memory system (OpenClaw-inspired).