Easybeam
  • Getting Started
    • 👋What is Easybeam?
    • 📙SDKs
  • Features
    • 📝Prompts
    • ⭐Reviews & Score
    • 🧠Agents
      • Getting Started
      • Core concepts
      • Data Types
      • Sidebar
      • Start Step
      • Prompt Step
      • Decision Step
      • Action Step
      • Website Step
      • Database Step
      • Async Branch
      • Knowledge Step
      • API Step
      • Solo Agent
    • 📖Knowledge
      • Websites
      • Documents
    • 📋Logs
    • 🔍Analytics & Reviews
    • 🧑‍🔬Test Center
  • 🤖Documentation Agent
Powered by GitBook
On this page
  1. Features

Agents

AI that can take actions based on live data!

PreviousReviews & ScoreNextGetting Started

Last updated 4 months ago

Overview

Agents are how you can create complex prompt-chains and interact with live data, API's, and enhance your Prompts with RAG. This feature is under active development, but there's already enough there to bring value to our Beamers, so we thought we'd give y'all access.

Agents function very similar to Prompts, and since they have the same inputs and outputs as a Prompt can even be swapped in your application with very little work. You send variables and messages and then we respond with a new ChatMessage.

Every Agent is expecting the last step to be a Prompt, in order to support streaming in responses to your users.

Every Agent can be accessed via the API with it's AI, or distributed via the Solo Agent features, accessed in the Sidebar Menu (check out the next section for details).

🧠
  • Overview
  • POSTGet a chat completion from an agent

Get a chat completion from an agent

post

This endpoint processes a chat interaction with a specified agent. It supports both streaming and non-streaming operations based on the provided parameters.

Authorizations
Path parameters
idstringRequired

Unique identifier for the agent

Example: agent-abcde
Body
chatIdstring | nullableOptional

Identifier for the chat session

Example: chat-12345
streambooleanOptional

Whether to stream the response

Example: true
userIdstring | nullableOptional

ID of the user interacting with the agent

Example: user-67890
consolidateStreamboolean | nullableOptional

Whether to consolidate the stream

Example: true
Responses
200
Agent interaction successful
application/json
400
Bad request, e.g., missing or invalid ID
application/json
401
Unauthorized access
application/json
post
POST /v1/agent/{id} HTTP/1.1
Host: api.easybeam.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 269

{
  "variables": {
    "keyA": "valueA",
    "keyB": "valueB"
  },
  "chatId": "chat-12345",
  "messages": [
    {
      "content": "Can you help me with this task?",
      "role": "USER",
      "createdAt": "2024-04-27T13:00:00Z",
      "id": "msg-3"
    }
  ],
  "stream": false,
  "userId": "user-67890",
  "consolidateStream": true,
  "userSecrets": {}
}
{
  "newMessage": {
    "content": "Hello, how can I assist you today?",
    "role": "USER",
    "providerId": "openai",
    "createdAt": "2024-04-27T12:34:56Z",
    "id": "msg-1",
    "inputTokens": 150.5,
    "outputTokens": 200.75
  },
  "chatId": "chat-67890",
  "streamFinished": false
}