Integration Patterns

Basic Orchestration
from ainzos.kernel import AinzOSKernel, Task from ainzos.agent import Agent kernel = AinzOSKernel() # Register agents agent = Agent(name="worker", capacity=5, capabilities=["process"]) kernel.register_agent("worker_1", agent) # Queue and execute kernel.enqueue_task(Task(id="t1", required_capability="process")) while kernel.scheduler.pending_count() > 0: kernel.tick()

Active Experiments

Load Balancing Experiment

Active

Test how Ainz-OS distributes work across agents with varying capacities.

Failure Cascade Test

Planned

Simulate agent failures and measure recovery time.

Priority Inversion Analysis

Completed

Analyze edge cases where priority scheduling might cause starvation.

Memory Profiling

Active

Track memory usage per agent under sustained load.

Run Tests

terminal
$ pytest tests/ -v

tests/test_agent.py::test_agent_creation PASSED
tests/test_agent.py::test_state_transitions PASSED
tests/test_scheduler.py::test_priority_ordering PASSED
tests/test_scheduler.py::test_capability_matching PASSED
tests/test_kernel.py::test_task_execution PASSED
tests/test_kernel.py::test_full_orchestration PASSED
tests/test_monitor.py::test_health_check PASSED

======================== 26 passed in 0.42s ========================