Skip to content

About

Production patterns for agentic engineering pipelines — pre-hook interceptors, composable skills, closed-loop evaluation

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Agentic Engineering Platform

Production patterns for building reliable agentic engineering pipelines — pre-hook interceptors, composable skills, and closed-loop evaluation loops.

This is a simplified reference implementation of patterns used in a production agentic SDLC automation platform deployed at Salesforce, powering AgentForce and Agent Voice features within Field Service Lightning.


Architecture

The platform is built around three composable primitives:

1. Pre-Hook Interceptors

Intercept agent execution before a phase runs. Hooks can inspect, enrich, or halt the context. Multiple hooks chain in registration order — fail-fast.

Request → [IPRiskGuard] → [ContextEnricher] → [RateLimiter] → Skills

Built-in hooks:

  • IPRiskGuard — blocks execution if payload contains sensitive IP patterns
  • ContextEnricher — injects runtime metadata before execution
  • RateLimiter — token-bucket rate limiter per task

2. Composable Skills

Discrete, stateless units of agent capability. Skills are registered and chained — all state lives in AgentContext.

[CodeSynthesisSkill] → [TestRunnerSkill] → [EvaluationLoop]

In production, each skill wraps a Claude API call with a specialized system prompt. The skill interface keeps agent logic modular, testable, and independently deployable.

3. Evaluation Loop

The core of what makes the system self-healing. Evaluates output quality and decides:

  • Pass → continue to next phase
  • Remediate → retry with feedback (up to max_retries)
  • Fail → halt pipeline with structured error
Output → Evaluator → Pass? → Continue
                  → Fail?  → Remediate → Retry
                           → Max retries → Halt

Full SDLC Pipeline

In production, the pipeline automates the complete software development lifecycle as a closed feedback loop:

requirements ingestion
        ↓
architecture generation
        ↓
code synthesis          ← Claude API
        ↓
automated test execution
        ↓
performance telemetry collection
        ↓
root cause analysis
        ↓
autonomous remediation  ← or executive summary rollup
        ↓
iteration / done

Quick Start

# No dependencies — runs on Python 3.10+
python agentic_pipeline.py

Expected output:

INFO [task-001] CodeSynthesisSkill: code generated
INFO [task-001] TestRunnerSkill: tests complete
INFO [task-001] Evaluation attempt 1: score=0.91 passed=True

==================================================
Task: task-001
Halted: False
Errors: none
Evaluation: {'score': 0.91, 'attempts': 1}
==================================================

Extending the Platform

Add a custom skill

class DocumentationSkill(Skill):
    def execute(self, ctx: AgentContext) -> AgentContext:
        code = ctx.payload.get("generated_code", "")
        # In production: call Claude API to generate docstrings
        ctx.payload["documentation"] = f"# Auto-generated docs for:\n{code[:100]}"
        return ctx

Add a custom pre-hook

class AuditLogger(PreHookInterceptor):
    def intercept(self, ctx: AgentContext) -> None:
        logger.info(f"AUDIT: task={ctx.task_id} phase={ctx.phase.value}")
        # Write to your audit trail / SIEM

Register and run

pipeline = (
    AgentPipeline()
    .register_hook(IPRiskGuard())
    .register_hook(AuditLogger())
    .register_skill(CodeSynthesisSkill())
    .register_skill(DocumentationSkill())
    .register_skill(TestRunnerSkill())
    .set_evaluation_loop(
        EvaluationLoop(
            evaluator=my_evaluator,
            max_retries=3,
            pass_threshold=0.9,
        )
    )
)

result = pipeline.run(AgentContext(
    task_id="task-002",
    phase=AgentPhase.CODE,
    payload={"design_spec": "Implement exponential backoff"},
))

Design Principles

  • Fail fast — halted propagates immediately, no partial execution
  • Observable — every step logs with task_id for distributed tracing
  • Composable — hooks and skills are registered, not hardcoded
  • Stateless skills — all state in AgentContext, skills are pure functions
  • Self-healing — evaluation loop + remediation closes the feedback cycle

Production Context

This reference implementation simplifies a production system that:

  • Manages multi-agent orchestration across 6+ specialized agents
  • Integrates with Claude APIs for LLM-powered code synthesis, evaluation, and remediation
  • Deploys across Salesforce Field Service Lightning's AgentForce and Agent Voice features
  • Runs as a closed feedback loop replacing manual engineering intervention across planning, development, and QA cycles

Author

Vinoth Suryanarayanan Principal Engineer, Salesforce | PhD, Computer Science, University of Birmingham Google Scholar

About

Production patterns for agentic engineering pipelines — pre-hook interceptors, composable skills, closed-loop evaluation

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages