open-index/open-npm huggingface dataset:
npm package: @gdrl/mastra-logging
Description: Generic Mastra agent run logging helpers
Latest version: 0.2.0

# @gdrl/mastra-logging

Generic Mastra agent run logging helpers.

This package owns the agent lifecycle hook, event normalization, and optional
pricing calculation. Apps remain responsible for:

- extracting any context they care about from `RequestContext`
- mapping normalized runs into their own storage shape
- persisting records in their own database

The intended usage pattern is:

1. create one logging client for the app
2. create an app-local `Agent` class via `createLoggedAgentClass`
3. define agents with `new Agent({ ..., logging: ... })`
4. invoke agents normally with `.generate()` / `.stream()` / `.network()`
npm package: @gdrl/mastra-programmatic-tool-calling
Description: Programmatic tool calling for Mastra agents - run Python in Daytona sandbox with tool execution on Mastra server
Latest version: 0.1.0

# @gdrl/mastra-programmatic-tool-calling

Programmatic tool calling for Mastra agents. The agent gets one tool (`ptc_execute`) and writes Python code that orchestrates multiple tool calls with logic (loops, conditionals, aggregations). Code runs in a Daytona sandbox; tool execution happens on the Mastra server. No HTTP endpoints required.

## Install

```bash
npm install @gdrl/mastra-programmatic-tool-calling
```

## Usage

```typescript
import { createPtcClient } from "@gdrl/mastra-programmatic-tool-calling";
import { weatherTool, timeTool } from "./tools";

const ptcClient = createPtcClient({
  tools: { weather: weatherTool, time: timeTool },
  daytonaApiKey: process.env.DAYTONA_API_KEY!,
  daytonaApiUrl: process.env.DAYTONA_API_URL,
  debug: true, // verbose logs of sandbox, tool calls, replay
});

// Add to any Mastra agent
const agent = new Agent({
  tools: {
    ptc_execute: ptcClient.agent_ptc_tool(),
  },
  instructions: ptcClient.agent_ptc_prompt(),
  // ...model, etc.
});
```

## Test Agent

Run the Mastra server with the PTC test agent (uses `get_quote`, `get_time`, `echo`):

```bash
npm run dev:mastra
```

Requires `DAYTONA_API_KEY` and optionally `DAYTONA_API_URL`. Set `PTC_DEBUG=1` for verbose execution logs.