New:System Graph 2.0Learn more
Advanced

Custom AI Agents

Build, deploy, and manage your own AI testing agents using the Zof Agent SDK. Extend the platform with domain-specific testing intelligence.

Why Build Custom Agents?

Domain Expertise

Encode your domain-specific testing knowledge into reusable, intelligent agents.

Proprietary Testing

Test internal systems and proprietary protocols that standard agents cannot handle.

Continuous Learning

Train agents on your historical test data to improve accuracy over time.

Agent Architecture

import { Agent, TestContext, TestResult } from '@zof-ai/sdk';

export class MyCustomAgent extends Agent {
  name = 'my-custom-agent';
  version = '1.0.0';
  
  // Define what this agent can test
  capabilities = ['api', 'integration', 'custom-protocol'];
  
  // Initialize agent with configuration
  async initialize(config: AgentConfig): Promise<void> {
    this.config = config;
    await this.loadModels();
  }
  
  // Main test execution logic
  async execute(context: TestContext): Promise<TestResult> {
    const { target, parameters } = context;
    
    // Your custom testing logic here
    const analysis = await this.analyzeTarget(target);
    const tests = await this.generateTests(analysis);
    const results = await this.runTests(tests);
    
    return {
      passed: results.filter(r => r.passed).length,
      failed: results.filter(r => !r.passed).length,
      details: results,
      coverage: this.calculateCoverage(results),
    };
  }
  
  // Handle cleanup
  async cleanup(): Promise<void> {
    await this.releaseResources();
  }
}

Base Agent Class

Inherit from Agent to get lifecycle management, logging, and metrics out of the box.

Test Context

Access system graph data, environment variables, and test parameters.

Result Reporting

Structured result format with automatic dashboard integration.

Error Handling

Built-in retry logic, timeout management, and graceful degradation.

Deployment Options

Cloud Hosted

Deploy to Zof Cloud for zero infrastructure management.

zof agent deploy --target cloud

Self-Hosted

Run agents in your own infrastructure for data sovereignty.

zof agent deploy --target self-hosted

Hybrid

Orchestrate from cloud, execute on your infrastructure.

zof agent deploy --target hybrid

Getting Started

1

Install the SDK

npm install @zof-ai/sdk
2

Create your agent

zof agent create my-custom-agent
3

Implement test logic

code src/agents/my-custom-agent.ts
4

Test locally

zof agent test --local
5

Deploy to production

zof agent deploy --production

Need Help Building Agents?

Our solutions engineering team can help you design and implement custom agents tailored to your specific testing requirements.