Skip to main content

AI-native application framework where AI builds software and a DI runtime executes it

Project description

AIPod

AI-native application framework where AI builds software and a dependency-injected runtime executes it.

Describe your system in natural language. AI generates reusable components, plans execution pipelines, and the runtime assembles and executes them via dependency injection.

Quick Start

# 1. Install
pip install aipodcli

# 2. Configure once (global, shared across all projects)
aipod config set OPENAI_API_KEY sk-your-key
aipod config set OPENAI_BASE_URL https://api.openai.com/v1
aipod config set OPENAI_MODEL deepseek-chat

# 3. Create a project
mkdir my-app && cd my-app
aipod init
aipod pod "a CLI todo app with SQLite storage, add/list/complete/delete"

# 4. Run it
python main.py add "Buy groceries"
python main.py list

That's it. Zero code written by you.

What Just Happened

aipod init
  → modules/, pipelines/, config.toml, routes.toml, beans_config.json

aipod pod "a CLI todo app..."
  → AI decomposes requirement into components
  → AI generates 4 components (TodoStore, AddTodo, ListTodo, CompleteTodo)
  → AI composes 3 pipelines (add, list, complete)
  → AI generates entry point (main.py with argparse)
  → Registers everything in routes.toml and beans_config.json

The Growing System

Every component you create makes the system smarter:

Round 1:  aipod create --name SqliteStore --desc "SQLite storage"
          → Bean Pool: [ConfigStore, DbClient, SmsSender, SqliteStore]

Round 2:  aipod create --name DataCollector --desc "generates sales data"
          → Bean Pool: [..., DataCollector]

Round 3:  aipod create --name DataWriter --desc "depends on SqliteStore, writes to DB"
          → AI sees SqliteStore in the pool, auto-wires it as dependency

Compose:  aipod compose "collect sales and write to SQLite"
          → AI picks [DataCollector, DataWriter] from the pool
          → Generates pipeline: (S(DataCollector) | S(DataWriter)).execute_all(ctx)

The bean pool grows with every create. AI sees more components, builds richer pipelines. This is not a one-shot code generator — it's a system that accumulates capability.

Commands

Command What it does Needs AI
aipod init Create project skeleton
aipod config set KEY VALUE Set global config (once, shared everywhere)
aipod config list Show global config
aipod entry "desc" AI generates entry point file
aipod create --name X --desc "..." AI generates one component
aipod add --name X --class-path Y Register hand-written component
aipod compose "instruction" AI generates pipeline
aipod pod "requirement" AI generates components + pipelines + entry
aipod pod --file req.md Same, reads from file

Two Ways to Build

Fast: pod (one-shot)

aipod init
aipod pod "e-commerce order system with inventory, payment, and notifications"
python main.py

AI generates everything: components, pipelines, entry point, config.

Step-by-step: createcompose

aipod init

# Build component pool incrementally
aipod create --category entity --name SqliteStore \
    --desc "SQLite storage, reads database.sqlite_path from ConfigStore"

aipod create --category entry --name DataCollector \
    --desc "generates random sales records"

aipod create --category entry --name DataWriter \
    --desc "depends on SqliteStore, writes records to database"

# Compose pipelines from the pool
aipod compose "collect sales data and write to SQLite" --name sales_flow

# Generate entry point
aipod entry "a CLI data processing tool"

# Run
python main.py sales_flow

How It Works

The Bean Pool

Every component is registered in beans_config.json:

{
  "id": "DataWriter",
  "class_path": "modules.datawriter.DataWriter",
  "dependencies": ["SqliteStore"],
  "inputs": {"raw_sales": "list — sales records"},
  "outputs": {"written_count": "int — rows written"}
}

AI reads the pool when generating new components and composing pipelines. The pool is the memory of your system.

Components

AI generates classes with constructor injection:

class DataWriter:
    @inject
    def __init__(self, sqlite_store: SqliteStore, config_store: ConfigStore):
        self.sqlite_store = sqlite_store           # Auto-injected by runtime
        self.batch_size = config_store.get("writer.batch_size", 100)

    def execute(self, ctx: PipelineContext) -> dict:
        records = ctx.get("raw_sales", [])
        for r in records:
            self.sqlite_store.insert("sales", r)
        ctx.set("written_count", len(records))
        return {"status": "success"}
  • entry — business logic, has execute(ctx) method
  • entity — infrastructure (DB, cache, HTTP client), has custom methods

