AI Agent conversation context.
More...
#include <agent_context.hpp>
|
| | AgentContext () |
| |
| | AgentContext (const lb_agent_context_t *ctx) |
| |
| | AgentContext (const AgentContext &ctx) |
| |
| | AgentContext (AgentContext &&ctx) |
| |
| | ~AgentContext () |
| |
| AgentContext & | operator= (const AgentContext &ctx) |
| |
| void | workspaces (AsyncCallback< AgentContext, WorkspacesResponse > callback) const |
| | List the Workspaces the current account belongs to. More...
|
| |
| void | agents (const std::string &workspace_id, const std::optional< GetAgentsOptions > &opts, AsyncCallback< AgentContext, AgentsResponse > callback) const |
| | List the Agents in the specified Workspace. More...
|
| |
| void | public_agents (const std::optional< GetAgentsOptions > &opts, AsyncCallback< AgentContext, AgentsResponse > callback) const |
| |
| void | conversation (const std::string &agent_id, const std::string &query, const std::optional< std::string > &chat_uid, const std::optional< std::string > &parent_message_id, AsyncCallback< AgentContext, ConversationResponse > callback) const |
| |
| void | continue_conversation (const std::string &agent_id, const std::string &chat_uid, const std::string &message_id, const AnswersByToolCall &answers, AsyncCallback< AgentContext, ConversationResponse > callback) const |
| |
| void | conversation_streamed (const std::string &agent_id, const std::string &query, const std::optional< std::string > &chat_uid, const std::optional< std::string > &parent_message_id, PushCallback< AgentContext, ConversationStreamEvent > on_event, AsyncCallback< AgentContext, ConversationResponse > callback) const |
| |
| void | continue_conversation_streamed (const std::string &agent_id, const std::string &chat_uid, const std::string &message_id, const AnswersByToolCall &answers, PushCallback< AgentContext, ConversationStreamEvent > on_event, AsyncCallback< AgentContext, ConversationResponse > callback) const |
| |
AI Agent conversation context.
◆ AgentContext() [1/4]
| longbridge::agent::AgentContext::AgentContext |
( |
| ) |
|
◆ AgentContext() [2/4]
◆ AgentContext() [3/4]
| longbridge::agent::AgentContext::AgentContext |
( |
const AgentContext & |
ctx | ) |
|
◆ AgentContext() [4/4]
| longbridge::agent::AgentContext::AgentContext |
( |
AgentContext && |
ctx | ) |
|
◆ ~AgentContext()
| longbridge::agent::AgentContext::~AgentContext |
( |
| ) |
|
◆ agents()
◆ continue_conversation()
Resume an interrupted conversation, blocking until the run succeeds, is interrupted again, or fails.
- Parameters
-
| answers | Answers keyed by tool_call_id, see AnswersByToolCall |
◆ continue_conversation_streamed()
Resume an interrupted conversation, calling on_event for every run-progress event observed over SSE, then callback with the final ConversationResponse once the stream ends — same shape as conversation_streamed.
- Parameters
-
| answers | Answers keyed by tool_call_id, see AnswersByToolCall |
◆ conversation()
| void longbridge::agent::AgentContext::conversation |
( |
const std::string & |
agent_id, |
|
|
const std::string & |
query, |
|
|
const std::optional< std::string > & |
chat_uid, |
|
|
const std::optional< std::string > & |
parent_message_id, |
|
|
AsyncCallback< AgentContext, ConversationResponse > |
callback |
|
) |
| const |
Start a conversation with the specified Agent, blocking until the run succeeds, is interrupted, or fails.
- Parameters
-
| chat_uid | Existing conversation identifier to continue within (std::nullopt to start a brand-new conversation) |
| parent_message_id | message_id from a previous response, to attach a follow-up after that message. Only valid together with chat_uid and must be std::nullopt for a new conversation |
◆ conversation_streamed()
Start a conversation with the specified Agent, calling on_event for every run-progress event observed over SSE. A succeeded, failed, or stopped run carries its outcome in a WorkflowFinished event; an interrupted run carries it in a HumanInteractionRequired event instead — the two are never emitted for the same run. Either way, the carrying event isn't necessarily the last one seen — the server may still emit a few more housekeeping events (e.g. ChatTitleUpdated) before actually closing the connection. Once the stream truly ends, callback is invoked with the final ConversationResponse — same as conversation, just arrived at via the streamed path.
- Parameters
-
| chat_uid | Existing conversation identifier to continue within (std::nullopt to start a brand-new conversation) |
| parent_message_id | message_id from a previous response, to attach a follow-up after that message. Only valid together with chat_uid and must be std::nullopt for a new conversation |
◆ create()
◆ operator=()
◆ public_agents()
List all publicly available Agents on the platform (the Explore catalog). Not scoped to a Workspace.
◆ workspaces()
List the Workspaces the current account belongs to.
The documentation for this class was generated from the following file: