IAF AI-Piloted Edition
A multi-agent framework purpose-built for AI agents to read, modify, deploy, and monitor autonomously — through file system operations alone.
Executive Summary
Intelligenism Agent Framework (IAF) AI-Piloted Edition is a multi-agent orchestration framework purpose-built for one radical capability: to be fully understood, modified, and managed by external AI systems. While other agent frameworks are designed for human developers to write code, IAF is designed so that AI agents can operate it through file system manipulation alone.
This edition builds on the original IAF architecture, adding a comprehensive self-description layer, validation toolchain, structured logging, and operational safety mechanisms. The result is a framework that any flagship LLM with file read/write and shell access can take over, configure, and run autonomously.
Core Positioning
| Dimension | Traditional Frameworks | IAF AI-Piloted Edition |
|---|---|---|
| Control Interface | Python API / Code | File System (JSON, Markdown, Python files) |
| Agent Creation | Write class definitions | Copy directory + edit config files |
| Behavior Change | Modify Python code | Edit Markdown and JSON files |
| Orchestration | Code graph/DAG definitions | Declarative JSON (tubes.json) |
| Validation | Unit tests / type checking | CLI script: python3 validate.py |
| Hot Reload | Restart required | All config changes auto-detected |
| Rollback | Git revert code changes | Git revert file changes (identical) |
| AI Comprehension | Must understand Python AST | Must understand file conventions |
Architecture Overview
IAF is organized into four independent layers. Each layer communicates through the file system and HTTP APIs, with no direct code coupling between layers.
| Layer | Responsibility | Control Surface |
|---|---|---|
| Agent | Independent intelligent units, each with its own engine, tools, identity, and skills | agents/{id}/ directory: SOUL.md, agent_config.json, tools/*.py |
| Dispatch | Multi-agent collaboration orchestration with pluggable strategies | dispatch/{strategy}/ directory: dispatch_config.json, rules/*.md |
| Tube | Signal topology engine for automated scheduling and chaining | tube/tubes.json (single declarative file, hot-reloaded) |
| UI | Self-contained HTML pages with auto-discovery | pages/*.html (drop file to create page) |
Design Principles
- Possibility Management — Each agent owns a complete copy of its engine code. Changes to one agent never affect another. This eliminates cascading failures and enables per-agent experimentation.
- Additive Complexity — Adding a new agent is adding a directory. Adding a new tool is dropping a file. Adding a new automation pipeline is editing a JSON array. None of these operations require modifying existing code.
- File System as Control Plane — Every configuration, identity definition, tool registration, and automation pipeline is expressed as a file. An AI with Read/Write/Edit/Bash capabilities can manage the entire system without calling any internal API.
- Process Isolation — Each agent runs in its own subprocess context. Tube steps execute in isolated subprocesses. A crash in one agent or step cannot bring down the system.
- Convention Over Configuration — Tools are discovered by scanning *_tools.py files. Pages by scanning *.html files. Agents by scanning directories. No registration code needed.
AI Operability Layer
The AI Operability Layer is the defining addition of this edition. It is a set of self-description files, validation tools, and operational safety mechanisms that enable external LLMs to fully manage IAF. This layer adds no runtime overhead to the framework. It exists purely as an interface between the external AI operator and the IAF file system.
System Map (MANIFEST.json)
A machine-readable snapshot of the entire system state, auto-generated by generate_manifest.py and refreshed on server startup. An external LLM reads this single file to understand what agents, tubes, dispatches, and tools exist.
The manifest includes: all agent IDs with their config paths, model assignments, tool lists, and log file locations; all dispatch strategies with participating agents; all tubes with their trigger types and step chains; and framework conventions for file naming patterns.
Operation Playbook (PLAYBOOK.md)
A comprehensive text manual that maps every management intent to a concrete sequence of file operations. An external LLM reads this file to learn how to create agents, add tools, configure automation pipelines, modify behavior, and handle errors.
The playbook covers: agent lifecycle (create, configure, add tools, modify behavior), tube management (create, trigger, monitor), dispatch strategy creation, engine modification procedures with diff-based synchronization, and safety protocols.
Validation Script (validate.py)
| Command | Validates | Checks |
|---|---|---|
| python3 validate.py agent {id} | Single agent | Config JSON syntax, required fields, provider existence, SOUL.md presence, tool file loadability |
| python3 validate.py tool {path} | Single tool file | File naming, importability, TOOLS dict presence, handler callable, schema completeness |
| python3 validate.py tube | tubes.json | JSON syntax, tube IDs, step references to existing agents/dispatches, trigger module existence |
| python3 validate.py all | Entire system | All agents, all tools, all tubes in one pass |
Structured Logging (call_log.jsonl)
Each agent writes a structured JSONL log of every invocation. The external LLM reads these logs to understand what happened during agent execution, diagnose failures, and verify that automated pipelines are working correctly.
| Event | Key Fields | Purpose |
|---|---|---|
| call_started | model, mode, message_preview | Agent invocation begins |
| llm_call | loop, tokens_est, duration_ms | One LLM API round-trip |
| tool_call | tool_name, args_summary, result_length, is_error | One tool execution |
| call_completed | loops_used, reply_length, total_duration_ms | Agent returns result |
| call_failed | error | Agent invocation failed |
Tool Contract (TOOL_CONTRACT.md)
A specification document that defines the exact format for writing new tool files. When an external LLM needs to give an agent a new capability, it reads this contract to produce a correctly structured *_tools.py file that will be automatically discovered and loaded.
Safety Mechanisms
- Git Snapshot Script (auto_commit.sh) — Creates a Git commit before any batch modification. The external LLM runs
bash auto_commit.shbefore making changes, enabling instant rollback viagit revertif anything goes wrong. - Hot Reload — All configuration files are hot-reloaded. agent_config.json, SOUL.md, context files, tools, tubes.json, dispatch configs, and rules files are re-read on every invocation or polling cycle. Zero restart needed.
- Dangerous Operation List — The playbook explicitly marks high-risk operations (deleting agent directories, modifying engine code, changing provider keys) and mandates Git snapshots before any such operation.
Agent Layer
Each agent is an independent directory under agents/ containing its complete runtime: engine code, identity, tools, skills, context strategy, and logs. Creating a new agent is a directory copy operation: cp -r template/ agents/new_agent/.
Agent Directory Structure
| File | Category | Purpose |
|---|---|---|
| agent_config.json | Adjustable | Model, provider, context files, skills, trim strategy |
| SOUL.md | Adjustable | Agent identity, personality, behavioral guidelines |
| tools/*_tools.py | Adjustable | Available tools (auto-discovered, hot-reloaded) |
| skills/*.md | Adjustable | Conditional task instructions (trigger-matched) |
| context/sliding_window.py | Adjustable | Context trimming strategy |
| core/direct_llm.py | Semi-infrastructure | Engine core: message assembly, LLM call loop, logging |
| core/tool_executor.py | Semi-infrastructure | Tool registry with auto-discovery and hot reload |
| history.jsonl | Runtime | Chat conversation history |
| call_log.jsonl | Runtime | Structured execution log |
Five-Layer Message Assembly
| Layer | Source | Behavior |
|---|---|---|
| 1. System Prompt | context_files in agent_config.json | All listed files concatenated as system message. Always loaded. |
| 2. Skill Injection | skills array in agent_config.json | Keyword-matched .md files injected. Loaded on trigger hit. |
| 3. History | history.jsonl | Recent conversation turns. Chat mode only, skipped in batch mode. |
| 4. Current Input | User message or tube payload | The actual request being processed. |
| 5. Context Trimming | context/sliding_window.py | Ensures total tokens stay within max_context budget. |
Tool Auto-Discovery and Hot Reload
The tool executor scans the agent's tools/ directory for files matching *_tools.py and imports their TOOLS dictionaries. On each agent invocation, the executor checks the directory modification time. If any file has been added, removed, or modified since the last scan, tools are re-discovered automatically. An external LLM can write a new tool file and it takes effect on the very next agent call, with zero restart required.
Three Capability Tiers
| Tier | Carrier | Loading | Use Case |
|---|---|---|---|
| Identity & Knowledge | .md files via context_files | Every call | Permanent information the agent always knows |
| Conditional Instructions | .md files via skills triggers | On keyword match | Scenario-specific task instructions |
| Execution Capability | *_tools.py files | Every call (hot-reloaded) | Actions the agent can perform |
Dispatch Layer
The Dispatch layer orchestrates multi-agent collaboration. Each collaboration strategy is a self-contained directory that can be independently developed and deployed. The layer does not call the agent engine directly. Instead, it treats agent directories as data sources and calls the LLM API through its own context assembly pipeline.
Key Design: In dispatch mode, an agent is not an autonomous entity making decisions. It is an engine driven by the dispatch orchestrator. The dispatch decides what the agent knows (via context_files), what role it plays (via rules/*.md), and when it speaks (via turn_order). The same agent can behave differently in different collaboration strategies without any modification to the agent itself.
Strategy Structure
| Component | File | Purpose |
|---|---|---|
| Orchestration Logic | dispatch.py | Round control, agent sequencing, termination conditions |
| Configuration | dispatch_config.json | Participating agents, turn order, rounds, context sources |
| Role Definitions | rules/*.md | Per-agent role instructions for this strategy |
| Infrastructure | dispatch_base.py, session_manager.py, context_injector.py | Tool loop, LLM parsing, session CRUD, context assembly (do not modify) |
Tube Layer (Signal Topology)
The Tube layer is the automation and scheduling dimension of IAF. It connects agents, dispatches, and other tubes through declarative signal pathways defined in a single file: tube/tubes.json. The tube runner polls this file every 15 seconds, checks trigger conditions, and executes step chains in isolated subprocesses.
Enhanced Execution (New in This Edition)
- Step-Level Retry — Each step can define a retry policy with maximum attempts and delay between retries. Failed steps are retried according to their configuration before being marked as failed. All retry attempts are logged.
- Failure Strategy — Each step can define an on_fail policy:
stop(default, halt the tube) orcontinue(skip failed step, proceed to next). This enables resilient pipelines where non-critical steps can fail without blocking the entire workflow. - Inter-Step Data Passing — Step outputs are captured in
tube/staging/{tube_id}_{timestamp}/as text files. Subsequent steps can reference the previous step's output via the$PREV_OUTPUTplaceholder in their payload.
Trigger and Target Extensibility
| Extension Point | Interface | Location | Discovery |
|---|---|---|---|
| Trigger Source | check(config, state) → bool | tube/triggers/{type}.py | Auto-discovered by type name in tubes.json |
| Execution Target | build_command(step, project_root) → list | tube/targets/{type}.py | Auto-discovered by type name in tubes.json |
External LLM Takeover Model
The defining feature of the AI-Piloted Edition is that the entire framework can be managed by an external LLM agent (Claude Code, GPT Agent, or any agent with file and shell access) without touching any internal API or using any IAF-internal tool.
The External Operator's Toolkit
| LLM Tool | IAF Operation |
|---|---|
| Read | Read MANIFEST.json, agent configs, SOUL.md, tubes.json, logs |
| Write | Create new agent directories, write tool files, write config files |
| Edit | Modify existing configs, SOUL.md, tubes.json |
| Bash | cp -r template/, python3 validate.py, bash auto_commit.sh, git operations, curl API triggers |
Onboarding Sequence
An external LLM takes over an IAF instance in three reads:
| Step | File | Knowledge Gained |
|---|---|---|
| 1 | MANIFEST.json | What agents, tubes, dispatches exist; their configs and file paths |
| 2 | PLAYBOOK.md | How to perform every management operation step by step |
| 3 | Architecture Map | How the system works internally; what to touch and what not to touch |
Operation Loop
The external LLM follows a consistent loop for every management task: snapshot (auto_commit.sh) → operate (Read/Write/Edit/Bash) → validate (validate.py all) → commit (auto_commit.sh). If validation fails, the LLM reads the error output, fixes the issue, and re-validates. If the fix introduces new problems, git revert provides instant rollback.
Why File System, Not API
Traditional frameworks expose control through Python APIs, requiring the controlling LLM to generate syntactically correct code, manage imports, handle type systems, and reason about runtime state. IAF eliminates all of these failure modes by expressing control as file operations.
Editing a JSON field has a near-zero chance of causing a syntax error compared to modifying a Python class definition. Dropping a file in a directory is an atomic operation that either succeeds completely or fails obviously. And every change is automatically versioned through Git, providing a complete audit trail and rollback capability.
Competitive Landscape
| Framework | Control Surface | Agent Creation | Config Change | AI Controllability |
|---|---|---|---|---|
| IAF AI Edition | File system | Copy directory | Edit JSON/MD | Native: designed for AI control |
| CrewAI | Python API + YAML | Write Python class | Edit YAML + code | Partial: YAML editable, orchestration in code |
| LangGraph | Python API | Define graph nodes | Modify Python | Low: graph definition requires code changes |
| AutoGen | Python API + YAML | Configure in code | Edit YAML + code | Partial: YAML config, but maintenance mode |
| OpenAI Agents SDK | Python API | Write Python | Modify Python | Low: all configuration in code |
The fundamental architectural difference is that IAF treats the file system as its primary control interface, while all other frameworks treat Python code as their primary control interface. This is not a feature that can be added to existing frameworks through a plugin or wrapper. It is a foundational design decision that shapes the entire architecture.
Potential Applications
AI-Managed Website Operations
An external LLM creates specialized agents (content monitor, SEO analyzer, uptime checker, report generator), wires them into scheduled tubes, and uses dispatch for multi-agent analysis of complex issues. The entire setup is created and maintained through file operations.
Autonomous Research Pipelines
A tube-driven pipeline where Agent A collects data, Agent B analyzes it, and a roundtable dispatch synthesizes conclusions. The external LLM monitors logs, adjusts agent prompts based on output quality, and adds new pipeline stages as research evolves.
Self-Evolving Agent Teams
The external LLM reviews agent performance through call_log.jsonl, identifies underperforming agents, modifies their SOUL.md or tool configurations, validates changes, and monitors improvement. Over time, the agent team evolves its capabilities without human intervention in the optimization loop.
Multi-Model Orchestration
Different agents can use different LLM providers and models. The external LLM can assign cost-effective models to simple monitoring tasks and premium models to complex analysis, optimizing the cost-capability tradeoff across the entire system through agent_config.json edits.
Technical Specifications
| Component | Technology |
|---|---|
| Language | Python 3 |
| Web Framework | Flask |
| LLM Integration | OpenRouter API (Gemini, Claude, GPT, Qwen, others) |
| Frontend | Vanilla HTML/JS/CSS (no build tools) |
| Data Storage | JSON (config) + JSONL (logs, history, sessions) |
| Scheduling | croniter |
| Dependencies | flask, requests, croniter (3 packages total) |
| Core Codebase | ~3,300 lines (after AI Operability additions) |
| AI Operability Code | ~300 lines (validate.py, generate_manifest.py, logging, hot reload) |
| License | Apache 2.0 |
File Inventory Summary
| Category | Count | Description |
|---|---|---|
| Python source files | ~55 | Engine, tools, infrastructure, utilities |
| Configuration files | ~8 | JSON configs across all layers |
| Markdown files | ~10+ | Documentation, agent identities, role definitions |
| HTML files | ~5 | Portal, chat, dashboard, dispatch UI, custom pages |
| AI Operability files | 5 | MANIFEST.json, PLAYBOOK.md, validate.py, generate_manifest.py, auto_commit.sh |
Links
- GitHub (AI Edition) — Intelligenism-Agent-Framework-AI-Operability-Edition
- GitHub (Standard Edition) — intelligenism-agent-framework
- IAF Architecture Docs — Standard Edition Architecture Overview
- Website — intelligenism.club
- Theory — intelligenism.org