npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

agentic.md

v0.1.1

Published

Build AI Agents and Agentic Workflows in Markdown

Downloads

6,978

Readme

agentic.md Build AI Agents & Agentic Workflows in Markdown

License PRs Welcome Discord GitHub Stars

Define, visualize, and execute AI Agents and Agentic Workflows using Markdown and Mermaid diagrams. Seamlessly integrates with the Drivly AI ecosystem.

Define an Agent in Markdown

# Customer Support Agent

## Description
Handles customer inquiries and resolves common issues

## Properties
- name: Amy
- role: Customer Support Agent
- integrations: chat, slack, email, zendesk, shopify

## Workflow

```mermaid
stateDiagram-v2
    [*] --> Idle
    Idle --> ProcessingInquiry: onMessageReceived
    ProcessingInquiry --> ResolvingIssue: issueIdentified
    ProcessingInquiry --> EscalatingIssue: complexIssueDetected
    ResolvingIssue --> Idle: issueResolved
    EscalatingIssue --> Idle: escalationCompleted

Generate and Use an Agent

import { createAgentFromMarkdown } from 'agentic.md'
import fs from 'fs'

// Load markdown file
const markdown = fs.readFileSync('./customer-support-agent.md', 'utf-8')

// Create agent from markdown
const customerSupportAgent = createAgentFromMarkdown(markdown)

// Use the agent
customerSupportAgent.onMessageReceived({
  from: 'customer@example.com',
  content: 'I need help with my recent order'
})

Generate XState Machines from Mermaid Diagrams

import { createWorkflowFromMarkdown } from 'agentic.md'
import { interpret } from 'xstate'
import fs from 'fs'

// Load markdown with Mermaid state diagram
const markdown = fs.readFileSync('./support-workflow.md', 'utf-8')

// Generate XState machine from Mermaid diagram
const machine = createWorkflowFromMarkdown(markdown)

// The generated machine structure:
// {
//   id: 'workflow',
//   initial: 'Idle',
//   states: {
//     Idle: {
//       on: { onMessageReceived: 'ProcessingInquiry' }
//     },
//     ProcessingInquiry: {
//       on: {
//         issueIdentified: 'ResolvingIssue',
//         complexIssueDetected: 'EscalatingIssue'
//       }
//     },
//     ResolvingIssue: {
//       on: { issueResolved: 'Idle' }
//     },
//     EscalatingIssue: {
//       on: { escalationCompleted: 'Idle' }
//     }
//   }
// }

// Use the machine with XState
const service = interpret(machine)
  .onTransition(state => console.log(state.value))
  .start()

// Send events to the state machine
service.send('onMessageReceived')

Define a Workflow in Markdown

# Order Processing Workflow

## Description
Handles the end-to-end order processing flow

## Workflow

```mermaid
stateDiagram-v2
    [*] --> Idle
    Idle --> Processing: ORDER_RECEIVED
    Processing --> Completed: COMPLETED
    Processing --> Failed: FAILED
    Completed --> [*]
    Failed --> [*]

Compose Multiple Workflows

import { createWorkflowFromMarkdown, composeWorkflows } from 'agentic.md'
import fs from 'fs'

// Load multiple workflow definitions
const orderWorkflow = createWorkflowFromMarkdown(
  fs.readFileSync('./order-workflow.md', 'utf-8')
)

const paymentWorkflow = createWorkflowFromMarkdown(
  fs.readFileSync('./payment-workflow.md', 'utf-8')
)

// Compose workflows into a single state machine
const composedWorkflow = composeWorkflows({
  orders: orderWorkflow,
  payments: paymentWorkflow
})

// Use the composed workflow
const service = interpret(composedWorkflow).start()

Integration with Drivly AI Ecosystem

import { createAgentFromMarkdown } from 'agentic.md'
import { AI } from 'ai'

// Create agent from markdown
const agent = createAgentFromMarkdown('./agent.md')

// Use with AI
const workflow = AI({
  processCustomerInquiry: async ({ ai, event }) => {
    const response = await agent.processInquiry(event.message)
    return response
  }
})

Features

  • Markdown-First Development: Define agents and workflows in plain Markdown
  • Mermaid → XState: Generate state machines directly from Mermaid diagrams
  • AI Agent Generation: Create autonomous agents from Markdown definitions
  • Composable Architecture: Build complex systems from simple components
  • TypeScript Support: Full type safety and autocompletion