Skip to content

Commit a132f94

Browse files
committed
First public commit
0 parents  commit a132f94

File tree

168 files changed

+34930
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+34930
-0
lines changed

.bazelrc

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Enable Bzlmod for every Bazel command
2+
common --enable_bzlmod
3+
4+
# Build settings
5+
build --compiler=g++ # Specify the compiler if needed, e.g., gcc, clang
6+
build --cxxopt=-std=c++20 # Use C++20 standard (adjust if needed)
7+
build --cxxopt=-Werror
8+
build --cxxopt=-Wall
9+
build --cxxopt=-Wextra
10+
build --cxxopt=-Wpedantic
11+
build --linkopt=-fPIC
12+
build --per_file_copt=external/.*@-Wno-error
13+
14+
# Test settings
15+
test --test_output=errors # Show errors from tests
16+
17+
# General settings
18+
build --jobs=4 # Use 4 parallel jobs for builds
19+
build --color=yes # Enable colored output in build logs
20+
build --show_progress=true # Show build progress in the terminal
21+
22+
# Additional settings can be added as needed
23+
# Address sanitizer
24+
# To use it: bazel build --config asan
25+
build:asan --action_env=ASAN_OPTIONS=detect_leaks=1
26+
build:asan --strip=never
27+
build:asan --copt -fsanitize=address
28+
build:asan --copt -DADDRESS_SANITIZER
29+
build:asan --copt -O1
30+
build:asan --copt -g
31+
build:asan --copt -fno-omit-frame-pointer
32+
build:asan --linkopt -fsanitize=address
33+
34+
# Thread sanitizer
35+
# bazel build --config tsan
36+
build:tsan --strip=never
37+
build:tsan --copt -fsanitize=thread
38+
build:tsan --copt -DTHREAD_SANITIZER
39+
build:tsan --copt -DDYNAMIC_ANNOTATIONS_ENABLED=1
40+
build:tsan --copt -DDYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1
41+
build:tsan --copt -O1
42+
build:tsan --copt -fno-omit-frame-pointer
43+
build:tsan --linkopt -fsanitize=thread
44+
45+
# --config msan: Memory sanitizer
46+
build:msan --strip=never
47+
build:msan --copt -fsanitize=memory
48+
build:msan --copt -DADDRESS_SANITIZER
49+
build:msan --copt -O1
50+
build:msan --copt -fno-omit-frame-pointer
51+
build:msan --linkopt -fsanitize=memory
52+
53+
# --config ubsan: Undefined Behavior Sanitizer
54+
build:ubsan --strip=never
55+
build:ubsan --copt -fsanitize=undefined
56+
build:ubsan --copt -O1
57+
build:ubsan --copt -fno-omit-frame-pointer
58+
build:ubsan --linkopt -fsanitize=undefined
59+
build:ubsan --linkopt -lubsan

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.3.1

.env.template

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Agents-CPP Configuration
2+
# Copy this file to .env and fill in your API keys
3+
4+
# OpenAI API Key
5+
OPENAI_API_KEY=your_openai_api_key_here
6+
7+
# Anthropic API Key
8+
ANTHROPIC_API_KEY=your_anthropic_api_key_here
9+
10+
# Google API Key
11+
GOOGLE_API_KEY=your_google_api_key_here
12+
13+
# Ollama Settings
14+
OLLAMA_BASE_URL=http://localhost:11434
15+
16+
# Default settings
17+
DEFAULT_PROVIDER=openai
18+
DEFAULT_MODEL=gpt-4o-2024-05-13

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# vscode files
2+
**/.vscode
3+
4+
# python venv files
5+
**/.venv
6+
7+
# macos files
8+
**/.DS_Store
9+
10+
# bazel build files
11+
**/bazel-*
12+
13+
# doxygen build files
14+
**/docs/build
15+
16+
# code-workspace files
17+
**/*.code-workspace

BUILD

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Main library build recipe
2+
3+
# C++ Requests
4+
cc_import(
5+
name = "cpr",
6+
shared_library = select({
7+
"@platforms//os:macos": "lib/macos/libcpr.1.dylib",
8+
"@platforms//os:linux": "lib/linux/libcpr.so.1",
9+
"//conditions:default": None,
10+
}),
11+
)
12+
13+
# Curl
14+
cc_import(
15+
name = "curl",
16+
shared_library = select({
17+
"@platforms//os:macos": "lib/macos/libcurl.4.dylib",
18+
"@platforms//os:linux": "lib/linux/libcurl.so.4.11.0",
19+
"//conditions:default": None,
20+
}),
21+
)
22+
23+
# Python for python execution tool
24+
cc_import(
25+
name = "python",
26+
shared_library = select({
27+
"@platforms//os:macos": "lib/macos/libpython3.11.dylib",
28+
"@platforms//os:linux": "lib/linux/libpython3.11.so",
29+
"//conditions:default": None,
30+
}),
31+
)
32+
33+
# Main library
34+
cc_import(
35+
name = "agents_cpp",
36+
hdrs = glob([
37+
"include/agents-cpp/**/*.h",
38+
"include/spdlog/**/*.h"
39+
]),
40+
includes = [
41+
"include",
42+
],
43+
shared_library = select({
44+
"@platforms//os:macos": "lib/macos/libagents_cpp_shared_lib.dylib",
45+
"@platforms//os:linux": "lib/linux/libagents_cpp_shared_lib.so",
46+
"//conditions:default": None,
47+
}),
48+
deps = [
49+
":cpr",
50+
":curl",
51+
":python"
52+
],
53+
visibility = ["//visibility:public"]
54+
)
55+
56+
# End of BUILD file

LICENSE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2025 Edge AI, LLC. All rights reserved.
2+
3+
This software and associated documentation files (the "Software") are the proprietary and confidential information of Edge AI, LLC ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the license agreement you entered into with Edge AI, LLC.
4+
5+
Unauthorized copying, modification, distribution, or use of the Software is strictly prohibited.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MODULE.bazel

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
MODULE.bazel
3+
This file declares external dependencies using Bazel bzlmod.
4+
"""
5+
module(name = "agents", version = "0.1.0")
6+
7+
# Core C++ rules
8+
bazel_dep(name = "platforms", version = "0.0.11")
9+
bazel_dep(name = "rules_cc", version = "0.1.4")
10+
11+
# End of MODULE.bazel

0 commit comments

Comments
 (0)