Skip to main content

AIONS: Actions and Interface Object Notation

AIONS (pronounced IONS) is an open-standard, text-based data format engineered specifically for Large Language Model (LLM) agent architectures. By decoupling tool definitions from application logic, AIONS provides a portable, JSON-like notation while retaining the full execution capabilities of native Python.

Cannot replace humans

The AIONS by structure is a part of Language Models and helps in LLM to simulate the AI. It is very easy to consider that as an AI equivalent (also considered by many as a real AI), but it is not and shall not be used as a human replacement. It will be disastrous.

Installation

pip install aions-llm

Architecture and Rationale

Traditional AI tool registration often pollutes backend Python code with extensive prompt strings, interface definitions, and repetitive boilerplate. AIONS modernizes this workflow through the following architectural principles:

  • Logic Decoupling: Isolates LLM prompts (descriptions) and tool mappings into external .aion configuration files.
  • Dynamic Evaluation: Safely parses and binds native Python lambdas and complex conditional logic directly from the notation into memory.
  • Strict Validation: Enforces a rigid property schema during the parsing phase to prevent runtime failures, "ghost tools," or broken agent execution.
  • Zero-Map Architecture: Eliminates the need to maintain manual dictionaries in the application layer. If a tool is defined in the .aion file, the framework autonomously mounts it to your Agent.

Specification and Constraints

To maintain standard integrity, every .aion file must adhere strictly to the following validation rules:

1. The Array Constraint

An AIONS definition must always manifest as a root-level array, enclosed in square brackets [ ]. Single-tool definitions must still reside within this array.

2. The Assignment Operator

Properties are assigned exclusively using the "Action-Link" operator: -->.

  • Valid: name --> "AuthModule"
  • Invalid: name: "AuthModule" or name = "AuthModule"

3. Strict Property Isolation

AIONS enforces a strict, closed-property ecosystem. If the parser encounters a top-level key not present in the Approved Registry, it will raise an AIONPropertyError.

  • Approved Registry: name, function, description, args_schema, link.

Every valid AION element must possess at least one executable or referential parameter. An element must declare a function, a link (to feed public documentation to the AI), or both. If neither property is present, the parser will fail.

5. The Interface Block

When utilizing the function property, the value must be a raw string representing the executable (e.g., a lambda or function name), immediately followed by an Interface Block { } that maps the inputs and outputs.

  • Inputs must follow the sequential arg-N pattern.
  • Outputs must follow the sequential return-N pattern.

Syntax Variations

The following examples demonstrate the flexibility of the Function/Link Dependency Rule. An element can act as a direct execution tool, a documentation reference, or a hybrid of both.

Variation A: Function-Only Execution

Used when the agent needs to directly execute backend logic without requiring external documentation.

[
  {
    name --> "SendOutput",
    function --> "lambda user: send_output(user)" --> {
        arg-1 --> "string (user identifier)",
        return-1 --> "dict (execution status)"
    },
    args_schema --> {
        email --> "str | Email for new admin user",
        password --> "str | Password for new admin user",
        firstName --> "str | First name of admin user",
        phone --> "str | default='' | Phone number (optional)",
        gender --> "str | Gender (MALE/FEMALE)",
        birthday --> "str | Birthday in ISO format"
   }},
    description --> "Executes the output transmission to the specified user."
  }
]

Used when the agent needs access to external API documentation or a web resource, but no direct backend Python execution is required. Note: The framework automatically binds a fallback function that returns this URL to the LLM.

[
  {
    name --> "FetchAbcDocs",
    link --> "[https://api.Abc.com/docs](https://api.Abc.com/docs)",
    description --> "Retrieves the public documentation for the Abc API to understand endpoint structures."
  }
]

Variation C: Hybrid Execution & Reference

Used for complex tools where the agent can execute the function, but is also provided a link to the relevant documentation to understand the broader context of the action.

