Fully Python-Based
Avoid proprietary visual builders and closed runtimes. YAIFA generates clean, transparent Python code that integrates with the entire open-source data science ecosystem.
Concept & Purpose
Low-code/no-code AI builders often restrict developers to simple flowcharts, making complex logic hard to express. YAIFA takes a **hybrid code generation approach**:
- Declarative Structure: High-level topology (agents, ports, relations, BDI rules) is declared in readable JSON/YAML schemas.
- Standard Code Generation: A built-in compiler outputs native Python files containing execution drivers and imports.
- Custom Python Logic: Developers write domain logic directly in standard Python files, having full freedom to import any library, write algorithms, or call custom services.
Integration with the Python Ecosystem
Because each agent runs as a native Python script, YAIFA offers unparalleled flexibility in combining AI models with custom logic:
- Data Science & Analytics: Leverage
Pandas,NumPy, andSciPyfor processing time-series sensor data from the shopfloor. - Machine Learning: Train and serve local models using
PyTorch,TensorFlow, orscikit-learndirectly inside the agent's Learn/Production loop. - Developer Tooling: Work in your favorite IDE (Cursor, VS Code), track changes with standard Git, run automated tests using
pytest, and deploy through standard CI/CD engines.
Technical Realization
YAIFA uses specific code structures to separate generated boilerplate from manually written logic. In the agent workspace directory, files are split:
| File / Directory | Nature | Role |
|---|---|---|
| `yaifa_agent.py` | GENERATED | The main execution loop. Automatically overwritten by the studio generator. (Do not edit by hand). |
| `Observe/`, `Action/` | EDITABLE | Contains custom scripts defining how to preprocess sensor inputs or execute outgoing commands. |
| `Processing/` | EDITABLE | Custom decision logic mapping Belief updates and Plan routines. |
| `internal_processing.py` | MIXED | Uses specific markup blocks to merge generator updates with custom code. |
Inside mixed files, the generator respects **Preserve Blocks** to ensure custom edits are never lost during studio updates:
# ... Generated imports and boilerplate ...
# YAIFA_PRESERVE_START: custom_rules
def evaluate_criticality(temp, pressure):
# This manual block will survive subsequent code generations
if temp > 85.0 and pressure > 4.2:
return "critical"
return "normal"
# YAIFA_PRESERVE_END