Skip to content
GitHubDiscord

Setup agents

To create an agent, open the Agents page and click “New Agent”.

Agent list page with new agent button

Fill in the agent details. Every agent has a Mode: Chat for conversational message lists, or Structured for a custom JSON request and response.

Agent configuration form with API endpoint, headers, and Chat mode

  • Name: The name of the agent.
  • Description: Used to refine automatic evaluation and generation for better accuracy in your specific use case.
  • Supported Languages: Add the languages your agent can handle. This affects data generation.
  • Connection Settings:
    • Agent API Endpoint: The URL the Hub POSTs to during scans, evaluations, and playground calls.
    • Headers: Authentication and other custom headers sent with every request.
    • Test connection: Sends a sample payload that matches the current schemas.
  • Mode: Chat or Structured. Switching mode clears the current schema and all request field mappings.

Use Chat for LLM-based chatbots, RAG assistants, and any agent that exchanges a list of messages.

The Hub POSTs a JSON body with a messages array:

{
"messages": [
{ "role": "user", "content": "Hello!" },
{ "role": "assistant", "content": "Hello! How can I help you?" },
{ "role": "user", "content": "What color is an orange?" }
]
}

The endpoint must return a JSON object with a response message. metadata is optional:

{
"response": { "role": "assistant", "content": "An orange is orange." },
"metadata": { "category": "general" }
}

Chat agents start with a default Build history list mapping so later turns receive the full conversation. Remove it if the endpoint should see only the current user message.

Use Structured when the application is not a chatbot: classifiers, extractors, scoring APIs, routing services, or any endpoint that accepts and returns typed JSON.

Select Structured in Mode. The Hub warns that switching clears the current schema and all bindings, then replaces the chat schemas with empty JSON Schema objects you edit yourself.

Ticket classifier form with Structured mode selected

Input Schema and Output Schema are JSON Schema documents. They describe the JSON body the Hub POSTs and the JSON body it expects back.

Input Schema and Output Schema editors for a ticket classifier

Scenarios, dataset generation, and playground calls all use these schemas. Keep them accurate so generated data and checks match the live API.

A support-ticket router. The Hub POSTs the ticket text and expects a category.

Input Schema

{
"type": "object",
"properties": {
"ticket_text": { "type": "string" }
},
"required": ["ticket_text"]
}

Output Schema

{
"type": "object",
"properties": {
"category": { "type": "string" },
"confidence": { "type": "number" }
},
"required": ["category"]
}

Example request

{
"ticket_text": "My debit card was charged twice for the same ATM withdrawal."
}

Example response

{
"category": "card_dispute",
"confidence": 0.91
}

The same shapes appear in scenario input and output fields, so a dataset built for this agent stays compatible with scans and evaluations.

Interaction context controls what the Hub adds to each request from previous turns. Configure it with Request field mappings under the schema editors.

Chat agents default to one mapping that rebuilds the conversation. Structured agents start with none: each call receives only the current input.

Chat schemas and a Build history list mapping from $.response to messages

Mapping typeWhat it doesTypical use
Build history listAppends each turn to a running list in the next requestStateless chat endpoints that need the full messages array
Copy previous responseCopies one value from the previous response into the next requestThread IDs, session IDs, or conversation tokens the agent stores itself

Mapping type help with Copy previous response and Build history list examples

Default Chat mapping: From response $.response → To next request messages.

The second request becomes:

{
"messages": [
{ "role": "user", "content": "First question" },
{ "role": "assistant", "content": "First answer" },
{ "role": "user", "content": "Second question" }
]
}

Use this when the endpoint is stateless and expects the caller to resend the interaction history.

Example: From response $.metadata.thread_id → To next request metadata.thread_id.

Previous response:

{ "metadata": { "thread_id": "abc-123" } }

Next request:

{
"messages": [{ "role": "user", "content": "Next question" }],
"metadata": { "thread_id": "abc-123" }
}

Use this when the agent maintains state itself with a thread ID, session ID, or conversation token. On the first turn the Hub does not send that field; the agent should create it and return it so later turns can copy it forward.

The Giskard Hub authenticates against your agent by sending HTTP headers with every request. Add any header your agent’s authentication scheme requires under Connection Settings → Headers.

Two common patterns:

  • Bearer token (for example, issued by your identity provider):
    • Name: Authorization
    • Value: Bearer <your-token>
  • API key (for example, for an internal gateway):
    • Name: X-API-Key
    • Value: <your-token>

You can add multiple headers if your endpoint requires more than one (for example, a tenant identifier alongside the token).

If you need help wiring up authentication for your agent, the Giskard team will configure it with you during onboarding.

If your agent is served behind a private or self-signed certificate authority (CA), the Hub can be configured to trust it. This is set up at Hub installation time and applies across all agents in the deployment, rather than being configurable per-agent on the form.

The Hub calls the endpoint with the Chat or Structured contract above. If the native API uses a different format, a small translation adapter can sit alongside the Hub and convert between that format and the Hub’s request and response shape.

From the agent form’s point of view, nothing changes. The Agent API Endpoint is set to the adapter’s URL, and the Hub interacts with the adapter as if it were the agent itself.

If the API uses a non-standard format, the Giskard team will set up the adapter with you during onboarding.

If your agent has rate limits (for example, a maximum number of requests per minute or a cap on concurrent connections), the Hub can be configured to respect them so evaluations and scans don’t trigger throttling or back-pressure your infrastructure. These limits are configured at Hub installation time, not per-agent on the form.