By continuing to browse this website, you agree to our use of cookies. Learn more at the Privacy Policy page.
Contact Us
Contact Us

Senior Python AI Engineer

Apply now

We are seeking a Senior AI Engineer to design and implement an agentic interface layer enabling autonomous campaign management through a custom MCP Server. You will build the bridge between Client Campaign Management Agent and PubMatic DSP, creating a toolset of campaign management capabilities, implementing multi-step workflow orchestration, and ensuring robust state management for agent-driven operations. This role combines AI/agent architecture with backend engineering to deliver production-grade infrastructure for autonomous advertising operations.

About the Project

The client is developing an AI-powered agentic advertising platform specializing in CTV programmatic advertising. Their Campaign Management Agent autonomously analyzes campaign performance and makes optimization decisions, but currently lacks a programmatic interface to execute those decisions on demand-side platforms.

Client has contracted with PubMatic Activate DSP as their first partner to validate their agentic campaign management capabilities. Since PubMatic’s existing MCP server focuses on deal marketplace intelligence rather than campaign management, the Client needs a custom MCP server that exposes campaign operations as discrete tools the agent can invoke.

The project aims to establish an Agentic Campaign Control workflow:

  • Custom MCP Server – JSON-RPC 2.0 interface following Model Context Protocol specifications
  • Campaign Management Toolset – 8+ tools enabling full campaign lifecycle management (create, configure, activate, monitor)
  • Agent Integration Layer – State management, conversation context, and workflow checkpointing

Your work will directly enable the Client agent to autonomously create and manage hundreds of concurrent campaigns, validating their go-to-market strategy for agent-driven advertising operations.

Responsibilities

MCP Server Architecture & Implementation

  • Design and implement a custom MCP Server following JSON-RPC 2.0 and Model Context Protocol specifications
  • Build API Gateway + Lambda architecture for MCP endpoints (tool discovery, tool execution)
  • Develop a tool registry with JSON Schema definitions for input validation
  • Implement a state management system (Aurora PostgreSQL or DynamoDB) for workflow checkpoints, entity tracking, and audit logging
  • Create conversation context storage enabling multi-turn agent interactions
  • Design authentication mechanisms (API key or OAuth2) for secure agent access
  • Implement request logging with correlation IDs using AWS X-Ray for distributed tracing
  • Build rate limiting per client using ElastiCache Redis
  • Create a comprehensive error response system following JSON-RPC error codes

Campaign Management toolset development

  • Design and implement campaign management tools as discrete, composable operations
  • Define clear tool interfaces with input/output schemas for each operation
  • Implement parameter validation against PubMatic specifications
  • Create tool response formatting for consistent agent consumption
  • Design tool composability enabling complex multi-step workflows
  • Build tool error handling with actionable error messages for agent decision-making

Multi-Step workflow orchestration

  • Design AWS Step Functions state machines for complex campaign operations
  • Implement workflow patterns: Campaign launch flow, Creative upload flow, Campaign update flow
  • Create state persistence at each workflow step, enabling recovery from transient failures
  • Build a workflow checkpointing mechanism, storing intermediate results
  • Implement error recovery strategies: automatic retries, rollback, compensation logic
  • Design idempotent workflow steps preventing duplicate operations
  • Create workflow monitoring and progress tracking for long-running operations

Agent Integration & State Management

  • Design a state management architecture for the agent conversation context
  • Implement entity state tracking (campaigns, line items, creatives, audiences)
  • Build a workflow checkpoint system enabling the agent to resume interrupted operations.
  • Create audit logging capturing all agent actions with timestamps and correlation IDs.
  • Develop session management for multi-turn agent interactions
  • Implement state synchronization between the agent context and PubMatic DSP
  • Design cache invalidation strategies for entity state changes
  • Build state query capabilities, enabling the agent to retrieve historical context

Integration with Campaign Management middleware

  • Collaborate with backend engineers to integrate the MCP toolset with Campaign Management Middleware.
  • Ensure MCP tools correctly invoke middleware abstractions rather than direct PubMatic API calls.
  • Implement error translation from the middleware/adapter layer to agent-friendly messages.
  • Design tool interfaces that hide DSP-specific complexity from the agent
  • Create middleware request formatting from tool parameters
  • Build a response transformation from middleware results to tool outputs
  • Implement timeout handling for long-running middleware operations

Security, Validation & Observability

  • Implement input validation against JSON Schema for all tool inputs
  • Create output validation, ensuring tool responses match declared schemas
  • Build an authentication layer (API key or OAuth2) for MCP endpoints
  • Implement authorisation checks for tool execution permissions
  • Design rate limiting, preventing agent abuse or runaway behaviour
  • Create comprehensive logging with structured JSON logs and correlation IDs
  • Build CloudWatch dashboards for MCP server metrics (tool invocations, latencies, errors)
  • Implement distributed tracing using AWS X-Ray for request flow visualisation
  • Design alerting for anomalous agent behaviour or tool failures

Required Qualifications

  • AI/Agent Engineering: 3+ years building AI systems, agent architectures, or LLM applications
  • Python Development: 5+ years with modern Python (3.9+) and async programming
  • API Development: building RESTful or RPC APIs
  • AWS Serverless: Lambda, API Gateway, Step Functions, DynamoDB/Aurora
  • Protocol Implementation: Experience implementing RPC protocols (JSON-RPC, gRPC, GraphQL)
  • English Proficiency: Upper-Intermediate (B2) minimum for technical documentation and collaboration

Nice to Have

  • Experience with MCP (Model Context Protocol) implementation
  • Previous work building LLM-powered applications or AI agents
  • Experience with Claude API, OpenAI function calling, or similar
  • Knowledge of PubMatic, Google Display & Video 360, or similar DSP platforms
  • Experience building campaign management systems
  • Familiarity with advertising industry standards and IAB specifications
  • Previous work in adtech, martech, or programmatic advertising
  • Experience with event sourcing and CQRS patterns
  • Knowledge of GraphQL or gRPC protocols

What you will get

  • Teams of people who love programming
  • Complex technical challenges with big data/high-load
  • Freedom to make your own engineering decisions and broad space for creativity
  • Modern technology stack to work with
  • Work remotely on a flexible schedule
  • Long-lasting projects
  • Financial compensation for professional events and education
  • Opportunity to choose the equipment you like
CTA

Looking for another position?

See all our open positions and learn why your should consider joining the Xenoss team.

Careers at Xenoss