Skip to main content

Using AI Agents

AI-powered development tools can significantly accelerate your workflow when building Harper applications. Whether you want a dedicated assistant or prefer using your favorite LLM, Harper provides the tools and context needed to make AI an effective part of your development process.

Harper Agent

The harper-agent is a purpose-built AI assistant designed specifically for Harper development. It understands the Harper ecosystem and can help you with tasks ranging from project setup to debugging.

https://github.com/HarperFast/harper-agent

Features

  • Application Creation: Scaffold full Harper applications from natural language descriptions.
  • Code Generation: Write schema definitions, custom functions, and integration code.
  • Diagnosis and Running: Run your application and let the agent diagnose and fix errors.
  • Browser Control: The agent can even interact with a browser to help you test and manage your applications.

Installation

Install the Harper Agent globally using npm:

npm install -g @harperfast/agent

Usage

To start the agent, simply run:

harper-agent

On first run, it will help you configure your preferred AI model (Gemini, Claude, ChatGPT, or Ollama). Once configured, you can interact with it directly from your terminal.


Skills: Empowering General-Purpose Agents

If you prefer using general-purpose AI tools like Claude, ChatGPT, GitHub Copilot, or Cursor, you can provide them with Harper-specific "Skills" to improve their accuracy and performance.

What are Skills?

Skills are a collection of Harper-specific context, documentation, and best practices. When an AI agent has access to these skills, it is much more likely to generate high-quality, idiomatic Harper code and follow current best practices.

Getting Skills

The easiest way to get Harper skills is by using the create-harper bootstrapper. When you create a new Harper project, a skills/ directory is automatically included.

npm create harper@latest

You can also browse our ever evolving library of skills here:

https://github.com/HarperFast/create-harper/tree/main/templates-shared/all/skills

How to use Skills

Once you have a skills/ directory in your project, you can use it with your favorite AI tools:

  • Chat-based AI (Claude/ChatGPT): Upload the markdown files from the skills/ directory to your conversation to provide the AI with immediate context.
  • IDE Extensions (Cursor/Copilot): Ensure these tools are indexing your project. They will automatically pick up the context from the skills/ directory to provide better completions and chat responses.
  • Custom Agents: If you are building your own AI-powered workflows, you can point your agent to these skills to give it specialized knowledge of Harper.

By leveraging these AI tools, you can move from idea to a running Harper application faster than ever before.