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

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

Built distribution (wheel)

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

Total release size: 52.2 kB

Release files / backbone_agents-4.0.0a3.tar.gz

Download URL backbone_agents-4.0.0a3.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
16de48196073b4e12ece0ee563c99561d0b80aeeb35de54167fbd43acdfbaa56
BLAKE2b-256 checksum
How to use checksums
5532a4c7a99c2f24e5fd2c6d09e09e6515e1250bf4017ab8b524198bb23c4391
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.0a3-py3-none-any.whl

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

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