Skip to content

atesor-v1.0.0

Choose a tag to compare

@akifejaz akifejaz released this 23 Apr 05:04
bd10c06

Quick Start

Prerequisites

  • Docker installed and running.
  • Cross-Platform Support: If you are on an x86 host, you must enable RISC-V emulation via binfmt:
    docker run --privileged --rm tonistiigi/binfmt --install all
  • API key for an LLM provider (OpenAI, Gemini, or OpenRouter).

Installation

# Clone the repository
git clone https://github.com/akifejaz/atesor-ai
cd atesor-ai

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env-example .env
# Edit .env and add your API keys

Basic Usage

# 1. Prepare the RISC-V Sandbox
python3 main.py --setup-only

# 2. Start Porting a Package
python3 main.py --repo https://github.com/madler/zlib --verbose

# 3. Force a clean rebuild with custom attempt limit
python3 main.py --repo https://github.com/madler/zlib --force --max-attempts 8
Flag Default Description
--repo URL required GitHub repository URL to port
--verbose false Enable DEBUG logging to console
--setup-only false Initialize sandbox without porting
--max-attempts 5 Maximum fix attempts before escalation
--force false Force fresh clone and rebuild

Environment Variables

Variable Purpose
LLM_PROVIDER gemini (default), openai, or openrouter
GOOGLE_API_KEY Required for Gemini
OPENAI_API_KEY Required for OpenAI
OPENROUTER_API_KEY Required for OpenRouter
LANGCHAIN_API_KEY Optional — LangSmith tracing
LANGCHAIN_TRACING_V2 Set to true to activate tracing

Output Locations

Path Content
workspace/output/{repo}_report_*.md Markdown porting guide
workspace/output/{repo}_state_*.json Full state snapshot
workspace/logs/agent.log DEBUG-level agent log
workspace/logs/agent-call.log LLM call audit trail

Project Structure

  • main.py: Entry point for CLI and Docker management.
  • src/graph.py: The core LangGraph state machine (all agent nodes + routing).
  • src/scripted_ops.py: Zero-cost analysis and repo management.
  • src/state.py: Global process tracking, error classification, and data structures.
  • src/tools.py: Safe command execution and file utilities.
  • src/memory.py: Few-shot learning system with auto-learning.
  • src/config.py: Environment-aware workspace path resolution.
  • src/models.py: LLM provider factory and per-role model configuration.
  • src/knowledge.py: Static RISC-V / Alpine knowledge base.
  • src/artifact_scanner.py: Post-build artifact detection and RISC-V verification.
  • src/llm_logger.py: LLM call audit trail logging.
  • data/examples/: Curated few-shot examples per agent type.
  • data/recipe_cache.json: Cache of successfully ported package recipes.
  • tests/: Automated unit tests for engine logic.