Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions bunjs/rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,9 @@ new_project:
- action: create_file
filename: "README.md"
from: "common/js/bun-readme.md"
- action: copy_dir
from: "common/js/cursor"
to: ".cursor/rules"
filter: "*.mdc"
- action: copy_dir
from: "common/cursor"
to: ".cursor/rules"
filter: "*.mdc"
- action: create_file
filename: "AGENTS.md"
from: "common/js/AGENTS.md"
- action: create_file
filename: ".editorconfig"
template: "common/editorconfig"
Expand Down
29 changes: 29 additions & 0 deletions common/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Agentuity Configuration Guidelines

This guide provides instructions for working with Agentuity configuration files and project setup.

## 1. Agentuity Configuration File

The `agentuity.yaml` file is used by Agentuity to configure the AI Agent project. You should NOT suggest edits to this file unless specifically requested, as it contains critical project configuration managed by the Agentuity platform.

## 2. Project Structure

Follow the established project structure for your chosen runtime:

- **Python projects**: Use the `agentuity_agents/` directory for agent implementations
- **JavaScript/TypeScript projects**: Use the `src/agents/` directory for agent implementations
- **Configuration files**: Keep `agentuity.yaml`, `.env` files, and other configuration in the project root

## 3. Development Workflow

- Use `agentuity dev` to start the development server
- Use `agentuity agent create` to scaffold new agents
- Use `agentuity deploy` to deploy your agents to production
- Follow the runtime-specific guidelines in your project's AGENTS.md file

## 4. Environment Management

- Use `.env.development` for development-specific environment variables
- Use `.env.production` for production environment variables
- Never commit sensitive credentials to version control
- Use the Agentuity Console for managing secrets in production
9 changes: 0 additions & 9 deletions common/cursor/agentuity.mdc

This file was deleted.

35 changes: 24 additions & 11 deletions common/js/cursor/sdk.mdc → common/js/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
---
description: Agentuity JavaScript SDK API Reference
globs: "src/agents/**/*.ts"
alwaysApply: false
---
# Agentuity JavaScript/TypeScript Agent Development

# Agentuity JavaScript SDK
This guide provides comprehensive instructions for developing AI agents using the Agentuity platform with JavaScript and TypeScript.

The Agentuity JavaScript SDK provides a powerful framework for building AI agents in JavaScript and TypeScript. This cursor rules file helps you navigate the SDK's core interfaces and methods.
## 1. Agent Development Guidelines

## Core Interfaces
- Prefer using the `agentuity agent create` command to create a new Agent
- Prefer loading types from the node modules package `@agentuity/sdk` in the node_modules folder
- The file should export a default function
- Prefer naming the default function Agent or the name of the Agent based on the context of the Agent description
- All code should be in TypeScript format
- Use the provided logger from the `AgentContext` interface such as `ctx.logger.info("my message: %s", "hello")`

### Example Agent File

```typescript
import type { AgentRequest, AgentResponse, AgentContext } from "@agentuity/sdk";

export default async function Agent(req: AgentRequest, resp: AgentResponse, ctx: AgentContext) {
return resp.json({hello: 'world'});
}
```

## 2. Core Interfaces

### AgentHandler

Expand Down Expand Up @@ -57,7 +70,7 @@ The `AgentContext` interface provides access to various capabilities:
- `context.getAgent(params)`: Gets a handle to a remote agent
- `context.tracer`: OpenTelemetry tracing

## Storage APIs
## 3. Storage APIs

### Key-Value Storage

Expand All @@ -75,7 +88,7 @@ Access through `context.vector`:
- `context.vector.search(name, params)`: Searches for vectors
- `context.vector.delete(name, ...ids)`: Deletes vectors

## Logging
## 4. Logging

Access through `context.logger`:

Expand All @@ -85,7 +98,7 @@ Access through `context.logger`:
- `context.logger.error(message, ...args)`: Logs an error message
- `context.logger.child(opts)`: Creates a child logger with additional context

## Best Practices
## 5. Best Practices

- Use TypeScript for better type safety and IDE support
- Import types from `@agentuity/sdk`
Expand Down
36 changes: 0 additions & 36 deletions common/js/cursor/agent.mdc

This file was deleted.

32 changes: 22 additions & 10 deletions common/py/cursor/sdk.mdc → common/py/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
---
description: Agentuity Python SDK API Reference
globs: "agents/**/*.py"
---
# Agentuity Python Agent Development

# Agentuity Python SDK
This guide provides comprehensive instructions for developing AI agents using the Agentuity platform with Python.

The Agentuity Python SDK provides a powerful framework for building AI agents in Python. This cursor rules file helps you navigate the SDK's core interfaces and methods.
## 1. Agent Development Guidelines

## Core Interfaces
- Prefer using the `agentuity agent create` command to create a new Agent
- Prefer importing types from the `agentuity` package
- The file should define an async function named `run`
- All code should follow Python best practices and type hints
- Use the provided logger from the `AgentContext` interface such as `context.logger.info("my message: %s", "hello")`

### Example Agent File

```python
from agentuity import AgentRequest, AgentResponse, AgentContext

async def run(request: AgentRequest, response: AgentResponse, context: AgentContext):
return response.json({"hello": "world"})
```

## 2. Core Interfaces

### Agent Handler

Expand Down Expand Up @@ -58,7 +70,7 @@ The `AgentContext` class provides access to various capabilities:
- `context.tracer`: OpenTelemetry tracing
- Environment properties: `sdkVersion`, `devmode`, `orgId`, `projectId`, etc.

