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.0a2

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.0a2
File Size Uploaded Provenance Actions
backbone_agents-4.0.0a2.tar.gz 21.4 kB Without provenance Details for backbone_agents-4.0.0a2.tar.gz

Built distribution (wheel)

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

Total release size: 52.2 kB

Release files / backbone_agents-4.0.0a2.tar.gz

Download URL backbone_agents-4.0.0a2.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
be4a478a4d7f36d6a6d65431378f89c6b3bc69ae05d16d1c9ec9891588be9fce
BLAKE2b-256 checksum
How to use checksums
2f40d20d21a4cf4af086ae8b0da56b61a9e2c5ed0f500bbbb47839909078ca30
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.0a2-py3-none-any.whl

Download URL backbone_agents-4.0.0a2-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd7e3733577c4b4e10e55b0580135680c351688929ed842e59a258e4f67c75c3
BLAKE2b-256 checksum
How to use checksums
9cd53a6e0b1422f489c134d242fe76103dd74798fdb57aefc1084c99a8fb9931
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.0a2

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