Claude Code + OpenKBS: Vibe Coding Multi-Agent Systems

Introduction: Vibe Coding Multi-Agent Systems

This tutorial demonstrates vibe coding techniques for building multi-agent systems using Claude Code and OpenKBS. We'll show how to integrate OpenKBS as an API into existing projects and create sophisticated agent orchestration patterns. The example builds a financial analysis system, but the patterns apply to any multi-agent architecture.

Install Required Tools

Start by installing the essential tools:

npm i -g @anthropic-ai/claude-code
npm i -g openkbs

Create Your First Agent with Vibe Coding

Create a new OpenKBS project and enter vibe coding mode:

openkbs create finance-agent
cd finance-agent
claude

Now use natural language to describe your agent:

Create a financial agent that browses the web to find and return the revenue, net_income, market_cap (in billions as a decimal), and recent news for a company by its ticker symbol.

Deploy and Test Your Agent

Deploy your agent and run initial tests:

openkbs login
openkbs push
node scripts/run_job.js

Integrate with Existing Database Infrastructure

Set up a local MySQL database to demonstrate integration with existing systems:

mysql -u root -p

Execute these SQL commands:

CREATE DATABASE demo;
CREATE USER 'demo'@'localhost' IDENTIFIED BY 'demo';
GRANT ALL PRIVILEGES ON demo.* TO 'demo'@'localhost';
FLUSH PRIVILEGES;

Vibe Code Database Integration

Use Claude Code to refactor your run_job script with natural language instructions:

Refactor run_job script to connect to a local MySQL database with user, password, and database all set to "demo". Implement the following commands: run_job.js create_db, run_job.js add "AAPL, JNJ, DIS, XOM, PG", run_job.js process_all - pulls every second for unprocessed companies, processes them in parallel, stores results as JSON.

Build Supporting Infrastructure

Create a web interface to display data:

Great, now lets implement simple financial website to display the data to our visitors, use nodejs port 3333

Create Multi-Agent Architecture

Add a second agent with vibe coding:

Great, now let's create a competitor-agent that, similar to the financial agent, run_job pulls every second, but for processed companies without competitor analysis. When it finds such companies, it stops pulling, runs jobs to find industry competitors, then adds them to the database for processing. It will also create database relations so users can click and see competitors on our website.

The Power of OpenKBS API Integration

This approach demonstrates how OpenKBS functions as a powerful API layer for existing projects. Instead of rebuilding your infrastructure, you integrate OpenKBS agents as intelligent microservices that can be called from your existing codebase, databases, and web applications.

Multi-Agent Orchestration Patterns

The tutorial showcases key patterns:

Agent Specialization: Each agent has a specific role (financial data vs competitor analysis)
Event-Driven Processing: Agents respond to database state changes
Parallel Processing: Multiple companies processed simultaneously
Data Relationships: Agents create and maintain database relationships
API Integration: Seamless integration with existing Node.js/MySQL infrastructure

The Claude Code + OpenKBS Symbiosis

This is the symbiosis between Claude Code and OpenKBS - Claude Code provides intelligent vibe coding for rapid development, while OpenKBS handles agent deployment, execution, and API integration. Together, they enable building sophisticated multi-agent systems with natural language instructions and seamless integration into existing projects.