Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 28 additions & 18 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@ The Agentic RTB Framework defines a standard for implementing agent services tha
.
├── CLAUDE.md # This file
├── README.md # Project readme
├── Makefile # Build automation
├── Dockerfile # Container build
├── cmd/agent/ # Main entry point
├── internal/
│ ├── agent/ # gRPC service implementation
│ ├── mcp/ # MCP interface implementation
│ ├── handlers/ # Mutation handlers
│ ├── health/ # Health check endpoints
│ └── web/ # Web UI
├── pkg/pb/ # Generated protobuf code
├── Makefile # Root proto generation tasks
├── go.work # Workspace for repo modules
├── examples/golang/
│ ├── cmd/agent/ # Main entry point
│ ├── internal/
│ │ ├── agent/ # gRPC service implementation
│ │ ├── mcp/ # MCP interface implementation
│ │ ├── handlers/ # Mutation handlers
│ │ ├── health/ # Health check endpoints
│ │ └── web/ # Web UI
│ ├── Dockerfile # Container build
│ ├── docker-compose.yml # Local development setup
│ ├── federation.example.yaml # Example federation config
│ └── Makefile # Service build and run tasks
├── examples/golang/pkg/
│ ├── go.mod # Shared protobuf module
│ └── pb/ # Generated protobuf code
├── proto/ # Protobuf definitions
├── docs/ # Documentation
└── samples/ # Sample request payloads
Expand Down Expand Up @@ -84,19 +91,22 @@ service RTBExtensionPoint {
## Development Commands

```bash
# Build the agent (includes protobuf generation)
make build
# Generate protobuf files from the shared schema
make generate

# Build the agent service
make -C examples/golang build

# Run with all interfaces enabled (gRPC, MCP, Web)
make run-all
make -C examples/golang run-all

# Run specific interfaces
make run-grpc # gRPC only (port 50051)
make run-mcp # MCP only (port 50052)
make run-web # Web + MCP (ports 8081, 50052)
make -C examples/golang run-grpc # gRPC only (port 50051)
make -C examples/golang run-mcp # MCP only (port 50052)
make -C examples/golang run-web # Web + MCP (ports 8081, 50052)

# Run tests
make test
make -C examples/golang test

# Build Docker image
make docker-build
Expand Down Expand Up @@ -218,7 +228,7 @@ Containers must include an `agent-manifest` label in image metadata with:

The protobuf imports OpenRTB v2.6 definitions:
```protobuf
import "com/iabtechlab/openrtb/v2.6/openrtb.proto";
import "com/iabtechlab/openrtb/v2/openrtb.proto";
```

You'll need the IAB Tech Lab OpenRTB protobuf definitions from:
Expand Down
95 changes: 0 additions & 95 deletions Dockerfile

This file was deleted.

81 changes: 13 additions & 68 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,72 +1,17 @@
# Agentic RTB Framework Makefile
# Root-level repository tasks
# Keep the root Makefile focused on shared proto generation.

BINARY=artf-agent
LANGUAGES=go # cpp go csharp objc python ruby js
.PHONY: generate fetch-openrtb

# Go build and run targets
.PHONY: build run-all run-grpc run-mcp run-web test
LANG ?= go
LANGS ?= $(LANG)

build:
go build -o $(BINARY) ./cmd/agent
generate: fetch-openrtb
mkdir -p pkg
./scripts/generate.sh --lang $(LANGS)

run-all: build
./$(BINARY) --enable-grpc --enable-mcp --enable-web

run-grpc: build
./$(BINARY) --enable-grpc

run-mcp: build
./$(BINARY) --enable-mcp

run-web: build
./$(BINARY) --enable-mcp --enable-web

test:
go test ./...

# Rust build and run targets
RUST_BINARY=rust/target/release/agentic-rtb-framework-service

.PHONY: build-rust run-rust build-all

build-rust:
cd rust && cargo build --release

run-rust: build-rust
ARTF_GRPC_SERVER_PORT=50053 ARTF_HTTP_SERVER_PORT=8082 $(RUST_BINARY)

build-all: build build-rust

# Protobuf targets

bindings:
for x in ${LANGUAGES}; do \
protoc --proto_path=. \
--$${x}_out=. \
--experimental_editions \
openrtb.proto agenticrtbframework.proto; \
protoc --proto_path=. \
--$${x}_out=. \
--$${x}-grpc_out=require_unimplemented_servers=false:. \
agenticrtbframeworkservices.proto; \
done

check:
prototool lint

clean:
for x in ${LANGUAGES}; do \
rm -fr $${x}/*; \
done

docs:
podman run --rm \
-v ${PWD}:${PWD} \
-w ${PWD} \
pseudomuto/protoc-gen-doc \
--doc_opt=html,doc.html \
--proto_path=${PWD} \
openrtb.proto agenticrtbframework.proto agenticrtbframeworkservices.proto

watch:
fswatch -r ./ | xargs -n1 make docs
fetch-openrtb:
mkdir -p proto/com/iabtechlab/openrtb/v2
curl -L --fail \
https://raw.githubusercontent.com/InteractiveAdvertisingBureau/openrtb2.x/main/proto/src/main/com/iabtechlab/openrtb/v2/openrtb.proto \
-o proto/com/iabtechlab/openrtb/v2/openrtb.proto
86 changes: 55 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,37 @@ https://iabtechlab.com/standards/artf/

#### How to get started

Download the openRTB official 2.6 Protocol Buffers specification from https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/proto/src/main/com/iabtechlab/openrtb/v2/openrtb.proto to this directory.
`make generate` will fetch the OpenRTB 2.6 proto automatically. If you want to refresh it manually, run `make fetch-openrtb`.

From the command line:

1. Install `make` and the latest version of `protoc`.
2. Open the `Makefile` and choose the language(s) for which the Protocol Buffers
object code should be generated.
3. Run `make`.
2. Choose the language(s) for which the Protocol Buffers object code should be generated.
3. Run `make generate` or `make generate LANG=java`.

#### Package names in generated code

If you want generated code to use your own repo/package name, set the package options in the `.proto` files before generating code.

Examples:

- Go: `option go_package = "github.com/your-org/your-repo/pkg/pb/artf;artf";`
- Java: `option java_package = "com.yourorg.yourrepo.artf";`
- C++: `option cpp_namespace = "your::org::yourrepo::artf";`
- Rust: use the generator/tooling-specific crate/module naming options for your Rust codegen pipeline

#### Language selection with `make generate`

You can pick one or more languages by passing a variable to `make`:

```bash
make generate
make generate LANG=java
make generate LANG=go,cpp,java
make generate LANGS=rust
```

`LANG` and `LANGS` are both accepted; if neither is set, Go is generated by default.

#### Contact
For more information, or to get involved, please email support@iabtechlab.com.
Expand Down Expand Up @@ -68,7 +91,7 @@ The following tools must be installed to generate protobuf code:
export PATH="$PATH:$(go env GOPATH)/bin"
```

Go module dependencies (managed via `go.mod`):
Go module dependencies are managed in the workspace modules:

| Package | Version | Purpose |
|---------|---------|---------|
Expand All @@ -79,55 +102,56 @@ Go module dependencies (managed via `go.mod`):
#### Build and Run

```bash
# Install dependencies
make deps

# Generate protobuf code
# Generate protobuf code (root repo task)
make generate

# Build the server
make build
# Build the service binary
make -C examples/golang build

# Run with all services enabled
make run-all
# Run with all interfaces enabled
make -C examples/golang run-all

# Run in development mode (verbose)
make run-dev
# Run specific service modes
make -C examples/golang run-grpc
make -C examples/golang run-mcp
make -C examples/golang run-web
```

#### Docker Deployment

```bash
# Build Docker image
make docker-build
# Build the service Docker image
make -C examples/golang docker-build

# Run with Docker
make docker-run-all
# Run the image directly
make -C examples/golang docker-run-all

# Or use docker-compose
make docker-compose-up
# Or use the service compose file
cd examples/golang && docker compose up --build
```

### Architecture

```
.
├── cmd/agent/ # Main agent entry point
├── internal/
│ ├── agent/ # gRPC agent implementation
│ ├── handlers/ # Mutation handlers for different intents
│ ├── health/ # Kubernetes health check endpoints
│ ├── mcp/ # MCP server implementation
│ └── web/ # Web UI for testing
├── pkg/pb/ # Generated protobuf Go code
├── examples/golang/
│ ├── cmd/agent/ # Main agent entry point
│ └── internal/
│ ├── agent/ # gRPC agent implementation
│ ├── handlers/ # Mutation handlers for different intents
│ ├── health/ # Kubernetes health check endpoints
│ ├── mcp/ # MCP server implementation
│ └── web/ # Web UI for testing
├── pkg/ # Shared Go module for generated protobuf code
│ └── pb/ # Generated protobuf Go code
├── proto/ # Protocol buffer definitions
│ ├── agenticrtbframework.proto # ARTF service definition
│ └── com/iabtechlab/openrtb/ # OpenRTB v2.6 definitions
├── samples/ # Sample ORTB payloads for testing
├── docs/ # Specifications and documentation
├── scripts/ # Build and utility scripts
├── Dockerfile # Container build definition
└── docker-compose.yml # Local development setup
├── Makefile # Root proto generation tasks
└── go.work # Go workspace for repo modules
```

### API
Expand Down
Loading