NewOpenAgents/context/development/ai/mastra-ai/concepts/core.md
cclohmar 0764127e46 chore: extract OpenAgents Control (OAC) with local customizations
Snapshot of the installed OAC framework (/app/.opencode) including Claus's custom agents:
- agent/OpenArchitect.md (Aiden, the architect)
- agent/subagents/openagent.md (GMS sub-agent builder)
- agent/core/openagent.md, agent/core/opencoder.md (customized)
- agent/subagents/{code,core,development,system-builder}/*
- command/, context/, skills/, tool/, README.md, env.example

Excluded runtime artifacts: node_modules/, bin/opencode (184MB binary), lockfiles.
2026-10-12 08:24:00 +00:00

1.2 KiB

Concept: Mastra Core

Purpose: Central orchestration layer for AI agents, workflows, and tools in this project.

Last Updated: 2026-01-09


Core Idea

Mastra is the central hub that wires together agents, tools, workflows, and observability. It provides a unified interface for executing complex AI tasks with built-in persistence and logging.

Key Points

  • Centralized Config: All components are registered in src/mastra/index.ts.
  • Persistence: Uses LibSQLStore (SQLite) for storing traces, spans, and workflow states.
  • Observability: Built-in tracing and logging (Pino) for every execution.
  • Modular Design: Agents, tools, and workflows are defined separately and composed in the main instance.

Quick Example

import { Mastra } from '@mastra/core/mastra';
import { agents, tools, workflows } from './components';

export const mastra = new Mastra({
  agents,
  tools,
  workflows,
  storage: new LibSQLStore({ url: 'file:./mastra.db' }),
});

Reference: src/mastra/index.ts Related:

  • concepts/workflows.md
  • concepts/agents-tools.md
  • lookup/mastra-config.md