A multi-agent framework built with OpenAI Agents that orchestrates specialized AI agents for project management and deployment monitoring. Designed to be integrated with custom GPTs for seamless workflow automation.
This is an agentic framework that provides intelligent task delegation through specialized agents:
- π€ Coordinator Agent: Main orchestrator that routes tasks to specialized agents
- π Linear Agent: Manages Linear issues, comments, and project workflows
- π Hosting Agent: Monitors Vercel deployments, logs, and infrastructure
# Clone and install
git clone <repository-url>
cd spellcast
npm install
# Configure environment
cp .env.example .env.localAdd your API keys to .env.local:
# Required
API_KEY=your_secure_api_key_here, used as a simple bearer
OPENAI_API_KEY=your_openai_api_key_here
# Optional (agents only activate if keys are present)
LINEAR_API_KEY=your_linear_api_key_here # For Linear integration
VERCEL_API_KEY=your_vercel_api_key_here # For Vercel monitoring
# Firebase (for trace storage)
FIREBASE_SERVICE_ACCOUNT={"type": "service_account", ...}
FIREBASE_PROJECT_ID=your_project_idnpm run dev
# Server runs on http://localhost:3000You are an AI assistant that helps users manage their development workflow using the Agentic Spellcast Framework. This system provides specialized agents for Linear project management and Vercel deployment monitoring.
**Available Capabilities:**
- **Linear Integration**: Create, search, update issues and comments across teams and projects
- **Vercel Monitoring**: Monitor deployments, check status, analyze logs, and manage projects
- **Smart Routing**: Automatically delegate tasks to the appropriate specialized agent
**Base API URL:** https://your-spellcast-domain.com
**Authentication:** Use the provided API key in the Authorization header
**Usage Guidelines:**
1. Always check which services are available before suggesting actions
2. For Linear tasks (issues, bugs, tickets): Use the Linear agent
3. For deployment monitoring (Vercel, hosting, logs): Use the Hosting agent
4. For general queries or multi-step workflows: Use the Coordinator agent
5. Provide clear, structured responses with next steps when appropriate
**API Usage:**
- POST /api/traces - Create new agent trace with task description
- GET /api/traces - List all traces and their status
- GET /api/traces/{id} - Get detailed trace results and events
Always provide helpful context about what actions will be taken and suggest relevant follow-up tasks.
Purpose: Main orchestrator that routes requests to specialized agents
Capabilities:
- Intelligent task routing
- Multi-agent workflow coordination
- General assistance and web search
Purpose: Linear issue and project management
Capabilities:
- Create, search, and update issues
- Manage comments and discussions
- Handle team, user, and project resolution
- Issue state and priority management
Tools Available:
create_issue- Create new Linear issuessearch_issues- Search issues by various criteriaget_issue- Get detailed issue informationupdate_issue- Update existing issuesget_issue_comments- Retrieve issue commentsadd_comment- Add comments to issues
Purpose: Vercel deployment monitoring and management
Capabilities:
- Monitor deployment status and health
- Analyze build and runtime logs
- Track deployment history
- Project management
Tools Available:
get_deployments- List deployments with statusget_deployment_status- Get detailed deployment infoget_deployment_logs- Retrieve build/runtime logsget_projects- List all Vercel projects
Just check the swagger ui at /api/docs/ui
To extend the framework with additional agents:
Create a new agent file in src/agents/:
// src/agents/my-agent.ts
import { Agent, tool } from '@openai/agents';
import { AgentTracing, ToolTracing } from './util';
const myTool: ToolTracing = (t) => tool({
name: 'my_tool',
description: 'Description of what this tool does',
parameters: z.object({
param: z.string().describe('Parameter description')
}),
async execute({ param }: { param: string }) {
// Tool implementation
return { result: 'success' };
}
});
export const myAgent: AgentTracing = (t) => new Agent({
name: 'My Agent',
instructions: 'Agent instructions here',
tools: [myTool(t)]
});Add your agent to the schema in src/models/agenticTraceSchemas.ts:
export const AgentTypeSchema = z.enum([
'coordinator',
'linear',
'hosting',
'my-agent', // Add your agent here
]);Add your agent's tools to the AgentType schema in public/swagger.json to document the API capabilities.
Update src/agents/coordinator.ts to include handoff to your agent:
import { myAgentHandoff } from './my-agent';
// Add conditional handoff based on required API keys
if (env.MY_SERVICE_API_KEY) {
handoffs.push(myAgentHandoff(t));
}- OpenAI Agents Documentation: https://openai.github.io/openai-agents-js/
- Agent Patterns: See existing agents in
src/agents/for implementation examples - Tool Creation: Follow the pattern in existing tools for consistent error handling and tracing
src/
βββ agents/ # Agent implementations
β βββ coordinator.ts # Main orchestrator
β βββ linear-agent.ts # Linear integration
β βββ hosting-agent.ts # Vercel monitoring
β βββ util.ts # Agent utilities
βββ app/api/ # REST API endpoints
βββ lib/ # Utilities and services
βββ models/ # TypeScript schemas
βββ __tests__/ # Test suites
npm test # Run all tests
npm test hosting-agent # Run specific agent testsnpm run build # Production build
npm run dev # Development server- API key authentication on all endpoints
- Environment variable protection
- Input validation with Zod schemas
- No API keys exposed in logs or responses
- Secure agent-to-service communication