Agents 0.0.2
Edge AI Agents SDK
Loading...
Searching...
No Matches
agents Namespace Reference

Framework Namespace. More...

Namespaces

namespace  llms
 Large Language Models Namespace.
 
namespace  tools
 Tools Namespace.
 
namespace  workflows
 Worflows Namespace.
 

Classes

class  ActorAgent
 Actor-based agent implementation. More...
 
class  Agent
 Interface for agents. More...
 
class  AgentContext
 Context for an agent, containing tools, LLM, and memory. More...
 
class  AsyncGenerator
 A minimal AsyncGenerator implementation that doesn't rely on coroutines. More...
 
class  AutonomousAgent
 An agent that operates autonomously to complete a task. More...
 
class  ConfigLoader
 A utility class to load and access configuration values from .env files. More...
 
class  Executor
 A minimal executor implementation. More...
 
class  LLMInterface
 Interface for language model providers (OpenAI, Anthropic, Google, Ollama) More...
 
struct  LLMOptions
 Options for LLM API calls. More...
 
struct  LLMResponse
 Response from an LLM. More...
 
class  Logger
 Logger utility class that wraps spdlog functionality. More...
 
class  Memory
 Interface for agent memory storage. More...
 
struct  Message
 Message in a conversation. More...
 
struct  Parameter
 Parameter type for tools and LLM calls. More...
 
class  Task
 Provide a future-based fallback for Task. More...
 
class  Tool
 Interface for tools that an agent can use. More...
 
struct  ToolResult
 Result of a tool execution. More...
 

Typedefs

using ToolCallback = std::function<ToolResult(const JsonObject&)>
 Callback type for tool execution.
 
using String = std::string
 String type.
 
using StringMap = std::map<String, String>
 String map type.
 
using JsonObject = nlohmann::json
 JSON object type.
 
using JsonArray = nlohmann::json::array_t
 JSON array type.
 
using ParameterMap = std::map<String, Parameter>
 Parameter map type.
 

Enumerations

enum class  MemoryType {
  SHORT_TERM ,
  LONG_TERM ,
  WORKING
}
 Memory types. More...
 

Functions

template<typename T>
blockingWait (Task< T > &&task)
 Helper to run a task and get the result synchronously.
 
template<typename T>
std::vector< T > collectAll (AsyncGenerator< T > &&generator)
 Helper to collect all results from an AsyncGenerator.
 
ExecutorgetExecutor ()
 Get a global executor.
 
std::shared_ptr< LLMInterfacecreateLLM (const String &provider, const String &api_key, const String &model="")
 Factory function to create a specific LLM provider.
 
std::shared_ptr< MemorycreateMemory ()
 Create a Memory instance.
 
std::shared_ptr< ToolcreateTool (const String &name, const String &description, const std::vector< Parameter > &parameters, ToolCallback callback)
 Create a custom tool with a name, description, parameters, and callback.
 

Detailed Description

Framework Namespace.

Typedef Documentation

◆ JsonArray

using agents::JsonArray = nlohmann::json::array_t

JSON array type.

Note
This is a JSON array type. It contains the JSON array.

◆ JsonObject

using agents::JsonObject = nlohmann::json

JSON object type.

Note
This is a JSON object type. It contains the JSON object.

◆ ParameterMap

Parameter map type.

Note
This is a parameter map type. It contains the string and parameter.

◆ String

using agents::String = std::string

String type.

Note
This is a string type. It contains the string.

◆ StringMap

using agents::StringMap = std::map<String, String>

String map type.

Note
This is a string map type. It contains the string and string.

◆ ToolCallback

using agents::ToolCallback = std::function<ToolResult(const JsonObject&)>

Callback type for tool execution.

Note
This is the callback type for tool execution. It is a function that takes a json object and returns a tool result.

Enumeration Type Documentation

◆ MemoryType

enum class agents::MemoryType
strong

Memory types.

Note
This is a type of memory. It contains the type of memory, the name of the memory, and the content of the memory.
Enumerator
SHORT_TERM 

Short term memory.

LONG_TERM 

Long term memory.

WORKING 

Working memory.

Function Documentation

◆ blockingWait()

template<typename T>
T agents::blockingWait ( Task< T > && task)

Helper to run a task and get the result synchronously.

Template Parameters
TThe type of the result of the task
Parameters
taskThe task to run
Returns
The result of the task

◆ collectAll()

template<typename T>
std::vector< T > agents::collectAll ( AsyncGenerator< T > && generator)

Helper to collect all results from an AsyncGenerator.

Template Parameters
TThe type of the elements in the AsyncGenerator
Parameters
generatorThe AsyncGenerator to collect results from
Returns
A vector of the results from the AsyncGenerator

◆ createLLM()

std::shared_ptr< LLMInterface > agents::createLLM ( const String & provider,
const String & api_key,
const String & model = "" )

Factory function to create a specific LLM provider.

Parameters
providerOne of: "anthropic", "openai", "google", "ollama"
api_keyAPI key for the provider
modelModel to use (provider-specific)
Returns
The LLMInterface

◆ createMemory()

std::shared_ptr< Memory > agents::createMemory ( )

Create a Memory instance.

Returns
The Memory instance

◆ createTool()

std::shared_ptr< Tool > agents::createTool ( const String & name,
const String & description,
const std::vector< Parameter > & parameters,
ToolCallback callback )

Create a custom tool with a name, description, parameters, and callback.

Parameters
nameThe name of the tool
descriptionThe description of the tool
parametersThe parameters of the tool
callbackThe callback for the tool
Returns
A shared pointer to the tool

◆ getExecutor()

Executor * agents::getExecutor ( )
inline

Get a global executor.

Returns
Pointer to global executor