Skip to content

ldoguin/nushell-ai-agents

Repository files navigation

Nushell Agents

Open in GitHub Codespaces Open in Gitpod

This repository contains an example of Ai agents built with Nushell.

cbsh
source agent.nu
run "who are the contibutors of the github project couchbaselabs/couchbase-shell "

Dependencies

Nushell

The only mandatory dependency is Nushell. Everything else will just be tools and models configuration. You can also use Couchbase Shell as a replacement, which is also needed for some of the available tools.

Nushell Plugin

nu_plugin_audio_hook

Install nu_plugin_audio_hook to get sounds notification at the end of an agent request.

Models

OpenAi

OpenAI Agents will work as long as you have set your OpenAi API key.

export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxx

Ollama

Follow their documentation on https://github.com/ollama/ollama/blob/main/README.md#quickstart

Make sure you have pulled models used by your agents first, and that your server is running on localhost:11434.

Tools

Couchbase Shell

Couchbase Shell will be used to store data, expecially vectors, so that you can easily run Vector Search. Its configuration must allow you to create buckets, scopes, collections and indexes.

DDGR

The search tool relies on DDGR.

Slides

Slides are displayed using presenterm.

cd slides
presenterm -x couchbase.md  # -x flag enables code execution from the slides, hit ctrl-e to run code during the presentation. 

Enabling slide nushell hightlighting

Installing presenterm from source is mandatory for this.

Nushell code highlighting is not available by default. To build it, place the synthax file in your bat config folder and rebuild it. Then copy and paste the synthax file in your local presenterm installation and rebuild it.

About

A Nushell experimentation with Ai agents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published