Agents 0.0.2
Edge AI Agents SDK
Loading...
Searching...
No Matches
types.h
1
10#pragma once
11
12#include <any>
13#include <map>
14#include <memory>
15#include <nlohmann/json.hpp>
16#include <optional>
17#include <string>
18#include <variant>
19#include <vector>
20
21namespace agents {
22
27using String = std::string;
28
33using StringMap = std::map<String, String>;
34
39using JsonObject = nlohmann::json;
40
45using JsonArray = nlohmann::json::array_t;
46
51struct Parameter {
71 std::optional<JsonObject> default_value;
72};
73
78using ParameterMap = std::map<String, Parameter>;
79
93 std::vector<std::pair<String, JsonObject>> tool_calls;
97 std::map<String, double> usage_metrics;
98};
99
105struct Message {
127
139 std::optional<String> name;
143 std::optional<String> tool_call_id;
147 std::vector<std::pair<String, JsonObject>> tool_calls;
148};
149
169
170} // namespace agents
Framework Namespace.
Definition agent.h:18
nlohmann::json::array_t JsonArray
JSON array type.
Definition types.h:45
nlohmann::json JsonObject
JSON object type.
Definition types.h:39
std::string String
String type.
Definition types.h:27
MemoryType
Memory types.
Definition types.h:155
@ LONG_TERM
Long term memory.
Definition types.h:163
@ WORKING
Working memory.
Definition types.h:167
@ SHORT_TERM
Short term memory.
Definition types.h:159
std::map< String, String > StringMap
String map type.
Definition types.h:33
std::map< String, Parameter > ParameterMap
Parameter map type.
Definition types.h:78
Response from an LLM.
Definition types.h:85
std::vector< std::pair< String, JsonObject > > tool_calls
The tool calls that were made.
Definition types.h:93
String content
The content of the response.
Definition types.h:89
std::map< String, double > usage_metrics
The usage metrics for the call.
Definition types.h:97
Message in a conversation.
Definition types.h:105
Role
The role of the message.
Definition types.h:109
@ USER
User role message.
Definition types.h:117
@ TOOL
Tool role message.
Definition types.h:125
@ ASSISTANT
Assistant role message.
Definition types.h:121
@ SYSTEM
System role message.
Definition types.h:113
Role role
The role of the message.
Definition types.h:131
std::optional< String > tool_call_id
The tool call id of the message.
Definition types.h:143
std::vector< std::pair< String, JsonObject > > tool_calls
The tool calls that were made.
Definition types.h:147
String content
The content of the message.
Definition types.h:135
std::optional< String > name
The name of the message.
Definition types.h:139
Parameter type for tools and LLM calls.
Definition types.h:51
bool required
Whether the parameter is required.
Definition types.h:67
std::optional< JsonObject > default_value
The default value of the parameter.
Definition types.h:71
String type
The type of the parameter.
Definition types.h:63
String description
The description of the parameter.
Definition types.h:59
String name
The name of the parameter.
Definition types.h:55