## Storage APIs
## 3. Storage APIs

### Key-Value Storage

Expand All @@ -76,7 +88,7 @@ Access through `context.vector`:
- `await context.vector.search(name, params)`: Searches for vectors
- `await context.vector.delete(name, *ids)`: Deletes vectors

## Logging
## 4. Logging

Access through `context.logger`:

Expand All @@ -86,7 +98,7 @@ Access through `context.logger`:
- `context.logger.error(message, *args, **kwargs)`: Logs an error message
- `context.logger.child(**kwargs)`: Creates a child logger with additional context

## Best Practices
## 5. Best Practices

- Use type hints for better IDE support
- Import types from `agentuity`
Expand Down
34 changes: 0 additions & 34 deletions common/py/cursor/agent.mdc

This file was deleted.

11 changes: 3 additions & 8 deletions nodejs/rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,9 @@ new_project:
- action: create_file
filename: "README.md"
from: "common/js/nodejs-readme.md"
- action: copy_dir
from: "common/js/cursor"
to: ".cursor/rules"
filter: "*.mdc"
- action: copy_dir
from: "common/cursor"
to: ".cursor/rules"
filter: "*.mdc"
- action: create_file
filename: "AGENTS.md"
from: "common/js/AGENTS.md"
Comment on lines +98 to +100
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

LGTM: AGENTS.md creation is correctly added at project root using the JS-specific source.

Placement after README.md and before editorconfig is good. The key names match existing create_file usage (“from”), and the path aligns with common/js assets used elsewhere in this template.

Run this script to verify end-to-end consistency across templates and ensure no legacy Cursor artifacts remain:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Verify AGENTS.md sources exist =="
for f in "common/js/AGENTS.md" "common/py/AGENTS.md" "common/AGENTS.md"; do
  if [[ -f "$f" ]]; then
    echo "OK: $f"
  else
    echo "MISSING: $f" >&2
  fi
done

echo
echo "== Check rules.yaml files include AGENTS.md creation =="
# Show the AGENTS.md create_file blocks in the three templates
for dir in nodejs bunjs python-uv; do
  if [[ -f "$dir/rules.yaml" ]]; then
    echo "-- $dir/rules.yaml --"
    rg -nP -C3 'action:\s*create_file\s*\n\s*filename:\s*"AGENTS\.md"\s*\n\s*(from|template):\s*"(common/(js|py)/AGENTS\.md)"' "$dir/rules.yaml" || echo "AGENTS.md create_file block NOT FOUND in $dir/rules.yaml" >&2
    echo
  fi
done

echo "== Ensure no legacy .cursor/.mdc references remain =="
# Expect: no matches
if rg -nP -C1 '(\.cursor/|\.mdc\b)' ; then
  echo "Found legacy .cursor/.mdc references above. Please remove or update." >&2
else
  echo "OK: No legacy .cursor/.mdc references found."
fi

echo
echo "== Ensure no copy_dir to .cursor/rules remains =="
# Expect: no matches
if rg -nP -C2 'action:\s*copy_dir|\.cursor/rules' -- '*.yaml' ; then
  echo "Found copy_dir/.cursor/rules usage above. Please remove or update." >&2
else
  echo "OK: No copy_dir to .cursor/rules found in YAML."
fi

Length of output: 2501


Missing AGENTS.md in bunjs & python-uv templates

All AGENTS.md sources (common/js/AGENTS.md, common/py/AGENTS.md, common/AGENTS.md) exist and no legacy .cursor/.mdc artifacts remain, but the create_file block is only in nodejs/rules.yaml. The other two language templates need the same addition:

• bunjs/rules.yaml
• python-uv/rules.yaml

Please add, immediately after the README.md step (and before the editorconfig step), in each file:

    - action: create_file
      filename: "AGENTS.md"
      from: "common/js/AGENTS.md"   # use common/py/AGENTS.md in python-uv

For example, in bunjs/rules.yaml:

@@
-   - action: create_file
-     filename: "README.md"
+   - action: create_file
+     filename: "AGENTS.md"
+     from: "common/js/AGENTS.md"
    - action: create_file
      filename: "README.md"

And in python-uv/rules.yaml swap in from: "common/py/AGENTS.md".

🤖 Prompt for AI Agents
In nodejs/rules.yaml lines 98-100 the create_file for AGENTS.md exists;
replicate this in bunjs/rules.yaml and python-uv/rules.yaml by inserting,
immediately after the README.md create_file step and before the editorconfig
step, a create_file block that creates "AGENTS.md" from the common template; for
bunjs use from: "common/js/AGENTS.md" and for python-uv use from:
"common/py/AGENTS.md" so each template adds the AGENTS.md file in the same
position as nodejs.

- action: create_file
filename: ".editorconfig"
template: "common/editorconfig"
Expand Down
11 changes: 3 additions & 8 deletions python-uv/rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ new_project:
- action: delete_file
files:
- "hello.py"
- action: copy_dir
from: "common/cursor"
to: ".cursor/rules"
filter: "*.mdc"
- action: copy_dir
from: "common/py/cursor"
to: ".cursor/rules"
filter: "*.mdc"
- action: create_file
filename: "server.py"
from: "common/py/boot.py"
Expand All @@ -88,6 +80,9 @@ new_project:
- action: create_file
filename: "README.md"
from: "common/py/python-uv-readme.md"
- action: create_file
filename: "AGENTS.md"
from: "common/py/AGENTS.md"
- action: create_file
filename: ".editorconfig"
template: "common/editorconfig"
Expand Down