An assistant that remembers
AI4Delphi Agents

Autonomous agents that plan, remember and use your tools. An agent has a defined role, remembers the conversation across turns, and calls your native Delphi tools as needed to complete a task — "find the order, check stock, draft the reply". Built on the new Microsoft Agent Framework, the agentic successor to Orchestrate.

Free Trial Pricing

 Latest: 1.0.0.0 - What's New

AgentDemo.dpr
uses
  CNCoreClr.AI.Agents;

Agent := TAgentHost.Create('openai', Key, 'gpt-4o-mini',
  'You are an order-support assistant. ' +
  'Use get_order_status before answering.');

Agent.RegisterFunction('get_order_status',
  'Looks up an order. Input is the order id.',
  function(input: string): string
  begin
    Result := Orders.Lookup(input);       // YOUR Delphi code
  end);

Writeln(Agent.Run('Where is order A1234?'));
Writeln(Agent.Run('And when will it arrive?'));  // same session

Agents or Orchestrate?

Both let the model call your Delphi functions. Agents is stateful and conversation-shaped: the agent has a role you define, a session that remembers previous turns, and the freedom to call your tools repeatedly as it works through a task. A follow-up like "and when will it arrive?" just works, because the agent still has the context.

If each request stands on its own and you simply want the model to consult your code while answering, Orchestrate is the smaller, cheaper choice. Agents is the premium pack — and the direction Microsoft is investing in: the Microsoft Agent Framework is the unified successor to Semantic Kernel agents and AutoGen, and it is where multi-agent orchestration (handoff, group chat, durable workflows) will land.

Tool registration is the same call in both, so an Orchestrate prototype moves here by changing the constructor and swapping InvokePrompt for Run.

  Already own Orchestrate? Upgrade for the $100.00 difference — you never pay twice for the same capability.

What you get

  • TAgentHost over OpenAI, with role instructions that shape every turn.
  • RegisterFunction(name, description, handler) — Delphi tools, auto-invoked when the model decides they are needed.
  • Run(message) — a blocking, tool-using turn, with session state kept across calls.
  • NewConversation — reset the session and start clean.

On the roadmap

  • Azure OpenAI and Anthropic agents.
  • Multi-agent orchestration — sequential, concurrent, handoff and group-chat patterns, plus durable workflows.
  • Streaming Run with token events, and structured (typed) outputs.
  • Session persistence, richer tool parameter schemas, and human-in-the-loop approval of tool calls.

Deployment notes

  • Folder deployment. The facade pulls the Agent Framework plus the OpenAI connector closure (around 32 DLLs in the reference build); ship the whole output folder including .deps.json.
  • Core edition: .Net 8 or later. Framework edition: .NET Framework 4.5 or later. The Agent Framework is moving fast, so versions are pinned; the maintenance subscription covers the churn.
  • The model decides when to call your tool, so a Delphi tool should be deterministic and side-effect-aware.
  • Requires a dotNetCore4Delphi licence (Core edition), or a .Net Runtime Library for Delphi licence for the Framework edition.