[
  {
    name --> "AdminSignup",
    function --> "lambda params: admin_signup(*params.split('|'))" --> {
        arg-1 --> "string (pipe-separated user data)",
        return-1 --> "dict (new user profile)"
    },
    link --> "[https://api.Abc.com/docs/admin_signup](https://api.Abc.com/docs/admin_signup)",
    description --> "Creates a new admin account. Refer to the provided documentation link for strict password policies."
  }
]

Implementation Guide

To ensure clean modularity, isolate your notation files in a dedicated directory.

project_root/
├── aion_tools/         # Directory for AIONS notation files
│   ├── auth.aion
│   └── users.aion
├── schemas.py          # Pydantic validation models
├── api_functions.py    # Core application logic
└── agent_factory.py    # LangChain entry point

2. LangChain Integration

AIONS is engineered to natively compile into LangChain Tool objects. By passing globals() into the execution context, the parser autonomously binds the strings in your .aion files to the functions and schemas residing in your application's memory.

from aions import AIONS
import api_functions
from schemas import SendOutputSchema

# Initialize the AIONS parser with the local execution context
tool_registry = AIONS.get_langchain_tools(
    source_path="aion_tools/", 
    context=globals()
)

# The resulting list can be injected directly into a LangChain Agent
# agent = initialize_agent(tools=tool_registry, llm=model, ...)

Exception Reference

The AIONS parser is designed to fail fast. Strict validation ensures the LLM is never provided with malformed tool schemas.

Exception Class Trigger Condition
AIONPropertyError Raised when an unauthorized key is declared (e.g., using desc instead of the approved description property).
AIONParseError Raised upon detecting syntax violations, missing array brackets, failure to meet the Function/Link Dependency Rule, or if a declared function/schema does not exist in the provided execution context.

API Reference

The AIONS class exposes several static methods to accommodate various system architectures:

  • AIONS.get_langchain_tools(source_path, context): High-level factory method that parses files and compiles them directly into LangChain Tool instances.
  • AIONS.load_dir(dirpath, context): Scans a target directory and compiles all contained .aion files into a unified Python dictionary list.
  • AIONS.loads(aion_text, context): Parses a raw AIONS string directly from memory, bypassing the file system.
  • AIONS.dumps(tools_list): Serializes an existing list of Python tool dictionaries back into the standard AIONS text format.
  • AIONS.get_system_prompt(source_path): Scans a file or directory for the singular system_prompt declaration and returns it as a string.
  • AIONS.get_wrapped_query(source_path): Scans a file or directory for the singular wrapped_query declaration and returns it as a string mainly used for response from agent customizations.
  • AIONS.get_rules(source_path): Scans a file or directory for the rules that is added to the system prompt and added as an instruction to the model.

Developed by Sourav Modak

Download files

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

Source Distribution

aions_llm-1.0.16.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

aions_llm-1.0.16-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file aions_llm-1.0.16.tar.gz.

File metadata

  • Download URL: aions_llm-1.0.16.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for aions_llm-1.0.16.tar.gz
Algorithm Hash digest
SHA256 eb9a78dcf3240a93f62fb370e50e83980151b2e4ffa5e78043a062c9258ec550
MD5 9d880d6d2a78e98148697adcc93446f2
BLAKE2b-256 5ad84d63d9204a750836367fa2808514c475d941db91eafe20fe6ac1b270a291

See more details on using hashes here.

File details

Details for the file aions_llm-1.0.16-py3-none-any.whl.

File metadata

  • Download URL: aions_llm-1.0.16-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for aions_llm-1.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 fb1c816660f187e62cbba1947367a9b4e8d1a5aa99d7dd6b0547b64851f824b5
MD5 82f77698b63be7f26a81dc6c77ce1600
BLAKE2b-256 b2eec98eeb65df2e4961484e35f3e3bd1a71f855077b8f1b241e85b3b6c7e948

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.16 This release

2 files

1.0.15

2 files

1.0.14

2 files

1.0.13

2 files

1.0.12

2 files

1.0.11

2 files

1.0.10

2 files

1.0.8

2 files

1.0.7

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page