Core runtime

From VectorSpaceLab/AREX-Skill · View interactive version

Core runtime is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Maintain, debug, and design low-level autogen_core applications: runtimes, routed agents, handlers, topics, subscriptions, tools, model messages, component config, cancellation, intervention, and distributed runtime boundaries.

How to use this skill

Skill file

AutoGen Core Runtime

Use this sub-skill when working on existing AutoGen Python autogen_core applications that need low-level event-driven runtime control. AutoGen is in maintenance mode; for new greenfield agent systems, consider Microsoft Agent Framework, but use this skill for AutoGen maintenance, debugging, migration, and compatibility work.

Route Here For

Route Elsewhere

Core Workflow

  1. Identify whether the application is direct RPC (send_message to an AgentId) or pub/sub (publish_message to a TopicId).
  2. Confirm every agent type is registered before sending, and every publish path has a matching subscription.
  3. Start the runtime before enqueueing work, then await stop() for direct sends or stop_when_idle() after publishes.
  4. Keep handlers async, explicitly typed, and decorated; use message_handler(strict=False) only when intentionally tolerating type or return mismatches.
  5. Treat component loading and FunctionTool config as trusted-code operations; validate provider strings, import namespaces, and schemas before loading.

Bundled References

Quick Smoke Check

Run the bundled smoke script in an environment with autogen-core installed:

python scripts/core_runtime_smoke.py --inspect
python scripts/core_runtime_smoke.py --run-local-example

The local example uses only SingleThreadedAgentRuntime, a dataclass message, and an in-process RoutedAgent; it performs no network or service calls.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.