Pipelines

AI generates pipeline files using pipe syntax:

def run(ctx: PipelineContext):
    S = Pod(build_container(load_config()))

    # Chain: DataCollector → DataCleaner → DataWriter
    (S(DataCollector) | S(DataCleaner) | S(DataWriter)).execute_all(ctx)

    # Branching
    if ctx.get("alert_needed"):
        (S(Notifier)).execute_all(ctx)

    return ctx.summary()

Global Configuration

Set once, use everywhere:

aipod config set OPENAI_API_KEY sk-xxx       # stored in ~/.aipod/config.toml
aipod config set OPENAI_BASE_URL https://...

Components read project config through injected ConfigStore:

# config.toml (per-project)
[database]
sqlite_path = "data.db"    # AI suggested this when creating SqliteStore
config_store.get("database.sqlite_path", "data.db")

Generation → Execution

┌──────────────────────────┐
│   You + AI (build time)  │
│                          │
│  aipod init              │  → project skeleton
│  aipod config set ...    │  → global config
│  aipod pod "big req"     │  → components + pipelines + entry
│  aipod create ...        │  → single component (pool grows)
│  aipod compose "..."     │  → pipeline + route
│  aipod entry "desc"      │  → entry point file
│                          │
│  You review the code     │
│  You git commit          │
└──────────────────────────┘
            ↓
┌──────────────────────────┐
│   Runtime (run time)     │
│                          │
│  python main.py cmd      │
│  PipelineRunner loads    │
│  DI container assembles  │
│  Pipeline executes       │
│  Context flows data      │
└──────────────────────────┘

AI never runs your code. It generates it. You review, commit, and execute when ready.

Key APIs

API Methods
PipelineContext ctx.params, ctx.set(k,v), ctx.get(k,d), ctx.summary()
ConfigStore get("section.key", default), get_section("name"), sections()
Pod S = Pod(container), S(Class), (S(A) | S(B)).execute_all(ctx)
PipelineRunner PipelineRunner(), route_names(), run("name", params)

Project Structure

project/
├── main.py                  ← AI-generated entry point
├── config.toml              ← Project config (you + AI)
├── routes.toml              ← Pipeline routes (compose/pod auto-registers)
├── beans_config.json        ← Component pool (AI maintains)
├── modules/                 ← Your component pool
│   ├── sqlitestore.py
│   ├── datacollector.py
│   └── datawriter.py
└── pipelines/               ← AI-composed pipelines
    └── sales_flow.py

Security

AST validation on all AI-generated code:

  • Blocks: eval(), exec(), compile(), __import__(), dunder chain access
  • Does NOT restrict imports — this runs locally, you own the code

Install

pip install aipodcli

Roadmap

  • Component contract validation (typed inputs/outputs)
  • Pipeline static type checking
  • Component versioning
  • Visual pipeline graph
  • Incremental generation (AI reuses existing components)
  • Multi-language component support

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aipodcli-0.4.0.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aipodcli-0.4.0-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file aipodcli-0.4.0.tar.gz.

File metadata

  • Download URL: aipodcli-0.4.0.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for aipodcli-0.4.0.tar.gz
Algorithm Hash digest
SHA256 40e9f34c9047571456d65b10f84a9db1694adc8ecd7e3af7a9aa68decd9a2482
MD5 96ea256a485bf2d6974eb1eadfb19d44
BLAKE2b-256 8a9c88d827d72f17b85a9bf36ee566ce2ed8cad75a0c8086ca14d26277b80eaa

See more details on using hashes here.

File details

Details for the file aipodcli-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: aipodcli-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 37.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for aipodcli-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36097d92243a08897c2433cb86911b358d3b3d84082e883cefac2c1039e0e9b1
MD5 8491d16a8547198f0fea26b67c402c8f
BLAKE2b-256 211d2780033ecd2854192f91adb7abbaaf797dd1f913fe9302afcae472cdec87

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page