Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentic AI Operating System (2026 Prototype)

A modular, autonomous Agentic AI system that plans, executes, critiques, remembers, and adapts, inspired by real-world agent architectures used in modern AI research and engineering teams.

This project is built entirely using free and open-source tools, with local LLM integration, and follows clean system-level design principles rather than chatbot-style scripting.


Overview

This system demonstrates how intelligent agents can be decomposed into clearly defined roles and coordinated through a deterministic control loop. The architecture emphasizes explainability, safety, and observability over black-box behavior.


Key Capabilities

  • Autonomous agent loop with explicit control flow
  • Clear separation of reasoning, execution, and evaluation
  • Safe tool execution with bounded retries
  • Persistent short-term and long-term memory
  • Explicit failure handling and recovery
  • Full observability via execution traces
  • Local LLM integration using Ollama
  • No paid APIs and no cloud dependency

System Architecture


USER GOAL
↓
Planner Agent  →  Executor Agent  →  Critic Agent
↑                                ↓
└──────────── Memory Layer ──────┘
↓
Agent Loop Controller

Each component has a single responsibility and is coordinated by a central controller.


Core Components

Planner Agent

  • Decomposes high-level goals into ordered, executable steps
  • Uses local LLM reasoning when available
  • Falls back to deterministic rule-based planning
  • Does not execute tools

Executor Agent

  • Executes one step at a time using whitelisted tools
  • Does not judge correctness
  • Produces structured execution results

Critic Agent

  • Evaluates execution outcomes
  • Decides whether to accept, retry, or abort a step
  • Supports optional LLM-based evaluation
  • Ensures correctness and safety

Tool Interface Layer

  • Python execution tool
  • Shell command tool
  • File read/write tool
  • Central tool registry enforces safety boundaries

Memory Layer

  • Short-term memory for current task context
  • Long-term JSON-based persistent memory
  • Full decision history preserved across runs

Agent Loop Controller

  • Orchestrates all agents
  • Enforces retry limits and stopping conditions
  • Handles failure classification
  • Ensures deterministic execution

Observability and Tracing

  • Human-readable execution traces
  • Complete reasoning, actions, and results captured
  • Suitable for debugging, demos, and interviews

Local LLM Integration

This project integrates local large language models using Ollama, enabling:

  • Offline inference
  • No usage cost
  • No external data transmission
  • Safe fallback to deterministic logic

Supported models include LLaMA 3, Mistral, Phi, and Gemma.

LLM usage is optional and does not affect system stability.


Technology Stack

  • Python 3.10 or higher
  • Pydantic for data validation
  • Rich for structured logging
  • Ollama for local LLM inference
  • JSON-based persistence
  • Modular, production-style architecture

All technologies used are free and open source.


Project Structure


agentic_ai_os/
├── agents/
│   ├── planner.py
│   ├── executor.py
│   └── critic.py
├── controller/
│   └── loop_controller.py
├── core/
│   ├── schemas.py
│   ├── execution.py
│   ├── failure.py
│   ├── trace.py
│   └── llm.py
├── tools/
│   ├── base.py
│   ├── python_tool.py
│   ├── shell_tool.py
│   └── file_tool.py
├── memory/
│   ├── short_term.py
│   ├── long_term.py
│   └── manager.py
├── demos/
│   ├── demo_research.py
│   ├── demo_coding.py
│   └── demo_planning.py
└── main.py


Running the Project

Install Dependencies

pip install -r requirements.txt

Optional: Enable Local LLM

ollama pull llama3
ollama serve

Run Main System

python -m agentic_ai_os.main

Demo Scenarios

Research and Reasoning

python -m agentic_ai_os.demos.demo_research

Demonstrates structured reasoning without execution.

Coding and Autonomous Execution

python -m agentic_ai_os.demos.demo_coding

Demonstrates full agent loop with planning, execution, critique, retries, and memory.

Domain-Independent Planning

python -m agentic_ai_os.demos.demo_planning

Demonstrates general-purpose planning for non-coding tasks.


Failure Handling

Failures are explicitly classified and handled:

  • No silent failures
  • Clear abort reasons
  • Bounded retries
  • Full execution traces preserved

Known Limitations

  • Rule-based execution logic by design
  • No dynamic replanning
  • No vector-based semantic memory

These choices prioritize explainability and reliability.


About

A modular, autonomous agentic AI system that plans, executes, critiques, and remembers tasks using a deterministic control loop with optional local LLM reasoning and full observability

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages