Kernel API Reference

This section provides a list of API routes in the AIOS Kernel. These routes are used to set up and manage core components like LLM, Memory, Storage, Tools, and Scheduler.

1. LLM Setup

Route: /core/llm/setup Description: Set up the LLM core component.

Example:

curl -X POST http://localhost:8000/core/llm/setup \
-H "Content-Type: application/json" \
-d '{
  "llm_name": "gpt-4o-mini",
  "llm_backend": "openai",
  "max_new_tokens": 2048
}'

2. Storage Setup

Route: /core/storage/setup Description: Initialize the storage manager.

Example:

curl -X POST http://localhost:8000/core/storage/setup \
-H "Content-Type: application/json" \
-d '{
  "root_dir": "data",
  "use_vector_db": true
}'

3. Memory Setup

Route: /core/memory/setup Description: Set up the memory manager. Requires the storage manager to be initialized first.

Example:

curl -X POST http://localhost:8000/core/memory/setup \
-H "Content-Type: application/json" \
-d '{
  "memory_limit": 104857600,
  "eviction_k": 10
}'

4. Tool Setup

Route: /core/tool/setup Description: Set up the tool manager. Example:

curl -X POST http://localhost:8000/core/tool/setup \
-H "Content-Type: application/json" \
-d '{}'

5. Scheduler Setup

Route: /core/scheduler/setup Description: Set up the FIFO scheduler for managing tasks. Example:

curl -X POST http://localhost:8000/core/scheduler/setup \
-H "Content-Type: application/json" \
-d '{
  "log_mode": "INFO",
  "max_workers": 64
}'

6. Get Component Status

Route: /core/status Description: Check the status of all components (active or inactive). Example:

curl -X GET http://localhost:8000/core/status

7. Agent Factory Setup

Route: /core/factory/setup Description: Set up the agent factory for managing agent execution. Example:

curl -X POST http://localhost:8000/core/factory/setup \
-H "Content-Type: application/json" \
-d '{
  "log_mode": "INFO",
  "max_workers": 64
}'

8. Submit Agent

Route: /agents/submit Description: Submit an agent for execution using the agent factory. Example:

curl -X POST http://localhost:8000/agents/submit \
-H "Content-Type: application/json" \
-d '{
  "agent_id": "example_agent",
  "agent_config": {
    "task": "Tell me about AIOS"
  }
}'

9. Check Agent Status

Route: /agents/{execution_id}/status Description: Check the status of a submitted agent. Example:

curl -X GET http://localhost:8000/agents/12345/status

10. Core Cleanup

Route: /core/cleanup Description: Clean up all active components. Example:

curl -X POST http://localhost:8000/core/cleanup

Last updated