Launched October 14, 2025
Magma | Open Source Typescript Framework for Building AI Agents

Magma | Open Source Typescript Framework for Building AI Agents

Agents at the speed of import

FreeAIFrameworkOpen Source3,032 impressions#4 of its week

Magma is a low-opinion framework allowing developers to focus on the logic and behavior of their agents, rather than dealing with useless abstractions. It gives you greater visibility and control over an agent's process as it occurs.

Magma is an open-source TypeScript framework for building AI agents with minimal boilerplate.

for
Developers building custom AI agents who want control and observability.
pricing
open source
license
open source
pompeii-labs/magma 99 6TypeScriptupdated 2 months ago
works withOpenAIAnthropicGroqExpress

Key features

8 features of Magma | Open Source Typescript Framework for Building AI Agents
  • Simple API — Create agents with a few lines of TypeScript and class inheritance.
  • Provider Flexibility — Switch between OpenAI, Anthropic, Groq without code changes.
  • Tool Decorators — Add callable tools to agents via @tool and @toolparam annotations.
  • Middleware — Inject custom logic before/after completions or tool execution.
  • Job Scheduling — Define cron-style jobs that run automatically within agents.
  • Hooks & API Exposure — Expose agent methods as HTTP endpoints using @hook.
  • Observability — Built-in logging of agent actions, usage, and error handling.
  • MagmaDeploy — One-click deployment of agents to the hosted MagmaDeploy platform.

Use cases

  • Add a search tool to an agent for database queries.
  • Validate user messages with middleware before LLM calls.
  • Run daily cleanup tasks via scheduled jobs.
  • Expose a notification handler as a REST endpoint.

Magma | Open Source Typescript Framework for Building AI Agents vs alternatives

Magma | Open Source Typescript Framework for Building AI AgentsFineSuperAGI CloudPocketenvBuildShip
Best forLow-opinion AI agent frameworkCode-first AI agent developmentManaged autonomous agent hostingSandbox runtime for agentsVisual backend building
PricingOpen sourceFreeFreeFreeFree
DevHunt upvotes2754373118
LaunchedOct 2025Jan 2023Jan 2023Apr 2026Jan 2023

Magma | Open Source Typescript Framework for Building AI Agents FAQ

How do I install Magma?+

Run `npm i @pompeii-labs/magma` to add the package to your project.

Can I use Magma with any LLM provider?+

Yes, you can configure OpenAI, Anthropic, or Groq via the providerConfig.

What is the purpose of @tool decorators?+

They expose class methods as callable tools that the agent can invoke during execution.

How does middleware affect agent flow?+

Middleware can run before or after completions and tool calls, allowing logging, validation, or error handling.

Is Magma free to use and self-host?+

Magma is Apache 2.0 licensed and can be self-hosted at no cost; a hosted option is available on MagmaDeploy.

How are scheduled jobs defined?+

Use the @job decorator with a standard cron expression; jobs are static methods that run without an agent instance.

Summarized by DevHunt from github.com · Sep 28, 2026. Details may change; check the official site.