The mono-repo for the Couchbase Agent Catalog project.
(in the works!)
-
Make sure you have Python 3.12 and Poetry installed!
-
In your
pyproject.toml
file, add the following line in the[tool.poetry.dependencies]
section:agentc = { git = "[email protected]:couchbaselabs/agent-catalog.git", subdirectory = "libs/agentc", extras = ["langchain"] }
-
Now run
poetry update
to automatically download theagentc
package into your Poetry environment.
-
Make sure you have Python 3.12 and Poetry installed!
-
Clone this repository. Make sure you have your SSH key setup!
git clone [email protected]:couchbaselabs/agent-catalog.git
-
Build the
agentc
package using Poetry.cd libs/agentc poetry build
-
You should now have a
dist
folder insidelibs/agentc
populated with a.whl
file, which you can install usingpip
. Navigate to your project and install this Python wheel using your project's Python environment.AGENT_CATALOG_WHEEL_FILE=$(ls $(pwd)/dist/agentc-*.whl | tr -d '\n') # Make sure you are using your project's Python environment! cd $MY_AGENT_PROJECT source $MY_PYTHON_ENVIRONMENT pip install "$AGENT_CATALOG_WHEEL_FILE"
To install the LangChain module associated with Agent Catalog, add
"[langchain]"
immediately after the wheel file:pip install "$AGENT_CATALOG_WHEEL_FILE""[langchain]"
If you've followed the steps above, you should now have the agentc
command line tool.
Run agentc --help
to verify your installation (note that your first run will take a couple of seconds, subsequent
runs will be faster).
Usage: agentc [OPTIONS] COMMAND [ARGS]...
The Couchbase Agent Catalog command line tool.
Options:
-c, --catalog DIRECTORY Directory of the local catalog files. [default: .agent-catalog]
-a, --activity DIRECTORY Directory of the local activity files (runtime data). [default: .agent-activity]
-v, --verbose Flag to enable verbose output. [default: 0; 0<=x<=2]
-i, --interactive / -ni, --no-interactive
Flag to enable interactive mode. [default: i]
--help Show this message and exit.
Commands:
add Interactively create a new tool or prompt and save it to the filesystem (output).
clean Delete all agent catalog related files / collections.
env Return all agentc related environment and configuration parameters as a JSON object.
execute Search and execute a specific tool.
find Find items from the catalog based on a natural language QUERY string or by name.
index Walk the source directory trees (SOURCE_DIRS) to index source files into the local catalog.
publish Upload the local catalog to a Couchbase instance.
status Show the status of the local catalog.
version Show the current version of agentc.
See: https://docs.couchbase.com for more information.
If you see the output above, you are all set! Head on over to our docs or our recipes to start developing your agent with Agent Catalog.
For examples on what an agentic workflow with agentc
looks like, see
the agent-catalog-example repository.
Refer to docs/
to explore templates and other references while writing your agent workflow with Couchbase
Agent Catalog. We also provide some starter recipes
if you are building an agent from scratch.
Every project package is wrapped under libs
. The following are sub-folders that you can explore:
agentc
, which contains the front-facing package for the Couchbase Agent Catalog project.agentc-cli
, which contains the command line interface for the Couchbase Agent Catalog project.agentc-core
, which contains the core SDK package for the Couchbase Agent Catalog project.agentc-langchain
, which contains additional tooling around building LangChain-specific agents.
Below, we list out some notes that developers might find useful w.r.t. Poetry:
- Before committing, always use
poetry update; poetry lock
! This will check if the dependencies laid out in thepyproject.toml
file are satisfiable and will repopulate the lock file appropriately. poetry install
vs.poetry update
: in the presence of apoetry.lock
file (which we do have), the former will only consider installing packages specified in the lock file. The latter (poetry update
) will read from thepyproject.toml
file and try to resolve dependencies from there.- Because these are a collection of libraries, we do not commit individual lock files for each sub-package. Do not
commit
poetry.lock
files.
To set up pre-commit
and reap all the benefits of code formatting, linting, etc... execute the following command:
pip install pre-commit
pre-commit install
To enable debug mode, execute the following command:
export AGENT_CATALOG_DEBUG=1