Skip to main content

Agent Definition Compiler for Ainalyn Platform

Project description

Ainalyn SDK

Python 3.11+ License: MIT Documentation

Agent Definition Compiler for the Ainalyn Platform

Ainalyn SDK helps you define, validate, and export task-oriented agents using a clean Python API. Think of it as a compiler: you describe what your agent does, the SDK validates it, and outputs a platform-ready YAML file.

Note: This SDK is a compiler, not a runtime. It creates agent descriptions—the Ainalyn Platform handles execution.

Why Ainalyn SDK?

  • Type-safe Builder API - Define agents with IDE autocomplete and compile-time checks
  • Comprehensive Validation - Catch errors before deployment
  • YAML Export - One-line compilation to platform-ready format
  • Clean Architecture - Well-tested, maintainable codebase

Quick Start

Installation

pip install ainalyn-sdk

Your First Agent

from ainalyn import AgentBuilder, WorkflowBuilder, NodeBuilder, PromptBuilder
from ainalyn.api import validate, export_yaml

# Define a prompt
greeting_prompt = (
    PromptBuilder("greeting-prompt")
    .description("Generates a personalized greeting")
    .template("Generate a personalized greeting for {{user_name}}")
    .variables("user_name")
    .build()
)

# Define a simple agent
agent = (
    AgentBuilder("greeting-agent")
    .description("Generates personalized greetings")
    .version("1.0.0")
    .add_prompt(greeting_prompt)
    .add_workflow(
        WorkflowBuilder("greet-user")
        .description("Main greeting workflow")
        .add_node(
            NodeBuilder("generate-greeting")
            .description("Generate a personalized greeting message")
            .uses_prompt("greeting-prompt")
            .outputs("greeting")
            .build()
        )
        .entry_node("generate-greeting")
        .build()
    )
    .build()
)

# Validate and export
result = validate(agent)
if result.is_valid:
    yaml_output = export_yaml(agent)
    print(yaml_output)

Output:

# Ainalyn Agent Definition
# This file is a description submitted to Platform Core for review.
# It does NOT execute by itself. Execution is handled by Platform Core.
#
# Local compilation does NOT equal platform execution.

name: greeting-agent
version: 1.0.0
description: Generates personalized greetings
workflows:
- name: greet-user
  description: Main greeting workflow
  entry_node: generate-greeting
  nodes:
  - name: generate-greeting
    description: Generate a personalized greeting message
    type: prompt
    reference: greeting-prompt
    outputs:
    - greeting
prompts:
- name: greeting-prompt
  description: Generates a personalized greeting
  template: Generate a personalized greeting for {{user_name}}
  variables:
  - user_name

CLI Usage

# Validate an agent definition
ainalyn validate my_agent.py

# Compile to YAML
ainalyn compile my_agent.py --output agent.yaml

Documentation

Full Documentation - Complete guides, API reference, and examples

Quick Links:

Examples

Check out the examples/ directory:

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

For newcomers, look for issues labeled good first issue.

Requirements

  • Python 3.11, 3.12, or 3.13
  • PyYAML >= 6.0

License

MIT License - see LICENSE file for details.

Support


Built by the CoreNovus Team

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

ainalyn_sdk-0.1.0a1.tar.gz (56.6 kB view details)

Uploaded Source

Built Distribution

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

ainalyn_sdk-0.1.0a1-py3-none-any.whl (66.4 kB view details)

Uploaded Python 3

File details

Details for the file ainalyn_sdk-0.1.0a1.tar.gz.

File metadata

  • Download URL: ainalyn_sdk-0.1.0a1.tar.gz
  • Upload date:
  • Size: 56.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ainalyn_sdk-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 1da124318dd5fbf7f9ba5f6ddbe3009b499d7df874de715773116212563a1aef
MD5 dd741a5908e33fab4102cb532095da9e
BLAKE2b-256 2a1afa43d6c87658ffc375dd2275169401199c300f3ad536c350cf43f6b1f5a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ainalyn_sdk-0.1.0a1.tar.gz:

Publisher: release.yml on CoreNovus/ainalyn-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ainalyn_sdk-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: ainalyn_sdk-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 66.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ainalyn_sdk-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 4eb8ab4666d73476410d0a141f43efb8851fbe2798f0e214e126561a9063e681
MD5 7237deaef86af21c89dbe723ebd7f245
BLAKE2b-256 a9e711e2fb7ef75096c50b485ba332a907edcb814c4f1c582055447c2c528574

See more details on using hashes here.

Provenance

The following attestation bundles were made for ainalyn_sdk-0.1.0a1-py3-none-any.whl:

Publisher: release.yml on CoreNovus/ainalyn-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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