Preparing your workspace...

assistant-chat.tsx2.5k
utils.ts850
button.tsx720
Quick Actions
codmir
Docs
Discord
Get started
API
  • Introduction
  • Installation
  • Your First Project
  • Your First Agent

Run your first AI agent task — from ticket to deployed fix.

Your First Agent

This guide walks you through creating a ticket, assigning it to an AI agent, watching the agent work, reviewing the output, and deploying the fix. By the end, you will have seen the full loop: ticket to deployed code.

1. Create a Ticket

Via the Dashboard

  1. Go to your project in the Codmir dashboard
  2. Click New Ticket
  3. Fill in the details:
    • Title: "Fix password reset email not sending"
    • Type: Bug
    • Priority: High
  4. Click Create

Via the API

import { CodmirClient } from '@codmir/sdk';

const client = new CodmirClient({
  apiKey: process.env.CODMIR_API_KEY,
});

const ticket = await client.createTicket({
  projectId: 'my-project-id',
  title: 'Fix password reset email not sending',
  description: 'Users report that clicking "Reset Password" shows success but no email arrives. Check the email service integration and SMTP configuration.',
  type: 'bug',
  priority: 'high',
});

console.log(`Ticket created: ${ticket.id}`);

2. Assign to an AI Agent

Via the Dashboard

  1. Open the ticket
  2. Click Assign to Agent
  3. Select the agent type (or let Codmir auto-select)
  4. Click Start

Via the API

const task = await client.createAgentTask({
  projectId: 'my-project-id',
  type: 'bug_fix',
  title: 'Fix password reset email not sending',
  description: 'Investigate why password reset emails are not being sent. Check email service, SMTP config, and error logs.',
  priority: 'high',
});

console.log(`Agent task created: ${task.id}`);
console.log(`Status: ${task.status}`);

3. Watch the Agent Work

Once assigned, the agent follows this workflow:

  1. Investigate -- reads error logs, traces the code path, checks configuration
  2. Plan -- creates a task breakdown with specific files to change
  3. Code -- writes the fix, following project conventions from the Cortex Protocol
  4. Test -- runs the test suite against the changes
  5. PR -- opens a pull request with the fix

Monitor Progress via API

// Check task status
const task = await client.getAgentTask('task-id');
console.log(`Status: ${task.status}`);

// Stream real-time updates
const stream = await client.createFrameworkTaskStream('task-id');
stream.subscribe((event) => {
  console.log(`[${event.type}] ${event.data.message || ''}`);
});

Monitor via the Orchestrator

If you have the Overseer orchestrator running, check what the agent is doing:

import { createOrchestrator } from '@codmir/overseer';

const orchestrator = createOrchestrator({
  overseer: {
    projectId: 'my-project-id',
    organizationId: 'my-org',
    apiKey: process.env.CODMIR_API_KEY!,
  },
  defaultRepoUrl: 'https://github.com/my-org/my-app',
  defaultBranch: 'main',
});

// "What are you working on?"
const summary = orchestrator.getStatusSummary();
console.log(summary);

// Is it already handling this ticket?
const handling = orchestrator.isWorkingOn('ticket-id');
console.log(`Already on it: ${handling}`);

4. Review and Approve

When the agent finishes, you receive a notification. The pull request includes:

  • A description of the root cause
  • The code changes with explanations
  • Test results
  • A link back to the original ticket

Review the PR as you would any human-authored code:

// List agent tasks and their results
const tasks = await client.listAgentTasks('my-project-id');

for (const task of tasks) {
  if (task.status === 'completed') {
    console.log(`${task.title}: ${task.status}`);
  }
}

5. Auto-Deploy

If your CI/CD pipeline is connected, merging the PR triggers an automatic deployment. Codmir tracks the deployment and monitors for regressions.

If a regression is detected after deployment:

  1. Overseer captures the new errors
  2. The DecisionEngine evaluates severity
  3. If critical, the fix is reverted automatically
  4. You are notified via the configured escalation chain

The Full Loop

Ticket Created
    ↓
Agent Assigned
    ↓
Investigate → Plan → Code → Test → PR
    ↓
Human Review
    ↓
Merge → Deploy → Monitor
    ↓
(Regression?) → Auto-Revert → Escalate

Using Developer Agents

For more control over the agent's behavior, use the DevTeam from @codmir/ai:

import { createDevTeam } from '@codmir/ai';

const team = createDevTeam({
  projectContext: {
    projectId: 'my-project',
    name: 'My App',
    techStack: ['TypeScript', 'Next.js', 'Prisma'],
  },
});

const result = await team.assignTicket({
  id: 'TICKET-42',
  title: 'Fix password reset email',
  description: 'Password reset emails are not sending',
  priority: 'high',
  status: 'open',
});

console.log(result.plan);    // Task breakdown
console.log(result.changes); // Files modified
console.log(result.tests);   // Tests written or updated

Next Steps

  • Self-Healing -- let agents fix bugs automatically without creating tickets
  • Swarm Execution -- scale agent work across thousands of workers
  • Cortex Protocol -- give agents deep project context for better fixes
Open in ChatGPTOpen in ClaudeConnect MCP on CursorConnect MCP on WindsurfEdit on GitHub
codmir
Products
Desktop AppMobile AppIDE ExtensionAI AgentsOverseerVoice ModeCortex ProtocolHive MindGame Dev (Godat)PricingDownload
Solutions
AI Code AgentsCode ReviewError TrackingSelf-HealingDeploy TrackingAI Tracking SDKWorkflow AutomationTesting FrameworkTime TrackingVoice Control
Platform
ProjectsTickets & BoardsAgent MarketplaceIntegrationsTemplatesApp HubAdmin PanelAnalytics
Integrations
GitHubSlackDiscordVercelSentryRailwayLinearAll Integrations
Developers
DocumentationAPI ReferenceSDKCLIDeveloper PortalMarketplaceMCP ConnectorsWebhooksExamplesnpm Packages
Resources
BlogChangelogCommunityTutorialsGet StartedSupportStatusFeedback
Company
AboutCareersContact SalesKickstarterReferral Program
Legal
Terms of UsePrivacy PolicyEULATrademarkSecurity
Download on the App StoreGet it on Google Play

Codmir™ 2026. All rights reserved.

Free & open source SDK — Apache 2.0 License