Documentation

orqAgent

Everything you need to create, configure, and integrate AI agents into your product — without writing infrastructure code.

Introduction

orqAgent is a no-code platform that lets you build custom AI agents powered by models like Claude, GPT-4, and Gemini. Each agent has its own personality, knowledge base, guardrails, and REST API endpoint — ready to embed in any product in minutes.

Custom agents

Configure model, tone, system prompt, and persona

Knowledge base

Upload PDFs and text files — the agent cites them automatically

REST API

Call any agent from your app with a single HTTP request

Quick Start

From sign-up to your first API call in under 5 minutes.

1

Create your account

Go to orqAgent and sign up for a free account. No credit card required.
2

Create your first agent

In the Dashboard, click New Agent. Give it a name, pick a model (Claude Haiku is free-tier friendly), and write a system prompt describing its purpose. Click Create.
3

Test it in the Playground

Open your agent and go to the Playground tab. Send a message and verify the response quality. Tweak the system prompt until you're happy.
4

Generate an API key

Navigate to API Keys and click Create key. Copy the key — it's shown only once.
5

Make your first API call

Use the agent ID from its settings page and your API key:
bash
curl -X POST https://your-domain.com/api/agents/{agent_id}/run \
  -H "Content-Type: application/json" \
  -H "X-API-Key: orq_your_api_key" \
  -d '{"user_input": "Hello!"}'

Creating an Agent

An agent is the core building block. It bundles a model, a personality, and optional capabilities (knowledge base, guardrails, rate limits) into a single deployable unit.

Basic settings

FieldTypeDescription
NamerequiredstringDisplay name — used in the dashboard and analytics.
DescriptionstringShort description of what the agent does.
ModelrequiredenumLLM to use: Claude Haiku / Sonnet / Opus, GPT-4, Gemini 2.0 Flash.
TemperaturefloatCreativity level — 0 is deterministic, 1 is most creative. Default 0.7.
Max tokensintegerMaximum tokens in a single response. Default 1024.
System promptrequiredtextCore instructions the model always follows. This is the heart of your agent.

Persona fields

Persona fields let you shape how the agent behaves without cluttering the system prompt.

FieldTypeDescription
RolestringThe agent's job title, e.g. "Customer Support Specialist".
ToneenumProfessional · Friendly · Concise · Technical · Creative
LanguagestringLanguage the agent responds in (e.g. "French", "Spanish").
ConstraintstextHard rules — e.g. "Never discuss competitors. Always end with a CTA."
Welcome messagetextFirst message shown in the Playground and in embedded widgets.

Advanced options

FieldTypeDescription
Response formatenumtext · markdown · json · bullet_points — controls output structure.
JSON schematextWhen format is JSON, paste a JSON Schema to enforce the response shape.
Rate limit/minintegerMaximum calls per minute from a single session.
Rate limit/dayintegerMaximum calls per day across all sessions.
Max tokens/responseintegerOverrides the global max_tokens for this agent's API responses.
Tip:Start with a detailed system prompt. Then move repeated instructions to the Constraints field so the system prompt stays focused on the agent's main purpose.

Playground

The Playground is a fully-featured chat interface wired directly to your agent — same model, same system prompt, same knowledge base as the live API. Use it to iterate on prompts before going to production.

Persistent sessionsEach browser session has its own conversation history — the agent remembers context across turns.
KB indicatorA database icon appears on any message where the agent pulled context from the knowledge base.
Reset conversationClick "New session" to start fresh without clearing the conversation history.
Real-time metricsToken counts and latency are shown per-run in the Analytics tab once you've made calls.
Note:Playground calls count against your monthly quota just like API calls — they're real runs and appear in Analytics.

Knowledge Base

Upload documents and your agent automatically retrieves the most relevant chunks for each user question. This is done via retrieval-augmented generation (RAG) — no manual prompt engineering required.

Supported formats

.pdf.txt.markdown.csv

How it works

01.Document is uploaded and split into overlapping chunks (~500 tokens each).
02.On every agent call, the user's message is compared to all chunks using keyword scoring.
03.The top-scoring chunks are injected into the system prompt as context.
04.The agent can then cite specific facts from the document in its response.
Tip:You can upload multiple documents. The agent will search across all of them and always cite the most relevant chunks. Analytics shows chunks_injected per run.

API Keys

API keys let your backend or external tools call any of your agents over HTTP without going through the dashboard UI.

Creating a key

1. Go to API Keys in the sidebar.

2. Click Create key and enter a descriptive name (e.g. "Production backend").

3. Copy the key immediately — it starts with orq_ and is shown only once.

Warning:Store the key in an environment variable, never in client-side code or version control. If a key is compromised, revoke it from the dashboard and generate a new one.

Key properties

