agenthub-typescript
v0.1.0
Published
AgentHub package
Readme
AgentHub TypeScript Implementation
This directory contains the TypeScript implementation of AgentHub, mirroring the Python implementation in src_py/.
Building
make install # Install dependencies
make build # Build TypeScript to JavaScript
make lint # Run ESLint
make test # Run testsUsage
Basic Client Usage
import { AutoLLMClient } from 'agenthub';
// Initialize with model name
const client = new AutoLLMClient('gemini-3-flash-preview');Tracer Usage
Save and browse conversation history with a web interface:
import { Tracer } from 'agenthub/integration/tracer';
// Create a tracer instance
const tracer = new Tracer('./cache');
// Save conversation history
tracer.saveHistory(history, 'session/conv_001', config);
// Start web server to view saved conversations
tracer.startWebServer('127.0.0.1', 5000);
// Open http://127.0.0.1:5000 in your browserPlayground Usage
Interactive web interface for chatting with LLMs:
import { startPlaygroundServer } from 'agenthub/integration/playground';
// Start the playground server
startPlaygroundServer('127.0.0.1', 5001);
// Open http://127.0.0.1:5001 in your browserExamples
Run the examples:
# Build the project
npm run build
# Run tracer example
node dist/examples/tracerExample.js
# Run playground example
node dist/examples/playgroundExample.js