Templates / AI agent patterns / ai-agent-tool-loop

AI Agent with Tools

A customer-service agent built on Camunda's AI Agent Sub-process connector. The ad-hoc sub-process holds the tools — knowledge-base search, order lookup and ticket creation — and the connector loops: call the model, run the tools it picks, feed the results back, until it answers. The answer is sent when the agent says the case is resolved; otherwise a person takes over.

aiai agent sub-processad-hoc sub-processtool callingfromAi
Open in editor Download .bpmn
casen template use ai-agent-tool-loop
Support agent answer handoff Queue for aperson Send answer Take overconversation Searchknowledgebase Look uporder Createticket Customer message received Agent failed Queued for a person Resolved? Answered Handed to a person

Scenarios · 2

  • The agent answers a where-is-my-order question support-agent → resolved-gw → send-answer → answered
  • The agent cannot resolve it and hands over support-agent → human-takeover → handed-over

Job types · 6

  • email-send Send answer
  • helpdesk-ticket-assign Queue for a person
  • io.camunda.agenticai:aiagent-job-worker:1 Support agent
  • kb-search Search knowledge base
  • order-lookup Look up order
  • ticket-create Create ticket

Files · 2

Every scenario passes on @bpmnkit/engine's runScenario in the package's tests. casen template use ai-agent-tool-loop [dir] writes the files above into your project — see the templates guide for running the scenarios and deploying.