Skip to content

cogniolab/microgpt-agent-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MicroGPT Agent SDK

Production-ready TypeScript SDK for building AI agents with advanced memory, multi-agent orchestration, and comprehensive testing capabilities.

Why MicroGPT Agent SDK?

Building production AI agents requires more than just API calls. You need:

  • Persistent Memory: Agents that remember conversations across sessions
  • Multi-Agent Coordination: Orchestrate teams of specialized agents
  • Production Testing: Test agents with real human feedback before deployment
  • Protocol Flexibility: Support for MCP, ACP, and other agent protocols
  • Provider Agnostic: Works with OpenAI, Anthropic, Ollama, and more

MicroGPT Agent SDK provides battle-tested infrastructure so you can focus on building intelligent agent behaviors, not reinventing the wheel.

Key Features

🧠 Advanced Memory System

  • Hybrid Memory: Combines Redis (short-term), Supabase (long-term), and vector databases (semantic)
  • Automatic Context Management: Agents remember relevant information across conversations
  • Distributed Memory: Share memory across multiple agent instances

🀝 Multi-Agent Orchestration

  • Message Bus: Event-driven communication between agents
  • Distributed Locking: Prevent race conditions in multi-agent systems
  • Shared Context: Agents collaborate with shared state
  • Workflow Coordination: Chain agents into complex workflows

πŸ§ͺ Human-in-the-Loop Testing

  • HITL Framework: Test agents with real human feedback before production
  • Test Orchestration: Coordinate complex test scenarios
  • Performance Benchmarking: Measure latency, cost, and quality
  • Integration Testing: Test entire agent workflows

πŸ”Œ Protocol Support

  • MCP Adapter: Model Context Protocol integration
  • ACP Adapter: Agent Communication Protocol
  • FIPA Adapter: FIPA agent standards
  • Custom Protocols: Extend with your own protocols

🎯 Provider Flexibility

  • OpenAI: GPT-4, GPT-3.5-turbo, function calling
  • Anthropic: Claude 3 Opus, Sonnet, Haiku
  • Ollama: Local model support
  • Unified Interface: Switch providers without code changes

Quick Start

Installation

npm install microgpt-agent-sdk

Basic Agent

import { AgentSDK } from 'microgpt-agent-sdk';

const sdk = new AgentSDK({
  provider: 'openai',
  apiKey: process.env.OPENAI_API_KEY
});

const agent = sdk.createAgent({
  name: 'assistant',
  systemPrompt: 'You are a helpful assistant.'
});

const response = await agent.chat('Hello!');
console.log(response);

Agent with Memory

import { AgentSDK, MemoryConfig } from 'microgpt-agent-sdk';

const sdk = new AgentSDK({
  provider: 'openai',
  apiKey: process.env.OPENAI_API_KEY,
  memory: {
    shortTerm: {
      type: 'redis',
      url: process.env.REDIS_URL
    },
    longTerm: {
      type: 'supabase',
      url: process.env.SUPABASE_URL,
      key: process.env.SUPABASE_KEY
    }
  }
});

const agent = sdk.createAgent({
  name: 'assistant',
  systemPrompt: 'You are a helpful assistant with memory.',
  memoryEnabled: true
});

// Agent remembers context across sessions
await agent.chat('My name is Alice');
// Later...
await agent.chat('What is my name?'); // "Your name is Alice"

Multi-Agent System

import { Orchestrator } from 'microgpt-agent-sdk';

const orchestrator = new Orchestrator();

// Create specialized agents
const researcher = orchestrator.createAgent({
  name: 'researcher',
  systemPrompt: 'You research topics thoroughly.'
});

const writer = orchestrator.createAgent({
  name: 'writer',
  systemPrompt: 'You write clear, engaging content.'
});

// Coordinate workflow
const workflow = orchestrator.createWorkflow()
  .step('research', researcher, { task: 'Research AI safety' })
  .step('write', writer, {
    task: 'Write article',
    context: (results) => results.research
  });

const result = await workflow.execute();

Human-in-the-Loop Testing

import { TestFramework } from 'microgpt-agent-sdk';

const testFramework = new TestFramework();

// Create test suite
const suite = testFramework.createSuite({
  name: 'Customer Support Agent',
  agent: customerSupportAgent
});

// Add test scenarios
suite.addScenario({
  name: 'Handle refund request',
  input: 'I want a refund for order #12345',
  expectedBehavior: 'Agent should verify order and process refund',
  humanReviewer: true // Request human review
});

// Run tests
const results = await suite.run();
console.log(`Pass rate: ${results.passRate}%`);

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     MicroGPT Agent SDK                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚    Memory    β”‚  β”‚ Orchestrationβ”‚  β”‚   Testing    β”‚      β”‚
β”‚  β”‚              β”‚  β”‚              β”‚  β”‚              β”‚      β”‚
β”‚  β”‚ β€’ Short-term β”‚  β”‚ β€’ Message Busβ”‚  β”‚ β€’ HITL       β”‚      β”‚
β”‚  β”‚ β€’ Long-term  β”‚  β”‚ β€’ Workflows  β”‚  β”‚ β€’ Integrationβ”‚      β”‚
β”‚  β”‚ β€’ Semantic   β”‚  β”‚ β€’ Locking    β”‚  β”‚ β€’ Performanceβ”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                                                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚  Protocols   β”‚  β”‚   Providers  β”‚  β”‚   Learning   β”‚      β”‚
β”‚  β”‚              β”‚  β”‚              β”‚  β”‚              β”‚      β”‚
β”‚  β”‚ β€’ MCP        β”‚  β”‚ β€’ OpenAI     β”‚  β”‚ β€’ Patterns   β”‚      β”‚
β”‚  β”‚ β€’ ACP        β”‚  β”‚ β€’ Anthropic  β”‚  β”‚ β€’ Optimizationβ”‚     β”‚
β”‚  β”‚ β€’ FIPA       β”‚  β”‚ β€’ Ollama     β”‚  β”‚ β€’ Analytics  β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                                                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Documentation

Examples

Check out the examples directory for complete working examples:

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE

πŸ’¬ Community

Join our community to ask questions, share ideas, and connect with other developers building production-ready AI agents!

We're building a supportive community where developers help each other create robust, production-ready AI agents. Whether you're just getting started or scaling to production, your questions and contributions are welcome!


Built with ❀️ by Cognio Lab

MicroGPT Agent SDK is built and maintained by Cognio Lab, creators of production AI agent infrastructure.

About

Production-ready TypeScript SDK for building AI agents with advanced memory, orchestration, and testing capabilities

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •