#include <agents-cpp/agent_context.h>
#include <agents-cpp/config_loader.h>
#include <agents-cpp/llm_interface.h>
#include <agents-cpp/logger.h>
#include <agents-cpp/types.h>
#include <agents-cpp/workflows/prompt_chaining_workflow.h>
#include <string>
int main() {
Logger::info(
"This is a minimal example to demonstrate the agents-cpp library.");
Logger::info(
"It uses only the components that are actually implemented.");
bool hasOpenAI = config.has("OPENAI_API_KEY");
bool hasAnthropic = config.has("ANTHROPIC_API_KEY");
bool hasGoogle = config.has("GEMINI_API_KEY");
Logger::info(
"- OpenAI API Key: {}", hasOpenAI ?
"Found ✓" :
"Not found ✗");
Logger::info(
"- Anthropic API Key: {}", hasAnthropic ?
"Found ✓" :
"Not found ✗");
Logger::info(
"- Google API Key: {}", hasGoogle ?
"Found ✓" :
"Not found ✗");
if (hasOpenAI || hasAnthropic || hasGoogle) {
Logger::info(
"You can now run examples without providing keys on the command line.");
} else {
Logger::warn(
"Please create a .env file or set environment variables.");
}
auto context = std::make_shared<AgentContext>();
Logger::info(
"This example is just for demonstration purposes.");
return 0;
}
static ConfigLoader & getInstance()
Get the singleton instance of ConfigLoader.
static void init(Level level=Level::INFO)
Initialize the logger.
static void info(fmt::format_string< Args... > fmt, Args &&... args)
Log a message at info level.
Definition logger.h:104
static void warn(fmt::format_string< Args... > fmt, Args &&... args)
Log a message at warn level.
Definition logger.h:114
A workflow that chains multiple prompts together.
Definition prompt_chaining_workflow.h:26
@ INFO
Info logging level.
Definition logger.h:40
Worflows Namespace.
Definition workflow.h:22
Framework Namespace.
Definition agent.h:18