{"id":49190817,"url":"https://github.com/akifejaz/atesor","last_synced_at":"2026-04-23T07:00:25.089Z","repository":{"id":349720887,"uuid":"1154447161","full_name":"akifejaz/atesor","owner":"akifejaz","description":"Multi-stage Agent for Autonomous RISC-V SW Porting.","archived":false,"fork":false,"pushed_at":"2026-04-07T07:52:06.000Z","size":215,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-07T09:32:12.526Z","etag":null,"topics":["agentic-ai","multi-agent-systems","port-sw-to-riscv","porting","risc-v","risc-v-porting"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akifejaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-10T11:56:24.000Z","updated_at":"2026-04-07T07:48:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/akifejaz/atesor","commit_stats":null,"previous_names":["akifejaz/atesor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/akifejaz/atesor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifejaz%2Fatesor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifejaz%2Fatesor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifejaz%2Fatesor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifejaz%2Fatesor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akifejaz","download_url":"https://codeload.github.com/akifejaz/atesor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifejaz%2Fatesor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32169657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T02:19:40.750Z","status":"ssl_error","status_checked_at":"2026-04-23T02:17:55.737Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","multi-agent-systems","port-sw-to-riscv","porting","risc-v","risc-v-porting"],"created_at":"2026-04-23T07:00:16.227Z","updated_at":"2026-04-23T07:00:25.076Z","avatar_url":"https://github.com/akifejaz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Atesor AI: Smart Multi-stage Agentic System for RISC-V Software Porting 🚀\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![LangGraph](https://img.shields.io/badge/LangGraph-Multi--Agent-green.svg)](https://github.com/langchain-ai/langgraph)\n\n---\n\n## Overview\n\nAtesor AI is a state-of-the-art **multi-agent AI system** designed to automate the complex process of porting software packages from x86/ARM to RISC-V architecture. Built on modern agentic design patterns and powered by LangGraph, it intelligently handles analysis, compilation, and error correction in a secure sandbox.\n\n---\n\n## Architecture \u0026 Workflow\n\nAtesor AI follows a hierarchical design where high-level agents plan and supervise, while specialized agents execute and fix.\n\n### Agent Workflow Diagram\n\n```mermaid\ngraph TD\n    Start((Start)) --\u003e Init[Initialization]\n    Init --\u003e Planner[Strategic Planner]\n    Planner --\u003e Supervisor{Supervisor}\n    \n    Supervisor --\u003e|Plan Next| Scout[Scout Agent]\n    Scout --\u003e Supervisor\n    \n    Supervisor --\u003e|Execute Build| Builder[Builder Agent]\n    Builder --\u003e|Failure| Fixer[Fixer Agent]\n    Fixer --\u003e|Retry Build| Builder\n    \n    Builder --\u003e|Success| Summarizer[Summarizer Agent]\n    Summarizer --\u003e End((End))\n    \n    Supervisor --\u003e|Escalate| Escalation[Human Interv.]\n    Escalation --\u003e End\n\n\n    subgraph OpsLayer [\"Scripted Operations Layer (Zero-Cost)\"]\n        Init\n    end\n\n    subgraph Sandbox [\"Secure Sandbox\"]\n        direction TB\n        Scout\n        Builder\n        Fixer\n    end\n\n    %% Styling\n    style Sandbox fill:#1a1a1a,stroke:#555,stroke-dasharray: 5 5\n    style OpsLayer fill:#1a1a1a,stroke:#555,stroke-dasharray: 5 5\n    style Supervisor fill:#1a1a1a,stroke:#555,stroke-dasharray: 5 5\n```\n\n\n## Technical Deep Dive\n\n### 1. State-Driven Orchestration (LangGraph)\nAtesor AI leverages **LangGraph** to implement a cyclic, state-driven workflow. Unlike linear pipelines, our architecture allows the system to:\n- **Loop back** from failure to specialized fixing nodes.\n- **Refine plans** dynamically as more information is gathered by the Scout.\n- **Maintain a persistent audit trail** of every command executed and decision made.\n\n### 2. The Multi-Agent Intelligence\n- **The Planner** acts as the architect, creating a high-level roadmap (`TaskPlan`) that guides the entire process.\n- **The Supervisor** acts as the quality controller, verifying agent outputs for hallucinations and routing the state to the most appropriate node.\n- **The Sandbox Agents** (Scout, Builder, Fixer) operate exclusively within the Docker environment, ensuring host safety and environmental consistency.\n\n### 3. Cost-Effective Intelligence\nBy offloading deterministic tasks (like dependency tree parsing and build system detection) to the **Scripted Operations Layer**, we reduce the context window requirements and the total number of LLM invocations. This specialized layer handles ~70% of the non-critical decision path, allowing the LLMs to focus purely on complex problem-solving and patch generation.\n\n---\n\n## Quick Start\n\n### Prerequisites\n\n- Docker installed and running.\n- **Cross-Platform Support**: If you are on an x86 host, you must enable RISC-V emulation via `binfmt`:\n  ```bash\n  docker run --privileged --rm tonistiigi/binfmt --install all\n  ```\n- API key for an LLM provider (OpenAI, Gemini, or OpenRouter).\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/akifejaz/atesor-ai\ncd atesor-ai\n\n# Install dependencies\npip install -r requirements.txt\n\n# Set up environment variables\ncp .env.example .env\n# Edit .env and add your API keys\n```\n\n### Basic Usage\n\n```bash\n# 1. Prepare the RISC-V Sandbox\npython3 main.py --setup-only\n\n# 2. Start Porting a Package\npython3 main.py --repo https://github.com/madler/zlib --verbose\n```\n\n---\n\n## Few-Shot Learning System\n\nAtesor AI includes a **lightweight memory system** that provides few-shot examples to agents, improving their accuracy without increasing API costs significantly.\n\n### How It Works\n\n1. **Example Dataset**: Curated examples stored in `data/examples/` for each agent type:\n   - `scout_examples.json` - Build plan generation patterns\n   - `fixer_examples.json` - Error resolution strategies\n   - `builder_examples.json` - Build execution examples\n\n2. **Smart Retrieval**: The system uses keyword-based matching to find relevant examples:\n   - Matches build system (go, cmake, make)\n   - Matches error patterns\n   - Considers project structure (main path, module directory)\n\n3. **Prompt Integration**: Selected examples are formatted and included in agent prompts, providing context without requiring full vector database infrastructure.\n\n### Adding New Examples\n\nTo add examples from your successful porting sessions:\n\n```bash\n# Edit the appropriate examples file\nvim data/examples/scout_examples.json\n\n# Test the examples\npython -c \"from src.memory import format_few_shot_examples; print(format_few_shot_examples('scout', {'build_system': 'go'}))\"\n```\n\nSee `data/examples/README.md` for detailed instructions on formatting examples.\n\n### Benefits\n\n- **10-15 examples per agent** provide significant accuracy improvement\n- **No vector DB required** - lightweight keyword matching\n- **~2000 chars per prompt** - minimal token overhead\n- **Easy to extend** - JSON format, no code changes needed\n\n---\n\n## Development \u0026 Testing\n\nRun the automated unit tests to ensure system integrity:\n\n```bash\n# Run all tests\nPYTHONPATH=. pytest\n```\n\n---\n\n## Configuration\n\nThe system is environment-aware and supports multiple LLM providers:\n\n- **Config**: `src/config.py` automatically handles workspace paths between Docker and Host.\n- **Models**: `src/models.py` manages model selection and cost tracking.\n- **Security**: Commands are validated against a whitelist in `src/tools.py` before execution.\n\n---\n\n## Project Structure\n\n- `main.py`: Entry point for CLI and Docker management.\n- `src/graph.py`: The core LangGraph state machine.\n- `src/scripted_ops.py`: Zero-cost analysis and repo management.\n- `src/state.py`: Global process tracking and data structures.\n- `src/tools.py`: Safe command execution and file utilities.\n- `src/memory.py`: Few-shot learning system for agent improvement.\n- `data/examples/`: Curated examples for each agent type.\n- `tests/`: Automated unit tests for engine logic.\n\n---\n\n## Contributing \u0026 Support\n\nWe welcome contributions to the RISC-V ecosystem! \n- [Open an Issue](https://github.com/akifejaz/atesor-ai/issues)\n- [Project License](LICENSE)\n\n**Built with ❤️ for the RISC-V community**\n\n*Making RISC-V software ecosystem as rich as x86/ARM, one package at a time.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakifejaz%2Fatesor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakifejaz%2Fatesor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakifejaz%2Fatesor/lists"}