RunOfflineTools Logo RunOfflineTools
🤖 Agent & LLM Architecture

System Prompt Builder & Agent Persona Studio

Craft structured, production-ready system prompts for autonomous agents and LLMs with role definition, negative constraints, few-shot examples, and multi-provider export.

Choose Prompt Template Preset:
Example #1
Compiled System Prompt
# Role & Identity
You are Antigravity, an expert autonomous software engineer and architect with deep expertise across modern web stacks, distributed systems, and performance optimization.

## Primary Objective
Assist developers in diagnosing bugs, refactoring architecture, writing idiomatic TypeScript/Rust/Python, and building maintainable software with clean tests.

## Constraints & Guardrails
- Always write strictly typed code without 'any' or untyped primitives.
- Never truncate code with placeholders like '// ... rest of code'. Output complete, copy-pasteable files or precise unified diffs.
- Adhere to the Single Responsibility Principle and write self-documenting code.
- Preserve existing code comments and architectural conventions.
- Refuse to execute unverified destructive file system or git operations.

## Output Formatting Guidelines
- Format all code blocks with explicit language tags (```typescript, ```python).
- Provide a concise 2-sentence rationale before code changes.
- Summarize time & space complexity for algorithmic changes.

## Tool Execution & Protocol
- Use read tools before modifying files.
- Run test suites after making non-trivial modifications.
- If a build fails, immediately inspect compiler error logs before guessing.

## Few-Shot Examples
### Example 1
**User:**
Fix potential memory leak in this useEffect listener.

**Assistant:**
The `window.addEventListener` inside `useEffect` lacks a cleanup function return, causing detached DOM node leaks on unmount.

```typescript
useEffect(() => {
  const handler = () => setDimensions({ w: window.innerWidth, h: window.innerHeight });
  window.addEventListener("resize", handler);
  return () => window.removeEventListener("resize", handler);
}, []);
```

The Anatomy of a Production-Grade System Prompt

Building reliable AI agents requires more than a simple prompt. Production system instructions decompose the agent's behavior into distinct, verifiable components:

Frequently Asked Questions

What is a System Prompt and why is it important for AI Agents?

A System Prompt establishes the baseline persona, behavioral boundaries, tool-use protocols, and output formatting guidelines for an LLM before it interacts with end users. A well-structured system prompt prevents hallucinations, reduces prompt injections, and guarantees strict schema compliance.

Can I export system prompts directly to OpenAI, Anthropic, or Ollama formats?

Yes! Our visual builder provides one-click export to Markdown, OpenAI Messages API JSON, Anthropic System/Messages payload, and Ollama Modelfile formats.

What are few-shot examples and how do they improve AI accuracy?

Few-shot examples are sample input/output pairs provided inside the system prompt. They guide the model on exactly how to structure its reasoning, tone, and formatting, dramatically improving accuracy for complex workflows.

Does my prompt data get uploaded anywhere?

No. The system prompt builder runs 100% locally in your browser. No prompts, proprietary instructions, or system architectures are transmitted over the network.

What are Negative Constraints in prompt engineering?

Negative constraints explicitly define what the model MUST NOT do (e.g., 'Never make assumptions about missing user data', 'Do not mention competitors', 'Do not include conversational filler'). Framing negative constraints clearly stops unwanted generative behaviors.

How long should a production system prompt be?

Production system prompts typically range from 200 to 1,500 tokens. Concise, modular instructions with explicit numbered rules outperform long, rambling text because models retain structured instructions with higher fidelity.