#Cancellation Mechanism - Z-M-Huang/openhive GitHub Wiki
AI agent orchestration platform with a hierarchical team structure. User talks to an assistant via messaging channels. The main agent delegates to autonomous teams — each team has an orchestrator, subagents, skills, and plugins running as AI SDK sessions.
OpenHive is a rules-first system. Behavior is defined in markdown rule files. Code handles only what rules cannot: channel I/O, invariant enforcement, and session lifecycle.
- Minimal TypeScript — channels, control plane, tool guards, triggers (grows with features)
- ~50-100 rule files (agent behavior, team policies, skills, escalation)
- Vercel AI SDK 6 as the execution platform (multi-provider: Anthropic, OpenAI, etc.)
See Architecture for the full technical reference.
Execution hierarchy (5 layers):
| Layer | Description |
|---|---|
| Main Agent | Routes user requests to child teams. No subagents, no skills, no direct execution. |
| Team Orchestrator | Manages subagents within a team. Never invokes skills directly (ADR-40). |
| Subagent | Perspective within a team. Follows skills. Owns learning/reflection cycles. Proposes changes, escalates for confirmation. |
| Skill | Step-by-step procedure in markdown. Orchestrates plugins via ## Required Tools. Pure orchestration — no raw API calls (ADR-39). |
| Plugin | Executable TypeScript tool for a single external operation. |
Cross-cutting concepts:
| Concept | Description |
|---|---|
| Organization Tools | Control plane: hierarchy, messaging, escalation, task queues. Inline AI SDK tool() definitions. |
| Rules | Markdown files defining behavior. Three tiers: system, org, team. |
| Triggers | Events that dispatch tasks to subagents: schedules, messages, keywords. Stored in SQLite. |
| Page | Description |
|---|---|
| Design-Principles | Core principles: Agent as a Feature, rules-first, uniform recursion |
| Architecture | System architecture, data layout, isolation model, SDK integration |
| Rules-Architecture | Rule format, cascade, governance, skills, self-evolution |
| Architecture-Decisions | ADR log — every design decision with rationale |
| Request-Processing | How user requests flow through multi-session orchestration |
| Skill-Repository | Online skill discovery via Vercel skills ecosystem |
| Conversation-Threading | Topic-based parallel conversations with server-side classification |
| Scenarios | End-to-end operational walkthroughs |
| Admin-Dashboard | Operator dashboard: health, org tree, tasks, logs, memory, triggers, conversations |