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"
}

Integrations

Integrations connect an agent to a messaging channel or a knowledge source. Every integration is configured per agent from its detail page, and all credentials (tokens, passwords, OAuth secrets) are stored AES-256-GCM encrypted — they are never returned to the browser once saved.

Available integrations

IntegrationTypeHow it connects
SlackChannelOAuth install — the bot replies to mentions and channel messages.
TelegramChannelPaste a BotFather token — the webhook is registered automatically.
WhatsAppChannelMeta Cloud API — enter phone number ID + access token.
Email InboxChannelIMAP polling + SMTP replies, with a human approval queue.
NotionKnowledgeOAuth — syncs page/database content into the knowledge base.
Google DocsKnowledgeOAuth — imports selected documents into the knowledge base.

Connecting a channel

1. Open your agent and go to the Integrations tab.

2. Pick a channel and follow its flow — OAuth for Slack/Notion/Google, or paste a token for Telegram/WhatsApp.

3. Once connected, incoming messages run through the same model, system prompt, and knowledge base as the API.

Note:Channel and webhook callbacks live under /api/integrations/… on the API host — the dashboard wires these up for you, so you normally don’t paste URLs by hand (Telegram’s webhook, for example, is set automatically on connect).
Warning:Messages handled through any channel are real agent runs: they consume credits and appear in Analytics exactly like API calls.

Email Inbox

The Email Inbox lets an agent watch a mailbox: it reads incoming mail over IMAP, drafts a reply with the agent, and (optionally) sends it back over SMTP. It is configured per agent under the Email Inbox tab — no environment variables required, all credentials are stored encrypted.

Warning:The SMTP server is configured per integration (the fields in the Email Inbox tab), not via global SMTP_* environment variables. The global SMTP_* settings are only used by the unrelated Scheduled agents email output.

How it works

01.A background worker runs every minute and polls each active inbox whose check interval has elapsed (e.g. every 5 min). You can also force a poll any time with the « Relever maintenant » button.
02.Only unread (UNSEEN) messages are fetched. The agent then drafts a reply.
03.If auto-reply is OFF (default) the draft lands in the approval queue with status pending_approval — you review, optionally edit, then Send or Ignore. If auto-reply is ON, the reply is sent immediately over SMTP.

Built-in safety filters

So the agent doesn’t reply to the wrong things, several guards are always on:

Senders that look automated (no-reply, noreply, mailer-daemon, bounce, postmaster, notifications, …) are skipped.
Messages older than 24 h are skipped — so connecting an inbox never replies to your whole archive.
Each message is processed once (idempotent on the email Message-ID).
Hosts that resolve to a private/loopback address are blocked (SSRF guard) — a localhost mail server won't work; test against a real provider.
Tip:Need finer control? Add filter rules matching on thefrom,subject, orbody fields to force process or ignore on specific messages.

Configuration fields

FieldTypeDescription
imap_host / imap_portrequiredstring / intIncoming (read) server. Port 993 = implicit SSL (the only encrypted mode supported).
imap_user / imap_passwordrequiredstringMailbox login. For Gmail/Outlook use an app password, not the account password.
smtp_host / smtp_portrequiredstring / intOutgoing (send) server. Port 587 with STARTTLS (port 465 / implicit SSL is not supported).
smtp_user / smtp_passwordrequiredstringSend login — usually the same as IMAP.
from_namestringDisplay name on replies, e.g. "Support orqAgent". Max 128 chars.
check_interval_minutesintegerPolling cadence, 1–60. The per-minute worker only polls once this has elapsed. Default 5.
auto_replybooleanSend without review. OFF (default) = drafts go to the approval queue.
reply_requires_approvalbooleanKeep a human in the loop. Leave ON while testing. Default ON.
filter_rulesarrayOptional rules: { field: from|subject|body, contains, action: process|ignore }.

Provider settings

ProviderIMAP hostSMTP hostPorts
Gmail / Google Workspaceimap.gmail.comsmtp.gmail.com993 / 587
Outlook / Microsoft 365outlook.office365.comsmtp.office365.com993 / 587
Genericyour provider's IMAPyour provider's SMTP993 / 587
Warning:Gmail requires an app password — a normal password is rejected. (1) Enable 2-Step Verification on the account. (2) Google Account → Security → App passwords → generate a 16-character code. (3) Use the full email as the username and that 16-char code as both the IMAP and SMTP password.

Setting it up

1

Fill in IMAP & SMTP

Open the agent’s Email Inbox tab and enter the hosts/ports above plus your credentials (an app password for Gmail/Outlook).
2

Test the IMAP connection

Click « Tester la connexion IMAP » — expect Connection successful with a message count. This validates host, port, and credentials before you save.
3

Save with approval ON

Leave Auto-reply OFF and Approval required ON, then Save.
4

Send a test email & poll

Send a fresh email to that mailbox from a real personal address (not a no-reply@), then click « Relever maintenant » (or wait for the next interval). The message appears under En attente with a suggested reply.
5

Review & send

Edit the draft if needed, then Send and confirm the reply arrives. Once you’re happy, turn on Auto-reply to skip manual approval.

Troubleshooting

FieldTypeDescription
AUTHENTICATIONFAILEDIMAP errorUsing the account password instead of an app password, or 2-Step Verification not enabled.
Host not allowedSSRF guardYou pointed it at localhost / an internal host. Use a public provider.
Connects but no emailsEmpty queueThe message is read / older than 24 h, the sender looks like no-reply, or the interval hasn't elapsed (use « Relever maintenant »).
Drafts created but Send failsSMTPCheck the SMTP host/port (587 + STARTTLS) and that the SMTP credentials are filled in.

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