Agents
Providers & models, system prompt, history window, activate/deactivate, daily budget.
An agent is a reusable chat configuration: which provider and model answers, what system prompt it uses, which knowledge bases it can search, which connectors it can call tools on, and what its limits are. An organization can have several agents — a support agent and an internal agent, say, each with its own knowledge base and system prompt.
Create an agent
In the console at app.harnix.vn, open Agents and click New agent.
Fill in Name, choose a Provider, and enter the Model, API key and, if you need one, a Base URL.
Write the System prompt, attach one or more Knowledge bases, and set the optional Behaviour fields (Temperature, Top-p, Max iterations, Daily token budget).
Click Create agent. The agent is active right away and appears in the public agent list your widget reads.
Provider & model
Two providers are supported: OpenAI-compatible (stored as openai) and
Ollama (ollama). OpenAI-compatible covers any endpoint that speaks the
OpenAI API — set Base URL to point at your own. Model is that
provider's model name (for example gpt-4o-mini, llama3.1:8b).
The API key is the credential used to call the provider. It is encrypted at rest and never shown again: the console only tells you Key set · encrypted at rest or No key.
Temperature and Top-p are optional sampling parameters, passed straight through to the provider when set. Max iterations caps how many model calls one answer may take while it uses tools.
System prompt
The System prompt is inserted before every conversation, verbatim. It's optional — leave it empty and the agent uses the model's default behavior.
History window
Each chat turn reads back part of the prior conversation so the model has context. The window stops at whichever limit is hit first:
| Limit | Default |
|---|---|
Messages (history_max_turns) | 20 |
Characters (history_max_chars) | 24,000 |
The console doesn't expose these two limits; if an agent needs a different window, contact support. A conversation longer than the window is still stored in full — only the part read into each chat turn is truncated.
Knowledge bases and tools
Attach at least one knowledge base and the agent automatically gets the
knowledge_search tool — there is no flag to flip (see
Tools). Built-in tools (such as ask_user, enabled by
default for new agents) and connectors (remote MCP servers) are managed on
the agent's Tools tab, where each tool has its own on/off switch — see
Tools and Connectors.
Daily token budget
Daily token budget is a ceiling on the tokens (input + output) this
agent may use in one UTC day. Leave it empty for no per-agent limit (the
organization can still have its own overall ceiling, see
Usage & quotas); when set, the minimum is
1,000. Once the budget is reached, a new run for that agent is rejected
with budget_exceeded (see Errors), and a run
already in progress is stopped before its next call to the model.
Usage tab
An agent's page has its own Usage tab: today's token budget for this agent (with a link to edit it in Usage & quotas), then the same usage report as the org-wide Usage page — runs and tokens over 7/30/90 days, a daily chart, and a breakdown by model or run status — narrowed to this one agent (no "Agent" breakdown, since every row is already it). These numbers never change over time; only an older run's step-by-step detail (its trace) is removed per the organization's retention setting — see Runs & traces.
Activate / deactivate
On an agent's page, Deactivate is a soft delete: the agent disappears
from the public agent list (GET /v2/agents — the widget can no longer
pick it), but its run and conversation history stays visible in the
console. Activate brings it back. There is no hard delete for an agent.
Update an agent
Open the agent and click Edit configuration, change what you need, then Save changes. A change applies to the next run; a run already in progress finishes with the configuration it started with. The stored API key stays as it is unless you click Replace key (and enter a new one) or Remove key (the agent then relies on the provider's default).