Production-ready AI agent configurations for Groovy Web ecosystem
A comprehensive collection of AI agent configurations, prompts, and orchestration patterns for building intelligent web applications. This repository provides reusable agent templates for various use cases including content generation, data analysis, code review, and customer support.
- Modular Agent System: Pre-configured agent templates for common tasks
- Multi-Agent Orchestration: Patterns for agent collaboration and communication
- Prompt Engineering: Battle-tested prompts with examples
- Integration Ready: Works seamlessly with LangChain, OpenAI, and Anthropic APIs
- TypeScript Support: Full type definitions for agent configurations
- Testing Suite: Unit and integration tests for agent behaviors
npm install @groovy-web/ai-agents
# or
yarn add @groovy-web/ai-agents
# or
pnpm add @groovy-web/ai-agentsimport { ContentAgent, AnalysisAgent } from '@groovy-web/ai-agents';
// Initialize a content generation agent
const contentAgent = new ContentAgent({
model: 'gpt-4',
temperature: 0.7,
maxTokens: 2000,
});
const blogPost = await contentAgent.generate({
topic: 'The Future of Web Development',
tone: 'professional',
length: 'medium',
});
console.log(blogPost);Generate blog posts, social media content, marketing copy, and documentation.
import { ContentAgent } from '@groovy-web/ai-agents';
const agent = new ContentAgent();
const content = await agent.generateBlogPost({
title: 'Building Scalable APIs',
keywords: ['REST', 'GraphQL', 'Performance'],
});Analyze data, generate reports, and provide insights.
import { AnalysisAgent } from '@groovy-web/ai-agents';
const agent = new AnalysisAgent();
const insights = await agent.analyzeData({
data: userData,
metrics: ['engagement', 'retention', 'conversion'],
});Review code for best practices, security, and performance issues.
import { CodeReviewAgent } from '@groovy-web/ai-agents';
const agent = new CodeReviewAgent();
const review = await agent.reviewCode({
language: 'typescript',
code: sourceCode,
rules: ['security', 'performance', 'style'],
});Handle customer support queries with context-aware responses.
import { SupportAgent } from '@groovy-web/ai-agents';
const agent = new SupportAgent({
knowledgeBase: faqData,
companyInfo: companyDetails,
});
const response = await agent.handleQuery({
query: userQuery,
context: ticketHistory,
});interface AgentConfig {
model: string; // Model identifier (gpt-4, claude-3, etc.)
temperature?: number; // 0-1, default: 0.7
maxTokens?: number; // Max response tokens
apiKey?: string; // API key (or use env variable)
timeout?: number; // Request timeout in ms
retries?: number; // Retry attempts
memory?: boolean; // Enable conversation memory
}import { createAgent } from '@groovy-web/ai-agents';
const customAgent = createAgent({
name: 'SEOOptimizer',
systemPrompt: 'You are an SEO expert...',
tools: [keywordAnalyzer, contentOptimizer],
config: {
model: 'claude-3-opus',
temperature: 0.5,
},
});import { AgentOrchestrator } from '@groovy-web/ai-agents';
const orchestrator = new AgentOrchestrator();
const result = await orchestrator.sequential([
{ agent: researchAgent, input: topic },
{ agent: contentAgent, input: '$previous.research' },
{ agent: seoAgent, input: '$previous.content' },
]);const results = await orchestrator.parallel([
{ agent: translatorAgent, input: text, locale: 'es' },
{ agent: summarizerAgent, input: text },
{ agent: sentimentAgent, input: text },
]);const manager = new ManagerAgent({
subAgents: [researcher, writer, editor],
decisionStrategy: 'consensus', // or 'majority', 'manager-decides'
});
const output = await manager.coordinate({
task: 'Create technical documentation',
requirements: docs,
});# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Run specific test suite
npm test -- content-agent.test.ts- Agent Configuration Guide
- Multi-Agent Patterns
- Prompt Engineering
- Integration Examples
- API Reference
We welcome contributions! Please see our Contributing Guide for details.
MIT License - see LICENSE for details.
Give us a star on GitHub if you find this project helpful!
Made with β€οΈ by the Groovy Web Team
Explore more open-source tools from Groovy Web:
- langchain-multi-agent-example -- Multi-agent systems tutorial with LangChain
- rag-system-pgvector -- Production RAG with PostgreSQL + pgvector
- rag-systems-production -- Enterprise-grade RAG systems
- ai-testing-mcp -- AI testing via Model Context Protocol
- edge-computing-starter -- Cloudflare Workers + Hono template
- claude-code-workflows -- Workflows for Claude Code
- groovy-web-ai-agents -- Production AI agent configs
- groovy-web-examples -- Groovy/Grails examples