Skip to main content

Overview

The devgraph-service block defines a service in your project graph. This is the primary building block for DevGraph.

Syntax

```devgraph-service
name: my-service
type: node
commands:
  dev: npm run dev
  build: npm run build
depends:
  - other-service
```

Fields

FieldRequiredDescription
nameYesUnique service identifier
typeYesService type (see below)
commandsNoObject with command definitions
dependsNoArray of service names this depends on

Service Types

TypeDescription
nodeNode.js service
nextjsNext.js application
pythonPython service
goGo service
rustRust service
databaseDatabase service
externalExternal API or service

Examples

Basic service

```devgraph-service
name: api
type: node
```

Service with commands

```devgraph-service
name: web
type: nextjs
commands:
  dev: pnpm dev
  build: pnpm build
  start: pnpm start
```

Service with dependencies

```devgraph-service
name: api
type: node
commands:
  dev: npm run dev
depends:
  - database
  - cache
```

Generated Output

Services appear in:
  • graph.json as nodes
  • summary.md in the services table
  • agents/{name}.md as individual context files
  • system.mmd in the Mermaid diagram