AI Worker worker.md

ag2

AG2 (formerly AutoGen): The Open-Source AgentOS.Join us at: https://discord.gg/sNGSwQME3x

Tool registry 4,359 stars Python Apache-2.0 Worker-compatible

Source#

  • Repository: ag2ai/ag2
  • Last source update: 2026-04-04
  • Last verified: 2026-04-05

Tags#

a2aag2agent-frameworkagenticagentic-aiai

Integration notes#

Repository is focused on tool/server interoperability; wrap in bounded worker contracts for production use.

worker.md example#

Starter worker.md contract mapped from this registry entry. Copy this file and adapt schemas, constraints, and statuses for your task.

---
id: ag2-repo-derived-worker
name: ag2 Repo-Derived Worker
version: 1.0.0
source_registry_url: https://worker.md/registry/ag2/
source_repository: https://github.com/ag2ai/ag2
repository_default_branch: main
repository_language: Python
repository_license: Apache-2.0
repository_updated_at: 2026-04-04
worker_mode: agent-orchestration-worker
derivation_method: github_repository_metadata_plus_raw_readme
derivation_confidence: 0.95
derived_on: 2026-04-05
tags:
  - a2a
  - ag2
  - agent-framework
  - agentic
  - agentic-ai
  - ai
---

# ag2 Repo-Derived Worker

## Repo-derived summary
- Registry summary: AG2 (formerly AutoGen): The Open-Source AgentOS.Join us at: https://discord.gg/sNGSwQME3x
- Repository description: AG2 (formerly AutoGen): The Open-Source AgentOS.Join us at: https://discord.gg/sNGSwQME3x
- Stars (snapshot): 4,359
- Primary language: Python
- Worker mode classification: agent-orchestration-worker

## Extracted from
- https://github.com/ag2ai/ag2
- https://github.com/ag2ai/ag2/blob/main/README.md
- https://docs.ag2.ai/latest/docs/user-guide/release-roadmap/
- https://docs.ag2.ai/latest/docs/user-guide/basic-concepts/installing-ag2/
- https://github.com/ag2ai/build-with-ag2

## Evidence notes (from repository text)
- README summary paragraph: 📚 Documentation | 💡 Examples | 🤝 Contributing | 📝 Cite paper | 💬 Join Discord
- # AG2: Open-Source AgentOS for AI Agents
- - [AG2: Open-Source AgentOS for AI Agents](#ag2-open-source-agentos-for-ai-agents)
- - [Run your first agent](#run-your-first-agent)
- - [Introduction of different agent concepts](#introduction-of-different-agent-concepts)
- - [Conversable agent](#conversable-agent)

## Installation hints found in README
- `pip install ag2[openai]`
- `pip install 'ag2[openai]'`
- `pip install prek`

## worker.md contract (derived starter)
Purpose: Execute one orchestrated agent task as a bounded worker step.

### Input schema
```json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "run_id",
    "task",
    "context"
  ],
  "properties": {
    "run_id": {
      "type": "string"
    },
    "task": {
      "type": "string"
    },
    "context": {
      "type": "object"
    }
  }
}
```

### Output schema
```json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "run_id",
    "status",
    "result"
  ],
  "properties": {
    "run_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "retryable_error",
        "invalid_request",
        "invalid_output"
      ]
    },
    "result": {
      "type": "object"
    }
  }
}
```

### Constraints
- timeout_seconds: 30
- max_attempts: 2
- idempotency_key: run_id
- status_enum: [ok, retryable_error, invalid_request, invalid_output]
- notes: adapt to concrete APIs/classes documented in this repository before production use

## How this should be used
1. Treat this file as a repo-derived starter profile, not a claim of an official repository API contract.
2. Replace schemas with exact interfaces from code/docs you adopt.
3. Keep execution bounded and auditable using worker protocol constraints.

How to use#

  • Save this as a worker spec file (for example: ag2-my-task.worker.md).
  • Replace the input/output schemas and purpose with your real bounded task.
  • Enforce schema validation + timeout + retry policy in your runtime before production use.

Citation#

Reference URL: https://worker.md/registry/ag2/

Source URL: https://github.com/ag2ai/ag2