Skip to content

Releases: kienbui1995/magic

v0.5.0

28 Mar 10:01

Choose a tag to compare

v0.4.0

27 Mar 08:36

Choose a tag to compare

Full Changelog: v0.3.1...v0.4.0

MagiC v0.3.1 — Bug Fixes

23 Mar 03:18

Choose a tag to compare

Bug Fixes

Orchestrator

  • Fix workflow status overwrite: advanceWorkflowLocked now returns early if workflow is already in terminal state (aborted/completed/failed). Prevents in-flight goroutines from overwriting WorkflowAborted status.

Dispatcher

  • Fix silent JSON errors: handleComplete and MsgTaskFail now check json.Unmarshal errors instead of silently processing zero-value structs. Malformed payloads are properly reported as task failures.

Stats

  • 81 Go tests + 9 Python tests — all passing with -race
  • Zero remaining issues from independent review
  • Score: 7.8/10 (verified independently)

Full Changelog

v0.3.0...v0.3.1

Full Changelog: v0.3.0...v0.3.1

MagiC v0.3.0 — Production Foundation

20 Mar 12:24

Choose a tag to compare

Production Foundation Release

Event Bus Rewrite

  • Bounded worker pool (64 goroutines, was unbounded)
  • Buffered channel (4096) with backpressure
  • Unsubscribe + lazy cleanup (fixes memory leak)
  • Publish-after-stop guard
  • Graceful stop with drain

Dispatcher Hardening

  • context.Context propagation + contract timeout enforcement
  • Circuit breaker: 3 consecutive failures = 30s cooldown (logic bug fixed)
  • Context-aware retry with backoff

Orchestrator

  • Workflow cancel: POST /api/v1/workflows/{id}/cancel
  • Cancels pending + running + awaiting steps
  • ApproveStep mutex protection (race condition fixed)

Python SDK v0.2.0

  • Semaphore-based concurrency (max_workers configurable)
  • ThreadingHTTPServer for parallel connections
  • Rejects tasks at max capacity with task.fail
  • Logging, heartbeat backoff, body size limit

Bugs Fixed (from independent review)

  • Circuit breaker zero-value openUntil caused failures to never accumulate
  • ApproveStep had no mutex, raced with CompleteStep
  • Canceled event subscriptions leaked memory
  • CancelWorkflow didn't stop running steps
  • Python ThreadPoolExecutor blocked HTTP handler threads

Stats

  • 81 Go tests + 9 Python tests, all passing with -race
  • Zero data races, zero goroutine leaks

Full Changelog: v0.2.0...v0.3.0

MagiC v0.2.0 — Production-Ready Core

20 Mar 11:41

Choose a tag to compare

What's Changed since v0.1.1

Core Framework Hardening

  • Router enforces MaxConcurrentTasks — overloaded workers are skipped
  • Priority-aware routing — worker load incrementing after assignment
  • Dispatcher retry with backoff — failed HTTP calls retry up to 2 times (1s, 2s)
  • Evaluator wired into Dispatcher — output validated against contract schema
  • Step output flows to next step — DAG data pipeline via _deps field
  • Human-in-the-loop approval gatesPOST /api/v1/workflows/{id}/approve/{stepId}
  • SQLite persistent storageMAGIC_STORE=magic.db (pure Go, no CGO)
  • Worker deregister APIDELETE /api/v1/workers/{id}

SDK

  • Python SDK: pip install magic-ai-sdk / from magic_ai_sdk import Worker

Developer Experience

  • 5 template workers (summarizer, translator, classifier, extractor, generator)
  • CrewAI integration guide
  • Landing page with SVG DAG visualization

Configuration

Variable Default Description
MAGIC_PORT 8080 Server port
MAGIC_API_KEY (empty) API key auth
MAGIC_CORS_ORIGIN * Allowed CORS origin
MAGIC_STORE (in-memory) SQLite path for persistence

Stats

  • 77 Go tests + 3 Python tests, all passing with -race
  • 14 packages, zero external Go dependencies
  • Apache 2.0

Full Changelog: v0.1.1...v0.2.0

MagiC v0.1.1 — Security Hardening + Framework Standards

16 Mar 11:23

Choose a tag to compare

What's Changed since v0.1.0

