Complete setup and development guide for a TypeScript multi-agent framework with LLM integration, task management, memory system, and tool execution capabilities.
A comprehensive skill for setting up and developing a TypeScript-based multi-agent framework with LLM integration, memory systems, and task management capabilities.
This skill guides you through the complete setup, customization, and development of a cognitive agent framework. It covers project scaffolding, TypeScript configuration, implementation of core components (agents, LLM providers, memory, tools), testing, and documentation.
1. **Verify GitHub Copilot Instructions**
- Check that `.github/copilot-instructions.md` file exists in the repository
- This file provides workspace-specific custom instructions to Copilot
- Reference: [VS Code Copilot Customization](https://code.visualstudio.com/docs/copilot/copilot-customization#_use-a-githubcopilotinstructionsmd-file)
2. **Clarify Project Requirements**
- Confirm the project scope: TypeScript multi-agent framework
- Core features to implement:
- LLM integration (multiple provider support)
- Task management system
- Memory system (short-term and long-term)
- Tool execution capabilities
- Agent coordination and communication
3. **Scaffold the Complete Project Structure**
- Create the following directory structure:
```
project-root/
├── src/
│ ├── core/ # Core framework components
│ ├── agents/ # Agent implementations
│ ├── llm/ # LLM provider integrations
│ ├── memory/ # Memory system
│ ├── tools/ # Tool definitions and executors
│ ├── tasks/ # Task management
│ └── types/ # TypeScript type definitions
├── examples/ # Example agents and use cases
├── tests/ # Test files
├── docs/ # Documentation
├── .github/ # GitHub configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Dependencies
└── README.md # Main documentation
```
4. **Configure TypeScript**
- Create `tsconfig.json` with appropriate compiler options
- Enable strict type checking
- Configure module resolution for Node.js
- Set up source maps for debugging
5. **Set Up Package Dependencies**
- Initialize `package.json` with required dependencies:
- TypeScript
- Node.js types
- LLM SDK libraries (OpenAI, Anthropic, etc.)
- Testing framework (Jest or Vitest)
- Build tools
6. **Implement Core Framework Components**
- **Agent Base Class**: Abstract class with lifecycle methods (initialize, execute, cleanup)
- **Task Manager**: Queue system, priority handling, task scheduling
- **Memory System**:
- Short-term memory (conversation context)
- Long-term memory (persistent storage)
- Memory indexing and retrieval
- **Tool System**: Tool registration, validation, execution sandbox
7. **Integrate LLM Providers**
- Create abstraction layer for multiple LLM providers
- Implement adapters for:
- OpenAI (GPT-4, GPT-3.5)
- Anthropic (Claude)
- Other providers as needed
- Handle streaming responses and error recovery
- Implement token counting and rate limiting
8. **Build Agent Coordination**
- Inter-agent communication protocol
- Agent discovery and registration
- Delegation and collaboration patterns
- Conflict resolution mechanisms
9. **Install Required VS Code Extensions**
- Verify or install:
- GitHub Copilot (if available)
- ESLint for TypeScript
- Prettier for code formatting
- TypeScript language support
10. **Set Up Build and Development Tasks**
- Create `.vscode/tasks.json` with tasks for:
- `build`: Compile TypeScript to JavaScript
- `test`: Run test suite
- `watch`: Watch mode for development
- `run:example`: Execute example agents
- `lint`: Run ESLint
- `format`: Run Prettier
11. **Compile the Project**
- Run `npm install` to install all dependencies
- Execute `npm run build` to compile TypeScript
- Verify no compilation errors
- Check generated JavaScript output
12. **Create and Run Example Agents**
- Implement example agents demonstrating:
- Single-agent task execution
- Multi-agent collaboration
- Memory persistence and retrieval
- Tool usage
- Error handling
- Run examples to validate framework functionality
13. **Write and Execute Tests**
- Unit tests for core components
- Integration tests for agent workflows
- Memory system tests
- LLM provider integration tests
- Achieve >80% code coverage
14. **Complete Documentation**
- **README.md**: Project overview, features, quick start
- **QUICKSTART.md**: Step-by-step getting started guide
- **API Documentation**: Document all public APIs
- **Architecture Guide**: System design and component interaction
- **Example Guides**: Detailed example walkthroughs
- **Contributing Guide**: Development guidelines
15. **Final Verification Checklist**
- [ ] All TypeScript code compiles without errors
- [ ] Test suite passes with adequate coverage
- [ ] Example agents run successfully
- [ ] Documentation is complete and accurate
- [ ] Code is properly formatted and linted
- [ ] Dependencies are up to date and secure
- [ ] GitHub repository is properly configured
```typescript
import { Agent } from './src/core/Agent';
import { OpenAIProvider } from './src/llm/OpenAIProvider';
const agent = new Agent({
name: 'ResearchAgent',
llm: new OpenAIProvider({ model: 'gpt-4' }),
tools: ['web_search', 'summarize'],
memory: { type: 'persistent' }
});
await agent.execute('Research the latest AI trends');
```
```bash
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # With coverage report
```
```bash
npm run build # Compile TypeScript
npm run dev # Development mode
npm run example:basic # Run basic example
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/cognitive-agent-framework-setup/raw