Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Backbone Agents

مترجم وكلاء (Agent Compiler). العقد هو المصدر الوحيد للحقيقة. الكود إسقاط منه. Agent Compiler. The contract is the single source of truth. Code is a projection.


ما هو Backbone Agents؟

Backbone Agents هو أول مترجم وكلاء (Agent Compiler) مفتوح المصدر بالعربية. يقرأ عقداً (contract) بصيغة JSON، ويُنتج كوداً جاهزاً للتشغيل لإطار عمل الوكلاء الذي تختاره — دون تغيير سطر واحد في العقد.

الفكرة المحورية

         ┌─────────────┐
         │  Contract   │  ← المصدر الوحيد للحقيقة
         │  (JSON)     │
         └──────┬──────┘
                │
       ┌────────┼────────┐
       ▼        ▼        ▼
   LangGraph  Pydantic   Future
              AI        Framework

نفس العقد → كود LangGraph أو كود Pydantic AI أو أي إطار مستقبلي. صفر تغييرات في العقد. صفر تغييرات في CLI.

لماذا هذا مهم؟

معظم أطر الوكلاء (LangGraph, CrewAI, AutoGen, Pydantic AI) تُجبرك على كتابة كود خاص بها. إذا قررت تغيير الإطار، تُعيد كتابة كل شيء. Backbone يكسر هذه الحلقة:

  • العقد يبقى ثابتاً.
  • الإطار يصبح تفصيلاً تنفيذياً.
  • الاختبار يبقى على مستوى العقد، لا الكود.

التركيب (Installation)

pip install backbone-agents

التركيب من المصدر (للمطورين):

git clone https://github.com/backbone-system/backbone-agents.git
cd backbone-agents
pip install -e ".[dev]"

الاستخدام السريع

1. أنشئ عقداً

{
  "project_metadata": {
    "name": "hello_router",
    "selected_pattern": "router"
  },
  "agents": [
    {
      "role_id": "message_router",
      "in_scope": ["greeting", "farewell"],
      "out_of_scope": ["coding", "math"]
    },
    {
      "role_id": "greeter",
      "in_scope": ["greeting"]
    },
    {
      "role_id": "fareweller",
      "in_scope": ["farewell"]
    }
  ],
  "artifact_flow": []
}

2. افحص العقد

backbone lint hello_router

3. صدّر الكود

# إلى LangGraph
backbone export hello_router --target langgraph

# أو إلى Pydantic AI
backbone export hello_router --target pydantic_ai

نفس العقد، إطاران مختلفان، صفر تغييرات.


الأنماط المدعومة (Patterns)

النمط الوصف
router وكيل تصنيف يوجّه إلى وكلاء متخصصين
debate مناظرة 3 أدوار + حكم
sequential تدفق خطي A → B → C

3 أنماط × إطاران مدعومان = 6 توليفات تعمل.


البنية المعمارية

src/backbone_agents/
├── cli.py              ← v3.1 CLI (مرجع تاريخي)
├── cli_v4.py           ← v4.0 CLI (يستخدم REGISTRY)
├── linter.py           ← 5 فحوصات للعقد
├── compilers/
│   ├── base.py         ← Protocol + REGISTRY
│   ├── langgraph.py    ← LangGraphCompiler
│   └── pydantic_ai.py  ← PydanticAICompiler
└── templates/          ← عقود جاهزة

إضافة إطار جديد (Extending)

أضف ملفاً واحداً في src/backbone_agents/compilers/:

# compilers/crewai.py
from .base import write_generated

class CrewAICompiler:
    name = "crewai"
    supported_patterns = ("sequential", "router")

    def compile(self, contract, output_dir):
        # ... توليد الكود ...
        return [write_generated(output_dir, "crew.py", code)]

ثم سطر واحد في compilers/__init__.py. انتهى.


الترخيص

MIT — راجع LICENSE.


Backbone Agents — لأن العقد يجب أن يكون هو المصدر الوحيد للحقيقة.

Metadata

Release files for backbone-agents 4.0.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for backbone-agents 4.0.0a1
File Size Uploaded Provenance Actions
backbone_agents-4.0.0a1.tar.gz 20.3 kB Without provenance Details for backbone_agents-4.0.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for backbone-agents 4.0.0a1
File Interpreter ABI Platform Actions
backbone_agents-4.0.0a1-py3-none-any.whl Python 3 none any Details for backbone_agents-4.0.0a1-py3-none-any.whl

Total release size: 47.3 kB

Release files / backbone_agents-4.0.0a1.tar.gz

Download URL backbone_agents-4.0.0a1.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3e768fdf7b432011e87a3a3020fccf4c296d77e9371c63f88cafd1315c60ae3d
BLAKE2b-256 checksum
How to use checksums
5c5bd487855fe9f7b9b8230aad43125930c6b550137826b2d3613d1f21f9e398
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / backbone_agents-4.0.0a1-py3-none-any.whl

Download URL backbone_agents-4.0.0a1-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40c92f1c83edf0328a8f3cccbcc978da5986f951f2989df9bc2f5676f655af81
BLAKE2b-256 checksum
How to use checksums
3ea52a536ffd6af1c0f338a505e752aa99cc954a197de513700566bf598cf281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for backbone-agents 4.0.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page