SShortSingh.
Back to feed

Microsoft Agent Framework Harness enables autonomous multi-step AI agents in C#

0
·27 views

A developer tutorial published on DEV Community explains how to use Microsoft Agent Framework's Agent Harness to build autonomous, multi-step AI agents in C#. The Harness wraps an IChatClient with a bounded loop runtime, eliminating the need to manually write iteration logic, tool approval, and context management. The article walks through a real example called TopicResearchAgent, a console app that autonomously researches a given topic by decomposing it into questions, running multiple Tavily Search queries, and compiling a structured report. The agent decides on its own when sufficient evidence has been gathered, using a LoopEvaluator as the stopping condition. Full source code for the example is available on GitHub.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Queens Public Library suspends e-borrowing after ransomware attack

The Queens Public Library system has been hit by a ransomware attack, prompting it to suspend its electronic borrowing services. The disruption affects patrons' ability to access digital lending materials while the incident is addressed. The source material available is limited to a brief Hacker News post linking to the library's official connect page, so further details on the attack's scope, the attackers, or a restoration timeline are not confirmed here. Library officials have not been quoted in the available material. Readers should consult the library's official channels for updates on service status.

0
ProgrammingDEV Community ·

Pagure Token Scoping and Forge Exposure: Index Counts and Review Guidance

An analysis of Pagure, a self-hosted git forge, examines how many public instances appear in the ZoomEye search index. Count-only queries on November 9, 2026 returned 22 title matches, 181 body-domain matches, and zero application fingerprints. The author notes that body matches are only candidates and that the counts do not prove any instance is public or misconfigured. The piece distinguishes project-scoped tokens, which limit access to one repository, from project-less user tokens that can act across projects and resemble a password for the forge identity. It recommends auditing token scope, ACLs, expiry, last use, and related SSH keys, deploy keys, and CI webhooks, along with restricting management interfaces and running controlled authorization tests.

0
ProgrammingDEV Community ·

OpenCode Warns Some Users' AI Provider Keys Were Exposed in Console Breach

OpenCode, an open-source AI coding project, told some users of its hosted Console on October 17, 2026 that third-party provider keys stored in their workspaces may have been exposed. The company said 1.4% of Console users, those who had linked providers such as OpenAI, Anthropic and Google, were affected. Reports say attackers entered through a legacy system the project was preparing to retire, and that Anthropic and Google blocked keys believed to be compromised. One report indicates OpenAI was refunding affected customers, though OpenCode has not detailed how many keys were involved or how the intrusion occurred. The incident was part of a wider October pattern in which several companies disclosed breaches exposing API keys, tokens or environment variables.

0
ProgrammingDEV Community ·

Hard vs. Soft Payment Declines: Why Retry Systems Must Split Them First

Developers handling payment declines should first determine whether a refusal is final or temporary, since this single distinction shapes every retry decision. Hard declines reflect the credential itself, such as a closed or stolen card, and repeated attempts are futile and can harm the descriptor's standing with issuers. Soft declines stem from transient conditions like insufficient funds or incomplete authentication, and they respond better to spaced retries, credential checks, and a single early customer message. Grey-zone cases, including authentication-required and generic responses, need explicit routing based on transaction history. Splitting outcomes into this branch also yields clearer metrics that reveal whether problems lie in scheduling or customer messaging.