Skip to main content

Overview

A cookbook is a set of short, copy-pasteable guides that show how to achieve common builds with INNOCHAT. This page covers the Intermediate pattern: one agent with two function calls. You’ll build Swiss News, a chatbot that:
  • fetches top headlines for Switzerland, and
  • runs keyword news searches with filters like date range, language, and source fields.
    Because we are using function calls for live data, skip the Knowledge section (no trained sources needed).

What you’ll build

  • Agent name: Swiss News
  • Functions (2):
    1. getTopHeadlines — curated/top stories
    2. searchNews — keyword search with filters

Prerequisites

  • A GNews.io API key (v4).
  • INNOCHAT workspace with Agent builder access.

Quick architecture

Step-1: Create or Edit a Customer Support Agent

Agent Name: Swiss News Description: As the official Swiss News Assistant, you are a knowledgeable, friendly, and professional digital helpdesk built to deliver up-to-date news about Switzerland. You specialize in retrieving articles, headlines, and insights about Swiss topics, regions, and sources via GNews.io. Your mission is to help users discover, search, and stay informed on Swiss news in their preferred language (English, German, French, or Italian), presenting content clearly, concisely, and accurately. You guide unclear queries, politely clarify or redirect non-Swiss requests, and always maintain a supportive tone.
Model: Model selection completely depends on user choice based on the type of agent, context window size requirement, and how fast the response should be displayed, and so on. Opt for GPT-5-mini or GPT-5-nano for faster responses. Token Limit Distribution: This parameter is completely dependent on how many tokens you wish to reserve for each part of the LLM call. The overall token limit depends on the LLM you picked, but you can fine tune the token distribution based on your particular use case.
Prompt:
Temperature: A parameter that controls the randomness or creativity of a large language model’s output by adjusting the probability of selecting the next word. In this use case, temperature has been set to 0 in order to display the retrieved content as it is without any creativity.

Step 2: Knowledge

Since it’s a basic agent creation with single LLM call, we can skip the Knowledge section and also uncheck the all sources parameter.

Step 3: Add the Function Calls

Function call - 1: getTopHeadlines

Function Name: getTopHeadlines Description: Fetch top trending news headlines about Switzerland via GNews.io, filtered by country, category, and/or language. Supports optional filters for date, keywords, number of articles, and more. Always restricted to Swiss sources.
API Endpoint: https://gnews.io/api/v4/top-headlines?apikey=YOUR_API_KEY Method: GET
Headers:
Parameters:

Function call - 2: searchNews

Function Name: searchNews Description: Search for up-to-date news articles from GNews.io by keyword, supporting powerful filtering by language, country of publication, date range, source fields, and more. Use this function to retrieve relevant Swiss or international news about any topic, event, or person, with results prioritized by relevance or publication date. All parameters are optional except for q (the search keyword), which is required.
API Endpoint: https://gnews.io/api/v4/search?q=example&apikey=YOUR_API_KEY Method: GET
Headers:
Parameters:

Example

Summary