Security Hardening

  • API key authentication middleware (MAGIC_API_KEY env var)
  • SSRF protection — blocks private network endpoints in dispatcher
  • Request body size limit (1MB via MaxBytesReader)
  • Generic error messages — no internal details leaked to clients
  • Configurable CORS origin (MAGIC_CORS_ORIGIN env var)
  • Race condition fix — copy task/worker before async dispatch
  • Graceful shutdown with signal handling and server timeouts
  • Security headers (X-Content-Type-Options, X-Frame-Options, Cache-Control)

Framework Standards

  • Zero race conditionsgo test -race passes clean (72 tests)
  • Deep copy all nested slices/pointers in Store (Worker, Task, Workflow, Team, Knowledge)
  • Stable pagination with sorted results on all list endpoints
  • Gateway constructor refactored from 11 params to Deps struct
  • Event bus panic recovery in goroutines
  • Monitor writer synchronized with mutex
  • HealthCheck goroutine stoppable via returned stop function
  • Heartbeat cannot override "paused" status (cost controller protection)
  • ErrNotFound and ErrNoWorkerAvailable use idiomatic errors.New
  • Godoc comments on all exported types and functions

API Improvements

  • GET /api/v1/tasks — list tasks endpoint
  • GET /api/v1/tasks/{id} — get task by ID (poll for completion)
  • GET /api/v1/workers/{id} — get worker by ID
  • GET /api/v1/workflows/{id} — get workflow by ID
  • Pagination on all list endpoints (?limit=&offset=)
  • Consistent error response format via writeJSON/writeError helpers

End-User Experience

  • Dockerfile (multi-stage, alpine-based): docker build -t magic .
  • Multi-worker example (2 workers + workflow + cost tracking)
  • Rewritten README with accurate Quick Start (source + Docker)
  • Authentication section with MAGIC_API_KEY usage
  • Configuration table (env vars)

Open-Source Standards

  • Apache 2.0 LICENSE file
  • CONTRIBUTING.md
  • CODE_OF_CONDUCT.md
  • GitHub Actions CI/CD (Go tests with -race, Python tests)

Verification

  • 72 Go tests, 3 Python tests — all passing
  • go test -race — zero data races
  • go vet — clean
  • Docker build — success

MagiC v0.1.0 — Where AI becomes a Company

16 Mar 10:21

Choose a tag to compare

MagiC v0.1.0 — First Release

Don't build another AI. Manage the ones you have.

What's included

9 Go modules — complete framework for managing AI worker fleets:

Module Purpose
Gateway HTTP API with auth, rate limiting, CORS, security headers
Registry Worker registration, heartbeat, health monitoring
Router Task routing (best_match, cheapest, round_robin)
Monitor Event bus, structured JSON logging, metrics
Orchestrator Multi-step workflow DAG execution with parallel steps
Evaluator JSON schema validation for task output
Cost Controller Budget tracking, alerts at 80%, auto-pause at 100%
Org Manager Team CRUD, worker-to-team assignment
Knowledge Hub Shared knowledge base with full-text search

Plus:

  • Dispatcher — HTTP task dispatch to worker endpoints (full E2E)
  • Python SDKpip install magic with @capability decorator
  • Hello Worker — 10-line example worker

API Endpoints (14)

POST /api/v1/workers/register    GET  /api/v1/workers
POST /api/v1/workers/heartbeat   GET  /api/v1/workers/{id}
POST /api/v1/tasks               GET  /api/v1/tasks
                                 GET  /api/v1/tasks/{id}
POST /api/v1/workflows           GET  /api/v1/workflows
                                 GET  /api/v1/workflows/{id}
POST /api/v1/teams               GET  /api/v1/teams
POST /api/v1/knowledge           GET  /api/v1/knowledge?q=
GET  /api/v1/costs               GET  /api/v1/metrics
GET  /health

Quick Start

git clone https://github.com/kienbui1995/magic.git
cd magic/core
go build -o ../bin/magic ./cmd/magic
MAGIC_API_KEY=your-secret ../bin/magic serve

Security

  • API key authentication (MAGIC_API_KEY)
  • SSRF protection on worker endpoints
  • Request body size limit (1MB)
  • CORS configurable (MAGIC_CORS_ORIGIN)
  • Security headers (nosniff, DENY, no-store)
  • Graceful shutdown with timeouts
  • Race-free (go test -race clean)

Stats

  • 72 tests across 13 packages, all passing with -race
  • ~4,600 lines of Go
  • Zero external dependencies (stdlib only)
  • Apache 2.0 license