Skip to content

Commit

Permalink
Merge pull request #58 from Callgent/blog
Browse files Browse the repository at this point in the history
Blog
  • Loading branch information
Jamesp918 authored Oct 10, 2024
2 parents a9eabcf + 45c5632 commit 5953936
Show file tree
Hide file tree
Showing 39 changed files with 836 additions and 272 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ With predefined business services and standard widgets, the `Home-Cooked Softwar

Callgent's core functionality is to do native function-calling to orchestrate business services.

Callgent has server endpoints and client endpoints to adapt various invocation scenarios.
Callgent has server entries and client entries to adapt various invocation scenarios.

Specifically, widget based User Interface, is just one more type of client endpoints, to adapt human interactions.
Specifically, widget based User Interface, is just one more type of client entries, to adapt human interactions.
4 changes: 2 additions & 2 deletions developer/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Explore the innovative architecture of Callgent, where services and
# Concepts and Architecture

The core of the callgent architecture, is to encapsulate every **service** and **user** behind a `callgent`.
Then build various endpoints into third-party platforms, so that any users and services are naturally connected anywhere in their native ways: webpages, chatting, email, APIs..
Then build various entries into third-party platforms, so that any users and services are naturally connected anywhere in their native ways: webpages, chatting, email, APIs..

Above this, we add a layer of semantic invocations, empowered by large language models (LLMs), to make the callgent able to understand and react to any user/system's intents.

Expand All @@ -27,7 +27,7 @@ Each system service, and every user is encapsulated into a `Callgent`.

### Calling Anywhere

Requesting a callgent is done through various `Calling Endpoint`, integrated into third-party platforms. So systems and users are naturally connected anywhere in their native ways: Webpages, chatting, email, APIs..
Requesting a callgent is done through various `Client Entries`, integrated into third-party platforms. So systems and users are naturally connected anywhere in their native ways: Webpages, chatting, email, APIs..

#### User-as-a-Service

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"label": "Callgent Endpoints",
"label": "Callgent Entries",
"position": 1,
"link": {
"type": "doc",
"id": "endpoints"
"id": "entries"
}
}
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Callgent Endpoints
# Callgent Entries

Callgents endpoints are adaptors to collect callgent to external systems or users.
Callgents entries are adaptors to collect callgent to external systems or users.

There are three types of endpoints:
There are three types of entries:

- [Server Endpoint](./server-endpoint)
- [Server Entry](./server-entry)
Responsible for converting requests into the encapsulated target system invocation or user chatting, and retrieving invocation response.
- [Client Endpoint](./client-endpoint)
- [Client Entry](./client-entry)
Responsible for receiving requests into callgent task queue, and responding back to caller when task has any progress.
- [Event Endpoint](./event-endpoint)
- [Event Entry](./event-entry)
Responsible for listening to events from the encapsulated target system or user, and notifying registered event observers on callgent.

## Add a new endpoint to callgent
## Add a new entry to callgent

When you want to connect your callgent to a new external system / user, you need to integrate them by adding a new endpoint.
You can add any number of endpoints to your callgent.
When you want to connect your callgent to a new external system / user, you need to integrate them by adding a new entry.
You can add any number of entries to your callgent.

### choose a callgent

FIXME: list your callgents

### Step 1, choose a type of endpoint
### Step 1, choose a type of entry

Client endpoint to accept tasks from external system, and server endpoint to send tasks to external system / user.
Client entry to accept tasks from external system, and server entry to send tasks to external system / user.

### Step 2, choose an adaptor to the external system

You can also develop your own adaptor to the external system, if needed.

### Step 3, configure the endpoint
### Step 3, configure the entry

### Step 4, initialize the endpoint
### Step 4, initialize the entry
8 changes: 4 additions & 4 deletions docs/advanced-topics/callgent-hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ Follow the instructions to fill in the API key, then confirm the creation.
On successful creation, you will see a webhook URL on the callgent card. You must set this webhook URL on your canny.io > Settings > API > Webhooks.

:::info
The webhook URL is a event endpoint for canny.io to receive notification events to your callgent.
The webhook URL is an event entry for canny.io to receive notification events to your callgent.
:::

## Using your canny.io callgent

### Client endpoint
### Client entry

Every user interactions on canny.io will go directly into your callgent task queue.

### Server endpoint
### Server entry

You can add any server endpoint to your callgent. So that you can respond to these tasks anywhere, e.g.
You can add any server entry to your callgent. So that you can respond to these tasks anywhere, e.g.

- send to your Slack channels
- as a github issue
Expand Down
12 changes: 6 additions & 6 deletions docs/advanced-topics/composite-callgent.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 2
keywords: [composite callgent, group callgent, Nested Callgents]
description: Learn how to create and manage a Composite Callgent. Discover how to handle complex call requests, utilize nested callgents, and perform map/reduce operations. Simplify your call process with a single call endpoint and efficient callgent orchestration..
description: Learn how to create and manage a Composite Callgent. Discover how to handle complex call requests, utilize nested callgents, and perform map/reduce operations. Simplify your call process with a single call entry and efficient callgent orchestration..
---

# Group of Callgents
Expand All @@ -10,12 +10,12 @@ Multiple callgents can naturally be combined to form a new composite callgent, w

## Creating a Composite Callgent

Similar to a regular callgent, which maintains a list of `function entries` to automatically map each request to a function entry, call it, and return the result, a composite callgent maintains a list of callgents. This allows each request to be automatically mapped to a `callgent entry`, called, and the result returned.
Similar to a regular callgent, which maintains a list of `functional endpoints` to automatically map each request to an endpoint, call it, and return the result, a composite callgent maintains a list of callgents. This allows each request to be automatically mapped to a `callgent entry`, called, and the result returned.

:::tip
Callgent entries come in two types: `function entries` and `callgent entries`. These two types of entries can be mixed together.
Callgent entries come in two types: `functional entries` and `callgentive entries`. These two types of entries can be mixed together.

A callgent that contains `callgent entries` is typically referred to as a composite callgent.
A callgent that contains `callgentive entries` is typically referred to as a composite callgent.
:::

## Composite Callgent Invocation Process
Expand All @@ -30,15 +30,15 @@ Composite callgents can be nested, forming a call tree. Each node in the call tr

## Multiple Internal Invocations

A callgent automatically maps a single request to an entry for processing and retrieves the response result. Based on the original request, the callgent decides whether to return the response to the caller or continue calling the next entry. This process repeats until the final result is returned to the caller.
A callgent automatically maps a single request to an endpoint for processing and retrieves the response result. Based on the original request, the callgent decides whether to return the response to the caller or continue calling the next endpoint. This process repeats until the final result is returned to the caller.

### Request with Collection Data

If the request contains collection data, the callgent may automatically perform map/reduce operations on the collection and map it to entry calls as needed.

## Advantages of Composite Callgent

Composite Callgent allows multiple callgents to work together while maintaining a single call endpoint, enabling the handling of complex call requests.
Composite Callgent allows multiple callgents to work together while maintaining a single call entry, enabling the handling of complex call requests.

:::info
Composite Callgent allows you to interact with a single callgent to invoke multiple callgents, simplifying the call process.
Expand Down
4 changes: 2 additions & 2 deletions docs/quick-start/call-the-callgent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Now you may request the callgent for a task, in the following ways.

You may directly send an email to:<Email />

then wait for reply from the callgent's [Service Endpoint](#connect-the-callgent-to-a-service-endpoint).
then wait for reply from the callgent's [Service Entry](#connect-the-callgent-to-a-service-entry).

:::tip
The email address and API url below, contains callgent Id, which is available after you've [created the callgent](#create-a-new-callgent).
Expand All @@ -41,4 +41,4 @@ You may also generate a web page with a form or button to send a task to the cal
For example, you may also want to connect the callgent to `Slack`, `Jira`, ..., Apps, so that colleagues can interact with the callgent in the channels;
Or connect it to your personal Apps like `WhatsApp`, `Instagram`, to let the callgent assist you anywhere seamlessly.

This is achieved by adding more adaptive `Client Endpoint`s to the callgent, then do some neccessary configurations. You may learn more in the [Client Endpoint](../advanced-topics/callgent-endpoints/client-endpoint) section.
This is achieved by adding more adaptive `Client Entry`s to the callgent, then do some neccessary configurations. You may learn more in the [Client Entry](../advanced-topics/callgent-entries/client-entry) section.
2 changes: 1 addition & 1 deletion docs/quick-start/create-a-new-callgent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Create with the callgent name, which will be appeared in the connected systems,
</pre>

:::tip
You may also duplicate from an existing callgent in the [Callgent Hub](../advanced-topics/callgent-hub.md), to integrate to 3rdparty systems. Just following it's instructions to fill in your own authentication tokens to enable it.
You may also fork an existing callgent in the [Callgent Hub](../advanced-topics/callgent-hub.md), to integrate to 3rdparty systems. Just following it's instructions to fill in your own authentication tokens to enable it.
:::

## Call the Callgent
Expand Down
2 changes: 1 addition & 1 deletion docs/quick-start/respond-the-calling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Just reply to the email, and the response will be relayed to the client by the C

## Bind more services to the callgent

You may bind a new service to callgent by adding a new [Server Endpoint](../advanced-topics/callgent-endpoints/server-endpoint)
You may bind a new service to callgent by adding a new [Server Entry](../advanced-topics/callgent-entries/server-entry)
4 changes: 2 additions & 2 deletions solutions/showcase/generative-ui/generative-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ With predefined business services and standard widgets, the `Home-Cooked Softwar

