noclocksai

No Clocks AI

https://github.com/noclocks/noclocksai

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.4%) to scientific vocabulary

Keywords from Contributors

sequences interactive optim brain-computer-interfaces mesh interpretability benchmarking imaging generic projection
Last synced: 10 months ago · JSON representation

Repository

No Clocks AI

Basic Info
  • Host: GitHub
  • Owner: noclocks
  • Language: R
  • Default Branch: main
  • Size: 2.34 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created over 1 year ago · Last pushed 12 months ago
Metadata Files
Readme Changelog License Codemeta

README.md

noclocksai

Ask DeepWiki GitMCP

Test Coverage R-CMD-Check Automate Changelog <!-- badges: end -->

Overview

The noclocksai package provides a comprehensive toolkit for working with AI services at No Clocks, LLC. It simplifies interactions with various AI models, provides utilities for embedding, database operations, and includes a flexible agent framework for creating AI assistants.

Key Features

  • Agent Framework: Create and manage AI agents with memory, tools, and vector store capabilities
  • Chat Interfaces: Simplified interactions with popular AI providers (OpenAI, Claude, Gemini)
  • Embeddings: Generate and manage vector embeddings for RAG applications
  • Database Integration: Store and retrieve embeddings and documents
  • API Connectors: Wrappers for OpenAI, Google Maps, Geocoding, FireCrawl, and more
  • Utility Functions: Tools for caching, logging, data extraction, and markdown processing
  • Mermaid Diagrams: Generate mermaid.js diagrams with natural language
  • Configuration Management: Secure API key and environment management

AI & Agentic Capabilities

LLM Provider Integrations

  • OpenAI: GPT-4o, GPT-4, and other models
  • Anthropic: Claude models
  • Google: Gemini models
  • Ollama: Local model hosting
  • Groq: High-performance inference

AI Agents

  • Base Agent: R6 class with memory, tools, and vector store capabilities
  • Specialized Agents:
    • EDA Agent: For exploratory data analysis and anomaly detection
    • Mermaid Agent: For generating diagrams from natural language
    • Git Agent: For repository management and commit messages

Included Prompt Templates

  • Code Analysis: For analyzing and explaining code
  • Document Processing: For document summarization and analysis
  • Exploratory Data Analysis: For statistical analysis
  • Markdown Enhancement: For improving markdown documents
  • Git Commits: For generating commit messages
  • Synthetic Data: For generating sample data
  • SQL to Text: For explaining SQL queries
  • Execute R Code: For safe code execution
  • Anomaly Detection: For identifying outliers in data

AI Tools

  • Code Tools: Extract, format, and execute code
  • Data Analysis: Anomaly detection, correlation analysis
  • Geospatial: Google Maps integration, geocoding, weather data
  • Database: Query execution with LLM assistance
  • Time & Date: Timezone-aware functions

External API Integrations

  • OpenWeather: Weather data retrieval by coordinates or location
  • Google Maps: Geocoding, place search, and location data
  • FireCrawl: Web scraping and crawling capabilities
  • Langfuse: Comprehensive LLM observability and analytics
    • Trace chat sessions
    • Record user feedback
    • Manage prompt templates
    • Create evaluation datasets
    • Run experiments

Type System

The package includes a robust type system for parameter validation:

  • Primitive Types: String, number, integer, boolean, array, object
  • Complex Types: For specialized data formats
    • type_gmaps_geocode_response: Google Maps geocoding responses
    • type_gmaps_places_search_response: Places API responses
    • type_dataset_docs: Document dataset format

Installation

You can install the development version of noclocksai from GitHub:

R pak::pak("noclocks/noclocksai")

System Requirements

This package requires: - R 4.1 or later - Node.js with npm/npx (for certain features) - Database connections (for vector stores)

Basic Usage

Creating a Chat Agent

```r library(noclocksai)

Initialize a simple chat

chat <- initializechat( model = "gpt-4o", systemprompt = "You are a helpful AI assistant." )

Chat with the agent

chat$chat("What is the R programming language?") ```

Using Geocoding and Weather APIs

Below is an example of registering some tools for the chat agent to use:

```r registertools( chat, tools = list( toolcurrenttime(), toolgeocodelocation(), toolget_weather() ) )

✔ Successfully registered tool: getcurrenttime

✔ Successfully registered tool: geocode_location

✔ Successfully registered tool: get_weather

✔ Successfully registered 3 tools.

```

Now you can ask the agent about the current time or weather:

```r

chat with tools

chat$chat("What is the current time?")

[1] "The current time is 21:06:05 EDT on March 21, 2025."

chat$chat("What is the weather in Atlanta?")

[1] "The current weather in Atlanta is clear with a temperature of 11.75°C. The wind is blowing at 2.75 m/s from the west, and the humidity is 34%."

```

Creating Mermaid Diagrams

```r

initialize agent

mermaidagent <- initializechat(systemprompt = promptmermaid_sys())

example code for a diagram

example <- "starwars |> group_by(species) |> summarise( n = n(), mass = mean(mass, na.rm = TRUE) ) |> filter( n > 1, mass > 50 )"

prompt for mermaid diagram

resp <- createmermaiddiagram( mermaidagent, promptmermaid_user(code = example) ) resp

```mermaid

graph TD

A[starwars dataset] --> B[Group by species]

B --> C[Summarise]

C -->|Calculate n = count of species| D

C -->|Calculate mass = mean mass of species| D

D --> E[Filter]

E -->|n > 1| F[Filtered Data]

E -->|mass > 50| F[Filtered Data]

```

extract code & render diagram

extract_code(resp, "mermaid") |> Diagrammer::Diagrammer() ```

