<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/build-real-agentic-apps-using-cuga-two-dozen-working-examples-on-a-lightweight-harness-4pgvqjrmp" -->

---
title: Build real agentic apps using CUGA: two dozen working...
description: CUGA (Configurable Generalist Agent) is an open-source agent harness from IBM Research that handles orchestration, planning, tool execution, state management,...
canonical: https://daily.dev/posts/build-real-agentic-apps-using-cuga-two-dozen-working-examples-on-a-lightweight-harness-4pgvqjrmp
copyright: © 2026 Daily Dev Ltd.
terms: https://daily.dev/tos/
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Build real agentic apps using CUGA: two dozen working examples on a lightweight harness | daily.dev
og:description: CUGA (Configurable Generalist Agent) is an open-source agent harness from IBM Research that handles orchestration, planning, tool execution, state management,...
og:url: https://daily.dev/posts/build-real-agentic-apps-using-cuga-two-dozen-working-examples-on-a-lightweight-harness-4pgvqjrmp
og:image: https://api.daily.dev/og/posts/4pgVqJrmP.png
og:image:alt: Build real agentic apps using CUGA: two dozen working examples on a lightweight harness
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Build real agentic apps using CUGA: two dozen working examples on a lightweight harness

**[Hugging Face](https://daily.dev/sources/huggingface)** · 17 min read · 1 upvotes · 0 comments

## Summary

CUGA (Configurable Generalist Agent) is an open-source agent harness from IBM Research that handles orchestration, planning, tool execution, state management, and guardrails so developers only need to define a tool list and a prompt. The post walks through a working IBM Cloud architecture advisor app built as a single FastAPI file, demonstrating how inline Python tools and shared MCP servers combine with a CugaAgent constructor. Key features include CodeAct execution, reflection-based self-correction, six declarative policy types (Intent Guard, Tool Approval, Tool Guide, Playbook, Output Formatter, CustomPolicy) with semantic matching via sqlite-vec, multi-agent delegation via CugaSupervisor over A2A, and on-the-job skill refinement via ALTK-Evolve. A library of two dozen single-file example apps covers research, productivity, RAG, ops monitoring, and multi-agent patterns. The same agent definition runs air-gapped inside IBM Sovereign Core with per-tool approval, OpenTelemetry tracing, and no external telemetry.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://huggingface.co/blog/ibm-research/cuga-apps>

## Questions this post answers

### How do I stop a CUGA agent from running destructive commands like git force-push?

Attach an Intent Guard policy to the agent using agent.policies.add_intent_guard with keywords such as --force and --no-verify, plus a custom refusal response. Intent Guard is one of six policy types in CUGA's runtime (alongside Tool Approval, Tool Guide, Playbook, Output Formatter, and CustomPolicy), and triggers can match semantically via a sqlite-vec store rather than only exact keywords.

_Teams governing agent behavior can track harness features like these policy types on daily.dev._

### Why does an agentic app built with CUGA fail when a tool throws an unhandled exception?

CUGA's planner handles a declared failure gracefully by skipping that step and continuing, but an undeclared failure sends a raw stack trace mid-plan and derails the run. The convention that fixes this is having every inline tool return a consistent envelope: {"ok": true, "data": {...}} on success or {"ok": false, "code": "...", "error": "..."} on failure.

_Developers debugging flaky agent tool calls can compare harness conventions like this on daily.dev._

### Can the same agent code run both locally and in a governed production environment without rewriting it?

Yes, with CUGA the same agent definition redeploys unchanged from a laptop into IBM Sovereign Core, which runs it under Boundary Isolation with data, control plane, and execution engine inside one logical boundary, transient isolated containers per tenant, gpt-oss-120b running air-gapped, and OpenTelemetry traces sent to an in-tenant Grafana Tempo backend with no external telemetry.

_Engineers planning the path from prototype to governed deployment can follow harness updates like this on daily.dev._

## Similar posts on daily.dev

- [Karpathy's Agentic Engineering Finally Has Proper Tooling](https://daily.dev/posts/karpathy-s-agentic-engineering-finally-has-proper-tooling-wm38wjfvk) · Daily Dose of Data Science \| Avi Chawla \| Substack · 0 upvotes · 0 comments
- [13 demos on Gemini Enterprise Agent Platform](https://daily.dev/posts/13-demos-on-gemini-enterprise-agent-platform-sxyv8lnfw) · Google Cloud · 1 upvotes · 0 comments
- [From zero to agent builder: Running kagent on your laptop](https://daily.dev/posts/from-zero-to-agent-builder-running-kagent-on-your-laptop-z1h7vosgo) · CNCF · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#mcp](https://daily.dev/tags/mcp), [#langchain](https://daily.dev/tags/langchain), [#fastapi](https://daily.dev/tags/fastapi)

[View this post on daily.dev](https://daily.dev/posts/build-real-agentic-apps-using-cuga-two-dozen-working-examples-on-a-lightweight-harness-4pgvqjrmp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Build real agentic apps using CUGA: two dozen working examples on a lightweight harness","url":"https://daily.dev/posts/build-real-agentic-apps-using-cuga-two-dozen-working-examples-on-a-lightweight-harness-4pgvqjrmp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/build-real-agentic-apps-using-cuga-two-dozen-working-examples-on-a-lightweight-harness-4pgvqjrmp"},"datePublished":"2026-06-23T12:53:58.540Z","dateModified":"2026-09-13T20:01:36.527Z","description":"CUGA (Configurable Generalist Agent) is an open-source agent harness from IBM Research that handles orchestration, planning, tool execution, state management,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/aea1512e479733907f6449641c4f8393?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/aea1512e479733907f6449641c4f8393?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hugging Face","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hugging Face","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/f1f55c67d81a4330acf5b90b26b0c8e1","url":"https://daily.dev/sources/huggingface"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/build-real-agentic-apps-using-cuga-two-dozen-working-examples-on-a-lightweight-harness-4pgvqjrmp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,mcp,langchain,fastapi","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hugging Face","item":"https://daily.dev/sources/huggingface"},{"@type":"ListItem","position":3,"name":"Build real agentic apps using CUGA: two dozen working examples on a lightweight harness"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/build-real-agentic-apps-using-cuga-two-dozen-working-examples-on-a-lightweight-harness-4pgvqjrmp#faq","mainEntity":[{"@type":"Question","name":"How do I stop a CUGA agent from running destructive commands like git force-push?","acceptedAnswer":{"@type":"Answer","text":"Attach an Intent Guard policy to the agent using agent.policies.add_intent_guard with keywords such as --force and --no-verify, plus a custom refusal response. Intent Guard is one of six policy types in CUGA's runtime (alongside Tool Approval, Tool Guide, Playbook, Output Formatter, and CustomPolicy), and triggers can match semantically via a sqlite-vec store rather than only exact keywords. Teams governing agent behavior can track harness features like these policy types on daily.dev."}},{"@type":"Question","name":"Why does an agentic app built with CUGA fail when a tool throws an unhandled exception?","acceptedAnswer":{"@type":"Answer","text":"CUGA's planner handles a declared failure gracefully by skipping that step and continuing, but an undeclared failure sends a raw stack trace mid-plan and derails the run. The convention that fixes this is having every inline tool return a consistent envelope: {\"ok\": true, \"data\": {...}} on success or {\"ok\": false, \"code\": \"...\", \"error\": \"...\"} on failure. Developers debugging flaky agent tool calls can compare harness conventions like this on daily.dev."}},{"@type":"Question","name":"Can the same agent code run both locally and in a governed production environment without rewriting it?","acceptedAnswer":{"@type":"Answer","text":"Yes, with CUGA the same agent definition redeploys unchanged from a laptop into IBM Sovereign Core, which runs it under Boundary Isolation with data, control plane, and execution engine inside one logical boundary, transient isolated containers per tenant, gpt-oss-120b running air-gapped, and OpenTelemetry traces sent to an in-tenant Grafana Tempo backend with no external telemetry. Engineers planning the path from prototype to governed deployment can follow harness updates like this on daily.dev."}}]}
```