Callgent's core functionality is to do native function-calling to orchestrate business services.

Callgent has server endpoints and client endpoints to adapt various invocation scenarios.
Callgent has server entries and client entries to adapt various invocation scenarios.

Specifically, widget based User Interface, is just one more type of client endpoints, to adapt human interactions.
Specifically, widget based User Interface, is just one more type of client entries, to adapt human interactions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: .
keywords: [user as a service]
---

import CreateEndpoints from "@site/src/components/user-as-a-service/create-endpoints"
import CreateEntries from "@site/src/components/user-as-a-service/create-entries"
import CreateCallgent from "@site/src/components/user-as-a-service/create-callgent"
import ImportApi from "@site/src/components/user-as-a-service/import-api"
import Email from "@site/src/components/quick-start/email"
Expand All @@ -22,11 +22,11 @@ We can use the following widget to create a new callgent,

A callgent contains:

- a list of `Client Endpoints`
- a list of `Client Entries`
to accept calling requests to the callgent,
- a list of `Server Endpoints`
- a list of `Server Entries`
to forward the calling requests to the actual services,
- a list of `Event Endpoints`
- a list of `Event Entries`
callback hooks from actual service.

## Import the API document
Expand All @@ -53,14 +53,14 @@ Now you may call this new service anywhere by every `CEP` as show in the callgen
try invoke `List all job positions` API as follows,

