🤖Agents

In this section you can interact with your agents. To get the response from an agent check the "completion" endpoint

Get all agents

Get the complete list of agents you have created in your account

get all agents

GET plus.codegpt.co/api/v1/agent

Headers

Name
Type
Description

Authorization*

string

Bearer {apiKey}

{
    "status":200,
    "body":
        {
            "agents":[
                "name": "Agent 1"
                "id": "xxxxx-xxxxxx-xxxxxx"
            ]
        }
}

Get single agent

get a single agent

GET plus.codegpt.co/api/v1/agent/{id}

Headers

Name
Type
Description

Authorization*

string

Bearer {apiKey}

{
    "status":200,
    "body":
        {
            "agents":[
                "name": "Agent 1"
                "id": "xxxxx-xxxxxx-xxxxxx"
            ]
        }
}

Completion from an agent

Send a message and the agent will respond via stream according to the configuration it has

Get the completion from an agent

POST plus.codegpt.co/api/agent/{id}

Headers

Name
Type
Description

Authorization*

string

Bearer {apiKey}

Request Body

Name
Type
Description

messages*

array

[

{ role: "user", content: "Hello" },

{ role: "assistant", content: "Hi, how can i help you?" },

{ role: "user", content: "How can I make a calculator in javascript?" }

]

{
    "status": 200,
    "body": {
        "data": "text"
    }
}

Completion without an agent

Get the completion without an agent

POST plus.codegpt.co/api/v1/agent

Headers

Name
Type
Description

Authorization*

string

Bearer {apiKey}

Request Body

Name
Type
Description

messages*

array

[

{ role: "user", content: "Hello" },

{ role: "assistant", content: "Hi, how can i help you?" },

{ role: "user", content: "How can I make a calculator in javascript?" }

]

{
    "status": 200,
    "body": {
        "data": "text"
    }
}

Last updated