Skip to main content

Features and benefits

The following we list the main features of Cogine, for the details please check the technical documentation.


NameDescriptionLangChainChidoriCogine
Decentralized dataUser's data are stored outside of the application and user controls its access permission from the applications
InteroperabilityOne agent can interoperate with any others even it is not developed by a same developerlimited to agents developed by a same developer and need to call API manuallylimited to agents developed by a same developer and need to call API manually
Multi-agent collaborationHas standard collaborating mechanism between User, System and AgentsNo standard mechanism and need to communicate case by case, also limited to a same developerNo standard mechanism and need to communicate case by case, also limited to a same developer
Function/Agent-level sand-boxingEvery agent and even a function can be isolated so that multi agents come from different can be running in a same memory environment safely
Conversational computingCode can talk to user, system or other agents to ask more information at any function location, the agent will be paused and continue to run when got response.
Logic-abstractionWe re-organized the whole program to make developers focused on logic of busniess and forget about the hardware, data and programing language abstraction.
Visual graph editingWe build a graph interaction which is as simple as Houdini and as powerful as any turning completed programming language.
Agent format standardWe defined a agent format standard to represent a turing completed agent program which can be loaded and runned dynamically so everyone can develop an agent to handle personal needs.some runtime in-memory agent objectsome runtime in-memory agent object
Virtual machine & Dynamical loading and runningCan load and run dynamically

Development comparison with LangChain and Chidori

Basically, in other framework, you have to learn Python language, have to care about the structure of the program and have to learn many architecture design (such as different specific class and its inheritance relationships. In Cogine, the only thing you are care about is your logic, no other programming burden.

First define a Story struct with editor:

std

Then define your component's input and output using the above defined struct also with editor:

std

Then define your logic flow:

std

Finally write your component's code with Lua:

fetch_top_hn.lua:

function updating()
    local story_ids = get_url("https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty")
    for i = 1, #story_ids do
        local url = string.format("https://hacker-news.firebaseio.com/v0/item/%s.json?print=pretty", story_ids[i])
        stories[i] = get_url(url)
    end
end

interpret_the_group.lua:

function updating()
    local prompt = string.format("Based on the following list of HackerNews threads, filter this list to only launches of new AI projects: %s", table_to_string(stories))
    local result = chat_completions("Please only return the result list as a RFC8259 compliant JSON format with no '\' character, no extra information", prompt)
    if result["ok"] == true then
        for i = 1, #result["content"] do
            local story = {}
            out_stories[i] = result["content"][i]
        end
    end
end

format_and_rank.lua:

function updating()
    local prompt = string.format("this list of new AI projects in markdown, ranking the most interesting projects from most interesting to least. %s", table_to_string(stories))
    local result = chat_completions("Please only return the result list as a RFC8259 compliant JSON format with no '\' character, no extra information",prompt)

    local msg = "The news with AI topics are:\n"
    if result["ok"] == true then
        for i = 1, #result["content"] do
            msg = string.format("%s%d. %s\n",msg,i,result["content"][i]["title"])
        end
    end
 
    message["content"] = msg
    message["receiver"] = "user"
end