![mermaid-diagram-example](man/figures/mermaid.png)

Extracting Code from Text

r text <- "Here's an example: r library(dplyr) mtcars |> groupby(cyl) |> summarise(avgmpg = mean(mpg)) ```"

Extract the R code

code <- extract_code(text, lang = "r") ```

Working with PostgreSQL Databases

```r

Connect to a PostgreSQL database

conn <- dbconnect(list( driver = "PostgreSQL", host = "localhost", dbname = "mydatabase", user = "postgres", password = "password", port = 5432 ))

Query the database and store documents for vector search

dbstoredocument( conn, title = "Sample Document", content = "This is a sample document for vector search.", metadata = list(author = "Jane Doe", date = Sys.Date()) )

Retrieve documents using semantic search

results <- dbgetdocuments(conn, "sample vector search") ```

Complex Workflow Example

The following example shows how to create an agent that uses multiple tools:

```r

Create an agent with vector store capabilities

agent <- Agent$new( provider = "openai", model = "gpt-4o", system_prompt = "You are an assistant that helps analyze real estate data.", name = "real-estate-assistant" )

Register external API tools with the agent

agent$registertool(toolgeocodelocation()) agent$registertool(toolgetweather()) agent$registertool(toolgmapsplacessearch())

Connect the agent to a database for document storage

agent$dbconnect(dbconfig = list( driver = "PostgreSQL", host = "34.75.86.90", dbname = "gmhleasingdev", user = "postgres", password = "password", port = 5432 ))

Add a resource to the agent

agent$addresource( name = "marketdata", content = read.csv("market_data.csv"), type = "dataframe" )

Ask the agent a question that requires using multiple tools

response <- agent$chat( "What are the current market conditions for apartment rentals in New York City, and how might the current weather impact showings this weekend?" )

Save the agent state for later use

agent$savestate("agentstate.rds") ```

Documentation

For more detailed information, see the package vignettes:

```r

List available vignettes

vignette(package = "noclocksai")

View a specific vignette

vignette("noclocksai", package = "noclocksai") ```

License

This package is licensed under a proprietary license - see the LICENSE file for details.

Contributing

This package is primarily maintained by No Clocks, LLC. Please file issues for bugs or feature requests.

Owner

  • Name: No Clocks, LLC
  • Login: noclocks
  • Kind: organization
  • Email: support@noclockstech.com
  • Location: United States of America

Technology Startup

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "noclocksai",
  "description": "The `noclocksai` package provides a set of tools for working with AI at No Clocks, LLC.",
  "name": "noclocksai: No Clocks AI",
  "codeRepository": "https://github.com/noclocks/noclocksai",
  "issueTracker": "https://github.com/noclocks/noclocksai/issues",
  "license": "file LICENSE",
  "version": "0.0.0.9000",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.4.2 (2024-10-31 ucrt)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Jimmy",
      "familyName": "Briggs",
      "email": "jimmy.briggs@jimbrig.com",
      "@id": "https://orcid.org/0000-0002-7489-8787"
    },
    {
      "@type": "Person",
      "givenName": "Patrick",
      "familyName": "Howard",
      "email": "patrick.howard@noclocks.dev"
    }
  ],
  "copyrightHolder": [
    {
      "@type": "Organization",
      "name": "No Clocks, LLC",
      "email": "team@noclocks.dev"
    }
  ],
  "funder": [
    {
      "@type": "Organization",
      "name": "No Clocks, LLC",
      "email": "team@noclocks.dev"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Jimmy",
      "familyName": "Briggs",
      "email": "jimmy.briggs@jimbrig.com",
      "@id": "https://orcid.org/0000-0002-7489-8787"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "spelling",
      "name": "spelling",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=spelling"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    }
  ],
  "softwareRequirements": {
    "SystemRequirements": null
  },
  "fileSize": "76.582KB"
}

GitHub Events

Total
  • Issues event: 2
  • Watch event: 1
  • Delete event: 2
  • Issue comment event: 4
  • Push event: 52
  • Pull request review event: 9
  • Pull request event: 10
  • Create event: 6
Last Year
  • Issues event: 2
  • Watch event: 1
  • Delete event: 2
  • Issue comment event: 4
  • Push event: 52
  • Pull request review event: 9
  • Pull request event: 10
  • Create event: 6

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 103
  • Total Committers: 3
  • Avg Commits per committer: 34.333
  • Development Distribution Score (DDS): 0.126
Past Year
  • Commits: 103
  • Committers: 3
  • Avg Commits per committer: 34.333
  • Development Distribution Score (DDS): 0.126
Top Committers
Name Email Commits
Jimmy Briggs j****s@n****v 90
github-actions[bot] g****] 12
dependabot[bot] 4****] 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 4
  • Average time to close issues: 12 days
  • Average time to close pull requests: 2 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.25
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 1
  • Pull requests: 4
  • Average time to close issues: 12 days
  • Average time to close pull requests: 2 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.25
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • jimbrig (1)
Pull Request Authors
  • dependabot[bot] (5)
  • jimbrig (5)
Top Labels
Issue Labels
feature (1)
Pull Request Labels
dependencies (5) github_actions (3)

Dependencies

.github/workflows/changelog.yml actions
  • actions/checkout v4 composite
  • tj-actions/git-cliff v1.5.0 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • codecov/codecov-action v4 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • cli * imports
  • ellmer * imports
  • pkgload * imports
  • purrr * imports
  • rlang * imports
  • stringr * imports
  • utils * imports
  • whisker * imports
  • yaml * imports
  • knitr * suggests
  • rmarkdown * suggests
  • spelling * suggests
  • testthat >= 3.0.0 suggests