FieldTypeDescription
PrefixstringFirst 10 characters — shown in the dashboard to identify a key.
call_countintegerTotal number of API calls made with this key.
last_used_atdatetimeTimestamp of the most recent call.
expires_atdatetimeOptional expiry date. Expired keys are automatically rejected.
is_activebooleanDisable a key temporarily without revoking it.

REST API Reference

Every agent exposes a simple HTTP endpoint. Authenticate with your API key in theX-API-Key header.

POST/api/agents/{agent_id}/runRequires API key

Send a message to an agent and receive a response. The conversation history is automatically maintained when you reuse the same session_id.

Authentication

http
X-API-Key: orq_your_api_key_here

Request body

FieldTypeDescription
user_inputrequiredstringThe user's message. 1–10 000 characters.
session_idstringConversation session identifier (max 128 chars). Pass the same value across turns to maintain history. Omit for one-shot calls.

Response body

FieldTypeDescription
iduuidUnique run identifier.
agent_responsestringThe agent's reply text.
session_idstringEcho of the session_id used for this run.
prompt_tokensintegerTokens consumed by the input (system prompt + history + user message).
completion_tokensintegerTokens in the agent's response.
coststringEstimated USD cost for this run (6 decimal places).
latency_msintegerWall-clock latency of the LLM call in milliseconds.
statusstring"success" | "error" | "timeout" | "rate_limited"
used_knowledge_basebooleanTrue if document chunks were injected into this run.
chunks_injectedintegerNumber of KB chunks included in the context.

Example — cURL

bash
curl -X POST https://your-domain.com/api/agents/YOUR_AGENT_ID/run \
  -H "Content-Type: application/json" \
  -H "X-API-Key: orq_your_api_key" \
  -d '{
    "user_input": "What is your return policy?",
    "session_id": "user-abc-session-1"
  }'

Example — JavaScript (fetch)

javascript
const response = await fetch(
  `https://your-domain.com/api/agents/${AGENT_ID}/run`,
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-API-Key": process.env.ORQ_API_KEY,
    },
    body: JSON.stringify({
      user_input: userMessage,
      session_id: sessionId,   // keep across turns for memory
    }),
  }
);

const data = await response.json();
console.log(data.agent_response);

Example — Python

python
import httpx, os

BASE_URL = "https://your-domain.com"
AGENT_ID = "your-agent-id"
API_KEY  = os.environ["ORQ_API_KEY"]

def chat(user_input: str, session_id: str) -> str:
    r = httpx.post(
        f"{BASE_URL}/api/agents/{AGENT_ID}/run",
        headers={"X-API-Key": API_KEY},
        json={"user_input": user_input, "session_id": session_id},
        timeout=30,
    )
    r.raise_for_status()
    return r.json()["agent_response"]

reply = chat("Summarise your pricing plans.", "session-42")
print(reply)

Public agent endpoint (no auth)

If you've toggled Public on an agent, it can be called without an API key. Usage is still billed to your account.

POST/api/public/agents/{agent_id}/chatNo auth required
bash
# No API key needed — works from any browser or server
curl -X POST https://your-domain.com/api/public/agents/YOUR_AGENT_ID/chat \
  -H "Content-Type: application/json" \
  -d '{"user_input": "Hello!"}'

Error codes

FieldTypeDescription
400Bad RequestInput blocked by guardrail, or invalid request body.
401UnauthorizedMissing or invalid API key.
403ForbiddenAgent is private, disabled, or not owned by this key's user.
404Not FoundAgent ID does not exist.
429Too Many RequestsRate limit exceeded (per-minute or per-day).
502Bad GatewayLLM provider returned an error — retry with exponential backoff.

Guardrails

Guardrails are automatic input filters that block toxic, harmful, or off-topic messages before they reach the LLM — protecting your quota and your users.

What gets blocked

Requests containing explicit violence or self-harm instructions
Prompt injection attempts ("ignore your previous instructions")
Profanity and hate speech above a configured threshold

When a guardrail fires

The API returns HTTP 400 with a clear error message. The run is still logged with blocked_by_guardrail: true so you can track block rates in the Analytics tab.

json
{
  "error": "Input blocked by content guardrail",
  "code":  "GUARDRAIL_BLOCKED"
}

Plans & Limits

Free$0 / month
  • 3 agents
  • 500 runs / month
  • All models available
  • Knowledge base (up to 5 docs)
  • API key access
  • Community support
Pro$29 / month
  • Unlimited agents
  • 10 000 runs / month
  • All models available
  • Knowledge base (unlimited docs)
  • Priority support
  • Advanced analytics
Note:When you hit the monthly run limit the API returns HTTP 429 with code QUOTA_EXCEEDED. Upgrade to Pro from the Pricing page.

Ready to build?

Create your first agent in under 2 minutes, no credit card required.

Start for free