```shell
curl https://api.callgent.com/api/callgents/{callgentId}/{sepId}/invoke/api/positions
curl https://api.callgent.com/api/rest/invoke/{callgentId}/{clientEntryId}/positions
```

### Sending Email

or by sending an Email to
<a href="mailto:callgent+{yourCepId}@my.callgent.com?subject=Please%20Respond%20Calling%20to%20`List%20all%20job%20positions`&body=I%20am%20requesting%20to%20call%20`List%20all%20job%20positions`.%20Please%20respond%20to%20this%20Email%20with%20the%20calling%20request%20details.">callgent+yourCepId#my.callgent.com</a>

### More calling endpoints
### More calling entries

You may create more `CEP`s to accept calling requests to the callgent, e.g. `SIP`, `WebRTC`, `SMS`, etc.
You may create more `CEN`s to accept calling requests to the callgent, e.g. `SIP`, `WebRTC`, `SMS`, etc.
10 changes: 5 additions & 5 deletions solutions/showcase/webhook/webhook.mdx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
sidebar_position: 2
title: Webhook - Callgent Event Endpoint
description: Guide to create an Callgent Event Endpoint as the service webhook
title: Webhook - Callgent Event Entry
description: Guide to create an Callgent Event Entry as the service webhook
keywords: [Callgent function-calling technique, integrate AI with email and Slack, Callgent vs Zapier functionality, Callgent for no-code automation, progressive function calling in AI, Callgent API integration examples, Callgent user-system orchestration, copilot, code generator, v0.dev, SWE-bench, iPaaS]
---

## Scenarios

The callgent you create is no more than the delegate to a business service. It receives requests from `Client endpoint`s (CEP), then maps the requests to specific `Server Endpoint`s (SEP) to do invocation to the actual business service.
The callgent you create is no more than the delegate to a business service. It receives requests from `Client entry`s (CEP), then maps the requests to specific `Server Entry`s (SEP) to do invocation to the actual business service.

There is one more scenario, where the actual business services may have several internal Service `Event`s to notify users/clients, usually via `webhook` or emails.

Callgent provides `Event Endpoint`s (EEP) to receive these events.
Callgent provides `Event Entry`s (EEP) to receive these events.

<figure>
![Callgent Endpoints](/img/callgent-endpoints.png "Callgent Endpoints")
![Callgent Entries](/img/callgent-entries.png "Callgent Entries")
</figure>

:::info difference between CEP and EEP
Expand Down
2 changes: 1 addition & 1 deletion src/components/quick-start/restApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const RestApi = () => {
const [showToken, setShowToken] = useState(false);

const start = `curl -X 'POST' \\
'https://api.callgent.com/api/callgents/{id}//invoke/api/' \\
'https://api.callgent.com/api/rest/invoke/{callgentId}//' \\
-H 'accept: */*' \\
`
const end = `-H 'x-callgent-callback: https://callback-url-to-receive-task-response--or-empty-if-neednt-reply' \\
Expand Down
2 changes: 1 addition & 1 deletion src/components/tree/callgent.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ModalFormProps } from '@site/src/types/components';
import useIsBrowser from '@docusaurus/useIsBrowser';
import React, { useState, useRef } from 'react';
import React, { useRef } from 'react';
import useSubmit from '@site/src/hooks/button';
import axios from 'axios';

Expand Down
Loading

0 comments on commit 5953936

Please sign in to comment.