Agent Definition Compiler for Ainalyn Platform
Project description
Ainalyn SDK
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
Submitting Agents to Platform
After compiling your agent, submit it directly to the Ainalyn Platform for review:
from ainalyn import AgentBuilder, submit_agent, track_submission
# Build your agent
agent = (
AgentBuilder("my-agent")
.version("1.0.0")
.description("My awesome agent")
# ... add workflows, prompts, tools ...
.build()
)
# Submit for review
result = submit_agent(agent, api_key="your_api_key")
print(f"Review ID: {result.review_id}")
print(f"Track at: {result.tracking_url}")
# Check submission status
status = track_submission(result.review_id, api_key="your_api_key")
if status.is_live:
print(f"Agent is live: {status.marketplace_url}")
Important:
- SDK can submit but NOT approve - Platform Core has final authority
- Submission does NOT create an Execution
- Submission does NOT incur billing (unless platform policy states)
- Get your API key at:
https://console.ainalyn.io/api-keys
See example/submit_agent_example.py for a complete walkthrough.
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:
- What is an Agent? - Understand the vision
- Installation Guide
- 5-Minute Quickstart
- Your First Agent Tutorial
Examples
Check out the examples/ directory:
- basic_agent.py - Simple greeting agent
- multi_workflow_agent.py - Complex data analysis agent
- submit_agent_example.py - Agent submission workflow
- price_monitor_agent.py - Complete price monitoring agent
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ainalyn_sdk-0.1.0a4.tar.gz.
File metadata
- Download URL: ainalyn_sdk-0.1.0a4.tar.gz
- Upload date:
- Size: 73.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcd67e5f3aac829cff48fc85b7f4f0d0f5d105b8f597c009c96f29a2086d970b
|
|
| MD5 |
6ea97c1ada690fffd3253fde8bdcba97
|
|
| BLAKE2b-256 |
6a50f134f6340d3917793a61d2c955ac45f909f6c880737b32ad1a3eccae41e4
|
Provenance
The following attestation bundles were made for ainalyn_sdk-0.1.0a4.tar.gz:
Publisher:
release.yml on CoreNovus/ainalyn-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ainalyn_sdk-0.1.0a4.tar.gz -
Subject digest:
dcd67e5f3aac829cff48fc85b7f4f0d0f5d105b8f597c009c96f29a2086d970b - Sigstore transparency entry: 784704899
- Sigstore integration time:
-
Permalink:
CoreNovus/ainalyn-sdk@771ff7334e09319f9d71fb5f03c24738df7f10e8 -
Branch / Tag:
refs/tags/v0.1.0-alpha.4 - Owner: https://github.com/CoreNovus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@771ff7334e09319f9d71fb5f03c24738df7f10e8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ainalyn_sdk-0.1.0a4-py3-none-any.whl.
File metadata
- Download URL: ainalyn_sdk-0.1.0a4-py3-none-any.whl
- Upload date:
- Size: 89.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67f237748fe5d597bd734cce68e46dff481a1b465d531fa9f1d0edd6a3f72126
|
|
| MD5 |
4d965adf88023fb5c8765f3aaeae077f
|
|
| BLAKE2b-256 |
f7aa53ced0a99668d2fb099809518ccf7f99ef6a7107e37167d269f883af069e
|
Provenance
The following attestation bundles were made for ainalyn_sdk-0.1.0a4-py3-none-any.whl:
Publisher:
release.yml on CoreNovus/ainalyn-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ainalyn_sdk-0.1.0a4-py3-none-any.whl -
Subject digest:
67f237748fe5d597bd734cce68e46dff481a1b465d531fa9f1d0edd6a3f72126 - Sigstore transparency entry: 784704912
- Sigstore integration time:
-
Permalink:
CoreNovus/ainalyn-sdk@771ff7334e09319f9d71fb5f03c24738df7f10e8 -
Branch / Tag:
refs/tags/v0.1.0-alpha.4 - Owner: https://github.com/CoreNovus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@771ff7334e09319f9d71fb5f03c24738df7f10e8 -
Trigger Event:
push
-
Statement type: