<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Alcides Fonseca</title><link>https://wiki.alcidesfonseca.com/</link><description>A Maelstrom of Ideas, Code and Politics</description><atom:link href="https://wiki.alcidesfonseca.com/feeds/all/" rel="self"/><language>en-us</language><lastBuildDate>Tue, 10 Nov 2026 09:38:23 +0000</lastBuildDate><item><title>Jailbreaking for kids</title><link>https://wiki.alcidesfonseca.com/blog/jailbreaking-for-kids?utm_source=rss_all</link><description>

&lt;p&gt;Pamela Fox published &lt;a href="https://pamelafox.github.io/my-py-talks/impact-of-ai-on-cs-ed/#/27"&gt;her slide deck on what we need to change in the way we teach CS&lt;/a&gt; all across the  different age ranges, starting from primary school and going up to the university degree.&lt;/p&gt;
&lt;p&gt;Some of my colleagues were in disbelief that she included "Understanding how AI works" as a primary school objective.&lt;/p&gt;
&lt;p&gt;Just like you can't prevent teenagers from lying about their birthdate and getting access to porn, you will not be able to prevent kids from using AI models, especially if Big Tech has their way with it and every product in your household is infused with a chatbot/agent.&lt;/p&gt;
&lt;p&gt;The best way to make AI safe for kids is through education. You need to teach kids how AI works, and what its limits are and what you can do safely or not.&lt;/p&gt;
&lt;p&gt;Dale Lane has this awesome project called &lt;a href="https://machinelearningforkids.co.uk"&gt;Machine Learning for Kids&lt;/a&gt; where kids can write ML and AI applications using a scratch-like programming environment.&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/crLL-yEntcM?si=D0XE-BeKolU4sJUf" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""&gt;&lt;/iframe&gt;

&lt;p&gt;In today's video, Dale goes through jailbreaking, where the agent is supposed to keep a password protected, and the user tries different things to extract that password from a weak-willed agent.&lt;/p&gt;
&lt;p&gt;So yes, you can teach primary school kids how AI works. And we should be doing this right now, not in a couple of years.&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Tue, 10 Nov 2026 09:38:23 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/jailbreaking-for-kids?utm_source=rss_all</guid></item><item><title>Can you leave a 5 star review?</title><link>https://wiki.alcidesfonseca.com/blog/can-you-leave-a-5-star-review?utm_source=rss_all</link><description>

&lt;p&gt;&lt;img alt="Wizard of Id's take on reviews" src="https://cdn.alphacomedy.com/16/2026/11_05_26_bf135851531d6c20a4b534392204dcae.jpg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.creators.com/read/wizard-of-id/11/26/425860"&gt;Wizard of Id&lt;/a&gt; pulls a &lt;a href="https://www.imdb.com/title/tt5497778/"&gt;Black Mirror&lt;/a&gt;.&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Sat, 07 Nov 2026 12:49:50 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/can-you-leave-a-5-star-review?utm_source=rss_all</guid></item><item><title>Full-stack verification is the new trend</title><link>https://wiki.alcidesfonseca.com/blog/full-stack-verification-is-the-new-trend?utm_source=rss_all</link><description>

&lt;p&gt;There have been several recent announcements about formal verification of software and hardware, both using AI and for AI systems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.harmonic.fun/"&gt;Harmonic&lt;/a&gt; announced last week that they are using &lt;a href="https://www.harmonic.fun/news/aristotle-software-hardware-verification/"&gt;their agent Aristotle for scalable verification of both software and hardware&lt;/a&gt;. For example, in a C library for big-number arithmetic, it was able to fix bugs and prove that a faster version was equivalent to the original. The person whose work I particularly follow in this area is &lt;a href="https://satnam6502.github.io/bio/"&gt;Satnam Singh&lt;/a&gt;, who has worked on hardware verification for several years.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sf-tensor.com/"&gt;SF-Tensor&lt;/a&gt; announced that they were &lt;a href="https://sf-tensor.com/engineering/formalizing-ptx"&gt;formalizing NVIDIA’s PTX language&lt;/a&gt; in Lean to prove the correctness of GPU kernels. SF-Tensor was founded by three brothers at the age of 19, after they had completed their BSc degrees at 16 while attending high school.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://andtruth.com/"&gt;&amp;amp;Truth&lt;/a&gt; &lt;a href="https://andtruth.com/press/andtruth-emerges-from-stealth/"&gt;came out of stealth&lt;/a&gt;, announcing plans to use Lean to prove the correctness of AI-generated software. Key people involved include &lt;a href="https://engineering.stanford.edu/people/clark-barrett"&gt;Clark Barrett&lt;/a&gt;, known for his work on cvc5 and CSLib; &lt;a href="https://ilyasergey.net"&gt;Ilya Sergey&lt;/a&gt;, known for Veil and his work on verification using separation logic; and &lt;a href="https://sebasti.a.nullri.ch"&gt;Sebastian Ullrich&lt;/a&gt;, Lean’s second-in-command.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://theorem.dev/"&gt;Theorem.&lt;/a&gt; and &lt;a href="https://www.anthropic.com/"&gt;Anthropic&lt;/a&gt; worked together on &lt;a href="https://www.anthropic.com/research/formal-verification"&gt;verifying open-source software running on a RISC-V processor&lt;/a&gt;. Their work covered encode–decode round-tripping, idempotence, algebraic laws, differential testing, self-consistency, and equivalence to reference implementations. They also proved &lt;a href="https://theorem.dev/blog/proving-agent-sandboxes/"&gt;isolation properties of a sandbox built on the xv6 academic kernel&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://autoresearch.inc/blog/"&gt;AutoResearch.inc&lt;/a&gt; has also &lt;a href="https://x.com/deepmatmul/status/2118066073626939706?a=UP1uXguDuLKCI3pGUeY&amp;amp;s=46"&gt;announced they have verified 7 web assembly tools&lt;/a&gt; down to ELF and sys calls (on x86-64 and RISC-V).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The common factor in these announcements is the goal of achieving full-stack formalization, either across the software stack or across a combination of software and hardware. In the past, verification was performed only on a small core of the software or on a simplified model of the actual software.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Verification Alternatives Diagram _ ai generated" src="/media/images/verification_diagram.png"&gt;&lt;/p&gt;
&lt;p&gt;For reference, AWS’s access-control language, Cedar, had a Rust implementation running in production and a reference implementation—first in Dafny and later in Lean—that was verified for correctness.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;One approach would be to develop Cedar entirely in Lean, compile to C, and deploy the generated C code in production. In addition to the formal model, we would write an optimized and full-featured implementation (which handles errors and messages more carefully, provides parsers for various formats, etc.) in Lean, and then prove the two equivalent. A key benefit of this approach is that we would formally verify—rather than just test—the equivalence of the deployed code and model. But there are significant downsides to writing production applications in Lean and deploying its generated C code. Lean is a new programming language, so it has a limited developer pool and lacks useful libraries available in mainstream languages. Debugging a failure might necessitate stepping through the generated C code and mapping it back to the Lean source, requiring expertise in C and Lean. Doing so could be particularly difficult if the failure is due to an interaction between handwritten code and Lean-generated C code. In addition, C is a memory-unsafe language, so a bug in the Lean compiler could lead to security issues.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— &lt;a href="https://arxiv.org/html/2407.01688v1"&gt;How We Built Cedar: A Verification-Guided Approach&lt;/a&gt; (April 2024)&lt;/p&gt;
&lt;p&gt;Over the past year, I have been talking about liquid types as my personal preference for program verification. Liquid types are a restricted form of value-dependent types whose constraints can be checked automatically using &lt;a href="https://wiki.alcidesfonseca.com/blog/another-puzzle-z3/"&gt;SMT solvers&lt;/a&gt;. This is my sweet spot: you get much of the benefit of an expressive type system in which you can express properties such as &lt;a href="https://liquid-java.github.io/"&gt;typestate&lt;/a&gt;, preventing methods from being called when an object is in the wrong state—for example, calling &lt;code&gt;read()&lt;/code&gt; after &lt;code&gt;close()&lt;/code&gt;. And it comes at a much lower cost, especially because you do not have to write the proofs: the SMT solver takes care of that.&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Liquid types are less expressive than full dependent types" src="https://wiki.alcidesfonseca.com/media/images/language_spectrum.png"&gt;&lt;/p&gt;
&lt;p&gt;Until a few months ago, this trade-off was very important: very few people in the world had the expertise and time to undertake the full verification of a large open-source project (props to the &lt;a href="https://sel4.systems"&gt;seL4&lt;/a&gt; folks!). Frontier models’ superhuman ability to generate proofs has since eroded this moat, and subsidized token prices make this the perfect time to conduct these experiments. I have to admit that the image above, which I used in my recent slides, might no longer make sense. It might become relevant again when token prices rise—probably to reflect their actual costs—and we need to save time and tokens while still verifying properties we care about, without going all the way down to the machine-code level.&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Right now, if we pursue full-stack verification, we might need to write code in a verification-first language like Lean. Dafny and my own &lt;a href="https://github.com/alcides/aeon"&gt;aeon&lt;/a&gt; could be candidates, but Lean’s functional programming model and the substantial funding the project receives make it the ideal candidate. Rocq enthusiasts might not like it, but extracting executable code to OCaml is not such a significant advantage in the real world.&lt;/p&gt;
&lt;p&gt;But we need Lean to improve. Above all, we need faster type checking and a much better optimizer. That’s the part that &lt;a href="https://bend2.dev/notes/what-is-bend2/"&gt;Bend2&lt;/a&gt; got right from the start—the next mainstream language will require both verification and speed.&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Using proof combinators, you can use LiquidHaskell to achieve the same expressive power as Lean. Conversely, you can use Lean with only the &lt;code&gt;grind&lt;/code&gt; tactic to achieve the same lower cost as liquid types. Here, I am considering each as it is typically used.&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I am convinced that people will not read the source code and will instead rely on new techniques to establish confidence in the generated code.&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Wed, 04 Nov 2026 23:59:50 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/full-stack-verification-is-the-new-trend?utm_source=rss_all</guid></item><item><title>How to express intent in aeon</title><link>https://wiki.alcidesfonseca.com/blog/how-to-express-intent-in-aeon?utm_source=rss_all</link><description>

&lt;p&gt;I started developing &lt;a href="https://github.com/alcides/aeon"&gt;Aeon&lt;/a&gt; back in 2018 as a playground for program synthesis. Holes (&lt;code&gt;?x&lt;/code&gt;) are valid expression in aeon (&lt;code&gt;def f (i:Int) : Int := i * 2 + ?x&lt;/code&gt; compiles successfully and, when ?x is evaluated at runtime, it opens a repl asking the user for the right expression). However, the main advantage of holes is when you run the aeon compiler with "--synthesizer", it tries to find a suitable expression for the holes in your program. This blog post covers the different methods you have to describe what you want a function to do. We've decided on the function-level for the specification as it is the most normal public (and private) API of your code.&lt;/p&gt;
&lt;h1&gt;Basic Types&lt;/h1&gt;
&lt;p&gt;Aeon is a (very strongly) typed language, so you always need to write the types of top-level functions.&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt; As such, all proposed candidate expressions to replace &lt;code&gt;?hole&lt;/code&gt; need to type-check. So writing &lt;code&gt;Int&lt;/code&gt; as the return type already specifies something about the missing code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def double (x:Int) : Int := ?hole
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img alt="Synthesis menu in VSCode for this simple hole" src="https://wiki.alcidesfonseca.com/media/images/aeon_synth.png"&gt;&lt;/p&gt;
&lt;h1&gt;Liquid Types&lt;/h1&gt;
&lt;p&gt;Aeon supports liquid types by refining a basic type with a predicate. In the case below we refine the returning type of the function &lt;code&gt;Int&lt;/code&gt; with the predicate that it needs to be equal to twice the value of &lt;code&gt;x&lt;/code&gt;. Because Liquid Types can refer to other values in the program (such as function arguments), they are (value-)dependent types, but following a different discipline than the (full) dependent types you find in Lean, Rocq or Idris. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def double (x:Int) : {r:Int | r == x + x} := ?hole
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So far, this definition covers both Refinement Types and Liquid Types. The main distinction of the two is that the refinements in Liquid Types need to be drawn from a decidable logic, so an SMT solver can give you a definitive answer of whether it type checks or not.&lt;/p&gt;
&lt;p&gt;Liquid types guide synthesis directly in approaches such as &lt;a href="https://cseweb.ucsd.edu/~npolikarpova/publications/pldi16.pdf"&gt;Synquid&lt;/a&gt; and &lt;a href="https://arxiv.org/abs/2605.13456"&gt;Liquid Tree Automata&lt;/a&gt;. In Aeon, their logical predicates can also be translated into constraints for SMT solving with &lt;a href="https://www.microsoft.com/en-us/research/publication/z3-an-efficient-smt-solver/"&gt;Z3&lt;/a&gt;, &lt;a href="https://www.cis.upenn.edu/~alur/SyGuS13.pdf"&gt;syntax-guided synthesis (SyGuS)&lt;/a&gt;, &lt;a href="https://arxiv.org/abs/2209.03602"&gt;polynomial synthesis&lt;/a&gt;, and &lt;a href="https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2023.3"&gt;OR-Tools’ CP-SAT solver&lt;/a&gt;. Liquid Types are also used in our &lt;a href="https://link.springer.com/chapter/10.1007/978-3-030-58115-2_2"&gt;own custom synthesis algorithms that combine evolutionary search and liquid types&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;Natural language documentation&lt;/h1&gt;
&lt;p&gt;Aeon also supports AeonDoc, using the &lt;code&gt;@doc&lt;/code&gt; decorator to annotate a natural-language description of the function. We can take this documentation as input to a synthesis method (currently, only LLM-based synthesizers support @doc). This documentation complements any type that constrains the hole already.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@doc(&amp;quot;Doubles the input.&amp;quot;)
def double (x:Int) : Int := ?hole
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Examples or test cases.&lt;/h1&gt;
&lt;p&gt;Aeon supports the decorator &lt;code&gt;@example&lt;/code&gt; that takes a boolean predicate about the execution of the final synthesized function.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@example(double 3 = 6)
@example(double 5 = 10)
def double (x:Int) : Int := ?hole
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Input–output examples guide many synthesis approaches: automata-based methods such as &lt;a href="https://arxiv.org/abs/1710.07740"&gt;AFTA&lt;/a&gt; use them to prune spaces of candidate programs; top-down methods such as &lt;a href="https://www.cis.upenn.edu/~stevez/papers/OZ15.pdf"&gt;Myth&lt;/a&gt; or &lt;a href="https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeRegressor.html"&gt;Decision Trees&lt;/a&gt; propagate examples into smaller synthesis subproblems; and bottom-up methods such as &lt;a href="https://arxiv.org/abs/2007.14381"&gt;BUSTLE&lt;/a&gt; compose programs from smaller expressions evaluated on those examples. Examples also define fitness functions for &lt;a href="https://www.cs.hamilton.edu/~thelmuth/Pubs/2015-GECCO-benchmark-suite.pdf"&gt;genetic programming&lt;/a&gt; and provide training data for &lt;a href="https://www.routledge.com/Classification-and-Regression-Trees/Breiman-Friedman-Olshen-Stone/p/book/9780412048418"&gt;decision-tree learning&lt;/a&gt;, which learns conditional rules mapping inputs to outputs.&lt;/p&gt;
&lt;p&gt;Decision Trees and Genetic Programming, coming from the Machine Learning backgrounds, assume that some examples might be wrong so they are more permissive. Other methods typically search for a solution that covers all examples. In this case, only noise-supporting methods can handle contradictory examples.&lt;/p&gt;
&lt;p&gt;Because writing examples can be tedious, you can use CSV data directly or through an auxiliary file (&lt;code&gt;@csv_data("1.0,2.0\n3.0,6.0\n4.0,8.0")&lt;/code&gt; or &lt;code&gt;@csv_file("double.csv")&lt;/code&gt;.&lt;/p&gt;
&lt;h1&gt;Optimization goals&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;@minimize_int(abs $ (double 4) - (4 * 2))
@minimize_int(abs $ (double 5) - (5 * 2))
def double (x:Int) : {r:Int | r = x + x} := ?hole
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Aeon supports multiple maximize and minimize decorators to express optimization goals. We might know a given ideal target for the minimization criteria or not (for open problems). This example is the former, where you cannot have a value lower than 0. However, if you were to maximize the return value of a function that returns prime numbers, you would have no target value.&lt;/p&gt;
&lt;p&gt;When multiple objectives are set, we consider this a multi-objective optimization problem and each algorithm typically returns the &lt;a href="https://en.wikipedia.org/wiki/Pareto_frontier"&gt;Pareto set&lt;/a&gt;, containing solutions that no other candidate is better in all axis. Genetic Programming and OR-Tools solvers have these features built-in. Recent Genetic Programming approaches have recommended &lt;a href="https://lexicase.ai"&gt;Lexicase-selection&lt;/a&gt; instead of a Pareto tournament, but my own experience does not confirm this recommendation. If you are going to evaluate all objectives, then lexicase selection might make sense, but because tournaments only evaluate one objective for few good candidates, it ends up being more computational cheaper, and more time is left for exploration.&lt;/p&gt;
&lt;p&gt;A big advantage of examples and optimization constraints over liquid types is that you can write any aeon expression that you want (such as multiplication of variables &lt;code&gt;i*j&lt;/code&gt;). Because Liquid Types are limited to decidable theories, you cannot write&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt; this multiplication and other types of expressions and you are limited to linear integer arithmetic, arrays, uninterpreted functions and other SMT theories.&lt;/p&gt;
&lt;h1&gt;Property-based Tests&lt;/h1&gt;
&lt;p&gt;Property-based testing is the idea that instead of writing concrete input and output examples, you write properties that relate them, and have random inputs generated to validate those properties. For me, it is very similar, if not the same, as &lt;a href="https://en.wikipedia.org/wiki/Metamorphic_testing"&gt;Metamorphic testing&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def double (x:Int) : Int := ?hole

@property(100)
def prop_double_is_bigger (x:Int | x &amp;gt; 0) : Bool := double x &amp;gt; x
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, the body of the double function will have to work with 100 randomly-generated inputs and return a value that complies with the state property every single time.&lt;/p&gt;
&lt;h1&gt;Results&lt;/h1&gt;
&lt;p&gt;You can either run aeon on the command line, selecting the synthesizer method with &lt;code&gt;-s&lt;/code&gt; (&lt;code&gt;python -m aeon multi_objective.ae -s gp --budget 10&lt;/code&gt;), or use an LSP editor to ask the compiler to synthesize using a particular method. If you are using VSCode, you have an extra interface to explore program synthesis.&lt;/p&gt;
&lt;p&gt;&lt;img alt="VSCode UI for synthesizer programs" src="https://wiki.alcidesfonseca.com/media/images/aeon_full_vscode.png"&gt;&lt;/p&gt;
&lt;p&gt;The first specification yielded &lt;code&gt;def double (x:Int) : Int := 1&lt;/code&gt;, which matches exactly what we asked it to return: an Integer. When using the other specifications we got a variety of solutions: &lt;code&gt;x+x&lt;/code&gt;, &lt;code&gt;2*x&lt;/code&gt; and &lt;code&gt;x+x+0&lt;/code&gt;. But this is with a very simple specification that I would assume any synthesizer should be able to generate. Larger examples are left to the reader (or to the next blog post).&lt;/p&gt;
&lt;h1&gt;Non-functional requirements&lt;/h1&gt;
&lt;p&gt;All of the intent that we have expressed for far was related to functional correctness. But software developers know that non-functional properties can be equally important in some projects. As such, we are adding support for different forms of expressing quality properties. In particular, we already support &lt;code&gt;@minimize_cputime(expression)&lt;/code&gt; and &lt;code&gt;@minimize_energy(expression)&lt;/code&gt; for minimizing execution time and energy consumption respectively. Despite this support, the example above is too simple and trivial that the measurement overhead is many times that of the execution. I would only recommend using these advanced decorators for larger programs.&lt;/p&gt;
&lt;p&gt;And aeon also supports other properties, you just need to write the code that translates the candidate function into a measure of that quality, using the example or optimization decorators. &lt;/p&gt;
&lt;p&gt;Happy synthesizing!&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;This restriction comes from &lt;a href="https://doi.org/10.1561/2500000032"&gt;Liquid Types&lt;/a&gt;.&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Actually you can, but you will get a warning. This is an UX improvement we are making based on &lt;a href="https://dl.acm.org/doi/10.1145/3729327"&gt;our paper on challenges of Liquid Types adoption&lt;/a&gt;.&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Tue, 03 Nov 2026 13:35:15 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/how-to-express-intent-in-aeon?utm_source=rss_all</guid></item><item><title>Habitação Insustentável em Portugal</title><link>https://wiki.alcidesfonseca.com/blog/habitacao-insustentavel-em-portugal?utm_source=rss_all</link><description>

&lt;p&gt;A realidade da habitação em Portugal é completamente fora deste mundo. A minha geração e a mais nova não consegue pagar o custo que a habitação tem sido nas grandes cidades, nem no Algarve.&lt;/p&gt;
&lt;p&gt;O &lt;a href="https://www.linkedin.com/in/ivobernardo"&gt;Ivo Bernardo&lt;/a&gt; fez &lt;a href="https://thedatajourney.substack.com/p/the-housing-crisis-in-europe-part"&gt;uma análise da situação da habitação em Portugal&lt;/a&gt;, baseado em números públicos de uma variedade de fontes.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Data on Housing costs, considering cost of living" src="https://substackcdn.com/image/fetch/$s_!cmrC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69189565-1c3f-4a9d-9dd5-222815c97d3f_1491x658.png"&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Public housing: this is where the data sides most with the protesters. Social rental housing is 1.1% of dwellings in Portugal, against an EU average of 8%. At €150,000 per home, 3% financing and public land, a cost-rent home in Lisbon breaks even at about €10.9/m² a month, 35% below the city’s median new rent. It can almost pay for itself exactly where it’s needed most. Remember the €1.74 billion NHR cost in 2024? That’s roughly 11,600 of those homes. In one year.&lt;/li&gt;
&lt;li&gt;Vacant homes: worth chasing, in the right places. The 100,000-plus recoverable homes in pressure municipalities are real.&lt;/li&gt;
&lt;li&gt;Limiting investment funds: I can’t back it or reject it, because the data doesn’t exist. Before we legislate, we need to measure.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;— &lt;a href="https://thedatajourney.substack.com/p/the-housing-crisis-in-europe-part"&gt;The housing crisis in Europe pt1&lt;/a&gt; by Ivo Bernardo&lt;/p&gt;
&lt;p&gt;Por sua vez, o &lt;a href="https://joaotome.com"&gt;João Tomé&lt;/a&gt; usa também dados reais para &lt;a href="https://joaotome.com/data-stories/casas-vazias"&gt;analisar a questão das casas vazias&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Em 2021, quase 249 mil casas estavam vagas por outros motivos, fora do mercado, em edifícios sem necessidade de reparação ou apenas com reparações ligeiras. Os dados ajudam a localizar uma possibilidade de resposta à falta de habitação. Ainda não dizem quantas dessas portas se podem abrir. As experiências de outros países ajudam a escolher o que tentar: apoiar obras, gerir o arrendamento e reforçar a oferta nas zonas com procura.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— &lt;a href="https://joaotome.com/data-stories/casas-vazias"&gt;Quantas casas vazias podem voltar a ter gente?&lt;/a&gt; por João Tomé&lt;/p&gt;
&lt;p&gt;O artigo inclui ainda uma tabela com referências para medidas que foram implementadas noutros países e os resultados.&lt;/p&gt;
&lt;p&gt;De ambos os estudos, a minha conclusão é que precisamos de mais construção e reabilitação, precisamos de melhores números e acompanhamento da situação e, sobretudo, precisamos de descentralizar a população nas grandes áreas metropolitanas.&lt;/p&gt;
&lt;p&gt;Infelizmente, manifestações de tendas dão-me pouca confiança que algo vá mudar. Mas termos novas iniciativas políticas que trabalhem estes desafios parece-me algo com maior probabilidade de funcionar. &lt;a href="https://pt.euronews.com/2026/10/26/lista-de-estudantes-vence-eleicoes-servias-num-terramoto-politico-vucic-admite-derrota"&gt;O resultado na Sérvia de um movimento estudantil ganhar as eleições inspira-me confiança&lt;/a&gt;, mas não podemos ter a taxa de abstenção que tem sido habitual no nosso país.&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Tue, 27 Oct 2026 14:26:59 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/habitacao-insustentavel-em-portugal?utm_source=rss_all</guid></item><item><title>Training people in AI Safety</title><link>https://wiki.alcidesfonseca.com/blog/training-people-in-ai-safety?utm_source=rss_all</link><description>

&lt;p&gt;As AI technology gets adopted at a never-seen pace, we also need more people to work on AI Safety to make sure that AI applications are actually safe and aligned.&lt;/p&gt;
&lt;p&gt;Because AI generates content and decisions faster than humans, this is a very interesting research problem: humans cannot verify AI alone, so we need smarter technology to do it.&lt;/p&gt;
&lt;p&gt;In the interview below &lt;a href="https://ryankidd.ai"&gt;Ryan Kidd&lt;/a&gt;, the CEO of &lt;a href="https://www.matsprogram.org"&gt;MATS&lt;/a&gt;, talks about the efforts they (and others) are doing to train people in AI Safety. Throughout the conversation he also addresses how many of these AI Safety companies/non-profits have been founded, and even goes into neural networks vs evolutionary algorithms. &lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/fqCKS6U3S68?si=sddWbMSErDEF6HsH" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""&gt;&lt;/iframe&gt;

&lt;p&gt;But &lt;a href="http://wiki.alcidesfonseca.com/tag/ai-safety"&gt;AI Safety&lt;/a&gt; is a very large umbrella that encompasses soft skills like Policy Making and writing &lt;a href="https://huggingface.co/docs/hub/en/model-cards"&gt;Model Cards&lt;/a&gt; to more technical challenges like &lt;a href="https://already-clean.goodfire.com"&gt;interpreting neural networks&lt;/a&gt; or &lt;a href="https://wiki.alcidesfonseca.com/blog/lessons-learned-building-fronteira/"&gt;building guardrails&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;&lt;a href=""&gt;Ankur Pandey&lt;/a&gt; argues that &lt;a href="https://abnormaltech.substack.com/p/the-case-for-building-ai-safety-tools"&gt;AI Safety training is not focusing on building tools&lt;/a&gt; and that's probably where the gains are for society. I actually believe existing researchers from technical domains (like formal verification) are equipped to build the tools, they just need funding and support. As an example, &lt;a href="https://www.harmonic.fun"&gt;Harmonic&lt;/a&gt; has been doing interesting stuff recently and I know they recruited the right people.&lt;/p&gt;
&lt;p&gt;Unfortunately for those of us who do not want to relocate, many of these AI Safety companies are in-person in Berkeley, DC, Cambridge, NYC and London (with India and Singapore also investing in these areas). If I was funding these efforts, I would hire remotely and I would try to get funding from NATO/EU/UNESCO and other multinational organizations.&lt;/p&gt;
&lt;p&gt;As for training, I think we should make sure that all universities offer an AI Safety course at least at the Masters level, but here I am, daydreaming again.&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Tue, 27 Oct 2026 12:36:05 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/training-people-in-ai-safety?utm_source=rss_all</guid></item><item><title>What are the measurable outcomes of researchers in the AI world</title><link>https://wiki.alcidesfonseca.com/blog/what-are-the-measurable-outcomes-of-researchers?utm_source=rss_all</link><description>

&lt;p&gt;Early this month, &lt;a href="https://openai.com/index/sharing-ai-progress-in-mathematics/"&gt;OpenAI has released several papers answering decades old problems&lt;/a&gt; to which mathematicians have dedicated their own careers. This NYT piece on Terrence Tao (who first supported AI when it was AI to help humans in the process of discovery, but shunned them when it became apparent that they were looking for the discovery for discovery sake, and not for the journey of learning.&lt;/p&gt;
&lt;p&gt;Personally, I think it's a matter of changing the training dataset to learn in the process, and AI can do maths the human way very soon.&lt;/p&gt;
&lt;p&gt;OpenAI has tried to ask for forgiveness &lt;a href="https://www.euronews.com/2026/10/16/openai-tries-to-solve-mathematician-backlash-problem-by-pledging-5-million-to-math-foundat"&gt;by pledging 5 million to mathematics&lt;/a&gt;, maybe hoping that they come back in tokens. On the other side of the duopoly, Anthropic has donated &lt;a href="https://www.anthropic.com/news/public-benefit-fund"&gt;shares to the public good&lt;/a&gt;, which seems to me impossible to manage. &lt;/p&gt;
&lt;p&gt;AI is here to stay, and it's only a matter of us, humans, mathematicians or software developers finding our raison d'être and learning to communicate with AI in a way that it also advances our knowledge.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;At the heart of the crisis in the profession is a menacing question. If solving hard problems is a mission of math, what happens when machines can do it faster? So much of higher math — hiring, promotions, graduate training and acclaim — is based on the difficulty, quality and the impact of papers (the written documents explaining proofs) that a mathematician produces.&lt;/p&gt;
&lt;p&gt;The consensus is that A.I.-assisted problem solving is the inevitable future, but no one knows exactly what that new world will look like. “Deep uncertainty will persist in these next years,” a draft report by a group of mathematicians meeting at Harvard on Ph.D. education concluded last month.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Elisabeth Bumiller on &lt;a href="https://www.nytimes.com/2026/10/16/us/math-ai-terence-tao.html"&gt;Terry Tao Is on the Front Lines of the Debate Over AI and the Future of Math&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a completely different subject. Academics created &lt;a href="https://medium.com/after-the-lecture-a-philosophical-pause/nobel-laureates-published-only-34-papers-b8fcbbe7e1a6"&gt;a bean counting system to assess progress that is completely fake&lt;/a&gt;. Research is a high-risk activity, like Venture Capital. You invest in many different projects and teams, hoping that one out of 100/1000/1 million succeeds and has a huge impact on society. So you should be okay with the losses you take. It's part of the high-risk/high-reward system.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.alcidesfonseca.com/blog/being-an-incentive-being-an-obstacle-being-values/"&gt;CoARA and Informatics-Europe provide recommendations to assess researchers: focus on the research and forget bean-counting&lt;/a&gt;. But even universities that are trying to adopt CoAra (like my employer, U. Lisbon) forget about the goal and come back to KPIs for fear that funding will be given based on KPIs.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nature.com/articles/d41586-026-00469-0"&gt;Curiosity-driven research&lt;/a&gt; has been responsible for many important discoveries and inventions. So there should be a base funding for that. Then, there should be strategic funding for each country's long-term priorities (healthcare, transportation, defense). Meet with people and fund based on the team and the impact that the project might bring.&lt;/p&gt;
&lt;p&gt;To assess researchers, let their peers assess them through conversations and presentations about their work. Do not rely on publication counts and other metrics that can be gamed. And if you are not qualified to evaluate a researcher, maybe you shouldn't had hired them in the first place.&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Tue, 20 Oct 2026 13:21:55 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/what-are-the-measurable-outcomes-of-researchers?utm_source=rss_all</guid></item><item><title>Lisbon through the ages</title><link>https://wiki.alcidesfonseca.com/blog/lisbon-through-the-ages?utm_source=rss_all</link><description>

&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/bFHteO3MFpQ?si=JKaYsU1jMNQxQn_W" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""&gt;&lt;/iframe&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Tue, 20 Oct 2026 13:10:31 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/lisbon-through-the-ages?utm_source=rss_all</guid></item><item><title>Lessons learned building Fronteira</title><link>https://wiki.alcidesfonseca.com/blog/lessons-learned-building-fronteira?utm_source=rss_all</link><description>

&lt;p&gt;I designed &lt;a href="https://wiki.alcidesfonseca.com/blog/aeonbox-logical-guardrails-for-agents/"&gt;a harness built on top of dependent types that uses information-flow policies to prevent attacks involving the lethal trifecta&lt;/a&gt;. However, expecting users to write liquid types was unrealistic, and creating a custom SDK for every external interface—filesystems, APIs, internet search and MCP tools—was not practical.&lt;/p&gt;
&lt;p&gt;Following feedback from Lisbon.ai (thanks, &lt;a href="https://x.com/dscape"&gt;Nuno&lt;/a&gt;, &lt;a href="https://x.com/f"&gt;Fred&lt;/a&gt;, &lt;a href="https://x.com/ramitos"&gt;Sérgio&lt;/a&gt; and &lt;a href="https://x.com/davidgomes"&gt;David&lt;/a&gt;), I started building Fronteira to make these technical ideas accessible to a wider audience.&lt;/p&gt;
&lt;h2&gt;What is Fronteira?&lt;/h2&gt;
&lt;p&gt;&lt;img alt="Fronteira architecture" src="https://wiki.alcidesfonseca.com/media/images/fronteira-architecture.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://fronteira.alcidesfonseca.com"&gt;Fronteira&lt;/a&gt; is an MCP proxy that acts as a behavioral firewall. You log in through the browser and add integrations with GitHub, Gmail and other services through their MCP servers. You authenticate your harnesses with Fronteira and automatically get access to all your configured MCP servers. You also get portability across harnesses, but that is just a side effect.&lt;/p&gt;
&lt;p&gt;The main advantage of Fronteira is that all MCP interactions go through it, allowing it to track behavior across multiple MCP servers. You get tool-call logging for your harness for free—or, in an enterprise setting, for all your users. I have to admit that this was extremely useful when debugging Fronteira itself, as well as some custom MCP servers.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Different providers being recorded together in Fronteira" src="https://wiki.alcidesfonseca.com/media/images/fronteira-activity.png"&gt;&lt;/p&gt;
&lt;p&gt;Because all the data is centralized, we can track where information flows. In particular, this allows Fronteira to stop attacks involving the &lt;a href="https://simonwillison.net/tags/lethal-trifecta/"&gt;lethal trifecta&lt;/a&gt;. Such an attack can occur when a prompt injection causes an agent to read private data through one tool and expose it to an external endpoint through another. Requiring all interactions to pass through MCP servers is a clear limitation, which I will address later.&lt;/p&gt;
&lt;p&gt;Because there are countless MCP providers and possible combinations, each with its own schema, it is impossible for me to write a set of rules that prevents harmful actions for everyone. Instead, Fronteira allows you to write your rules in English and translates them into &lt;em&gt;Guard DSL&lt;/em&gt;, a language evaluated deterministically on every interaction.&lt;/p&gt;
&lt;p&gt;&lt;img alt="New rule dialog in Fronteira, translating English to Guard DSL" src="/media/images/fronteira-rule.png"&gt;&lt;/p&gt;
&lt;p&gt;Users are not expected to write Guard DSL themselves. Instead, they write rules in natural language and can check that the resulting code matches their expectations. The language's usability could be improved, but it is sufficient for the prototypes I have built.&lt;/p&gt;
&lt;p&gt;While the rule language is evaluated deterministically, it can invoke nondeterministic components that use decision models—currently JEV—to determine whether content contains trade secrets or medical information. There is also session-level tracking, such as &lt;code&gt;read_private&lt;/code&gt; in the example. So far, I have not found anything I could not express, but I am sure that will happen as soon as someone else starts using it.&lt;/p&gt;
&lt;h2&gt;Limitations and Technical Lessons Learned&lt;/h2&gt;
&lt;p&gt;The first limitation is clear: top-level harnesses access the filesystem directly, browse the internet directly, control desktop apps and access APIs directly, usually through skills or other instructions. All these interactions bypass Fronteira, making it useless for day-to-day security in your harness.&lt;/p&gt;
&lt;p&gt;Second, harnesses come with skills that assume the user is using the harness's official Gmail integration—for example, Codex's integration. If Gmail is only available through Fronteira's MCP endpoint, Codex will sometimes fail to find it out of the box. Deploying Fronteira in the wild would therefore require us to write many skills to change this default behavior.&lt;/p&gt;
&lt;p&gt;I also learned that no one respects the fact that MCP tool lists can be dynamic according to the specification. Requests for the tool list can return different results throughout a conversation, but harnesses do not implement support for this. They load the tool list at the beginning and do not reload it unless explicitly asked. I understand the challenge: reloading it before every response would increase the load on MCP servers and add latency. I would like a flag in the response that forces clients to refresh the list.&lt;/p&gt;
&lt;p&gt;Furthermore, the MCP schema can change at any time. There is assumption that MCP schemas do not ever change, but &lt;a href="https://tulmira.com/en-us/blog/mcp-breaking-changes"&gt;I wonder how reliable the assumption is&lt;/a&gt;. &lt;a href="https://www.leggetter.co.uk/blog/mcp-tool-rename-breaking-change/"&gt;MCP does not have explicit versioning&lt;/a&gt;, although some providers use REST-style versioned endpoints such as &lt;code&gt;/api/v1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;On the other hand, I do not want Fronteira to expose a million tools at all times. I would like it to receive the prompt, or some related information, and dynamically select the relevant tools. Tools forbidden by the rules could then be excluded from the context, rather than occupying space when any attempt to call them would result in an error.&lt;/p&gt;
&lt;p&gt;The final technical lesson I learned is that I was too optimistic about trusting Codex with DevOps. I asked it to mirror another app's Django configuration for Fronteira, but it changed the server root, exposing my Resend token and allowing spammers to send spam through my account. The issue was easy to identify and fix, but I expected more from Codex. I also realized that I still do not have a security tool I can point at a deployment, rather than its source code!&lt;/p&gt;
&lt;h2&gt;Alternatives to Fronteira&lt;/h2&gt;
&lt;p&gt;I did not look at competitors before implementing Fronteira. This was not because of laziness or incompetence. It was simply not a priority: I wanted to build it regardless, to understand the challenges firsthand.&lt;/p&gt;
&lt;h3&gt;Behavioral Rules&lt;/h3&gt;
&lt;p&gt;I was aware of &lt;a href="https://aws.amazon.com/blogs/opensource/introducing-dogwood-runtime-verification-for-ai-agents/"&gt;Dogwood&lt;/a&gt;, Amazon's temporal specification extension to the Cedar specification (mainly used for AWS access permissions).&lt;/p&gt;
&lt;p&gt;Dogwood can require previous explicit approval for some actions. Approval is something I wanted to add to Fronteira from the start through a mobile app. The following temporal rule in Cedar permits a share sale only if the same stock and number of shares were approved within the past hour.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;permit (
    principal,
    action == AgentCore::Action::&amp;quot;SellShares&amp;quot;,
    resource
)
when temporal {
    formerly within 1h AgentCore::Action::&amp;quot;ApproveSale&amp;quot;::response{
        input.stock: context.input.stock,
        input.shares: context.input.shares,
        output.approved: true
    }
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To address some of the same limitations as Fronteira, Amazon uses the Dogwood engine in the Strands SDK. By combining the policy engine with a sandbox, they prevent agents from circumventing the "firewall." This is still not foolproof: agents can use a remote browser MCP server to call APIs, avoiding detection.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://invariantlabs.ai/blog/guardrails"&gt;Invariant SDK&lt;/a&gt; features &lt;a href="https://github.com/invariantlabs-ai/docs/blob/main/docs/mcp-scan/guardrails-reference.md#dataflow-rules"&gt;dataflow guardrails&lt;/a&gt;. Both Invariant and &lt;a href="https://getcordon.com"&gt;Cordon&lt;/a&gt; offer MCP proxies like Fronteira. They share the same limitations, but I would like to highlight some interesting language features such as quantifiers and loop detection.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://executor.sh/"&gt;Executor.sh&lt;/a&gt; is another MCP proxy that adds some interesting configurations. For instance, it allows you to create policies in typescript, requiring approval of actions, but also more interesting behaviors such as allowing you to undo sending an email in the next 5 minutes.&lt;/p&gt;
&lt;h3&gt;MCP Proxies with Static Rules&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://www.mintmcp.com"&gt;Mintive&lt;/a&gt;, previously MintMCP, is very similar to Fronteira, except that it does not support behavioral rules. You can still detect private information leaking through static rules, but you cannot prevent malicious sequences of individually harmless calls.&lt;/p&gt;
&lt;p&gt;Both the &lt;a href="https://github.com/lasso-security/mcp-gateway"&gt;Lasso Security MCP Gateway&lt;/a&gt; and &lt;a href="https://witness.ai/blog/introducing-witnessai-agentic-control-one-control-plane-for-every-agent-tool-and-mcp-server/"&gt;WitnessAI&lt;/a&gt; are very similar to Mintive: they automatically manage MCP servers and can detect leaks of information identified as private.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://mcpfw.dev"&gt;MCP Firewall&lt;/a&gt; performs a similar role but also focuses on filtering MCP responses, treating their contents as untrusted because they may contaminate subsequent reasoning.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nvidia.com/nemo/guardrails/configure-guardrails/guardrail-catalog/tool-calling"&gt;NVIDIA NeMo&lt;/a&gt; is another proxy that validates tool parameters and responses against a range of requirements. However, it does not relate different tool calls to one another except through custom code.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://app.endram.com/solutions/mcp-proxy"&gt;Endram&lt;/a&gt; is a proxy that decides whether each call requires manual approval, something Dogwood also supports alongside more complex features.&lt;/p&gt;
&lt;p&gt;Both &lt;a href="https://wso2.com/api-platform/policy-hub/policies/mcp-acl-list"&gt;WSO2&lt;/a&gt; and &lt;a href="https://learn.microsoft.com/en-us/entra/global-secure-access/how-to-configure-mcp-firewall"&gt;Microsoft Global Secure Access&lt;/a&gt; support Cedar-like access control lists for MCP servers, with tool- and prompt-level controls.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.agentcontrol.dev/examples/steer-action-demo"&gt;Agent Control&lt;/a&gt; allows you to create guardrails in Python. These operate at the level of individual tool calls, but Agent Control also integrates with external guardrail infrastructure, such as Dogwood, whose language is more expressive.&lt;/p&gt;
&lt;h3&gt;Language Specification&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://arxiv.org/pdf/2503.18666"&gt;AgentSpec&lt;/a&gt; is a specification language like Fronteira's, with a more principled design but similar features. I would like to study properties of the language, particularly ways to provide feedback when users write inconsistent rules.&lt;/p&gt;
&lt;h3&gt;Others&lt;/h3&gt;
&lt;p&gt;IBM offers &lt;a href="https://github.com/IBM/mcp-context-forge"&gt;MCP ContextForge&lt;/a&gt;, a central gateway focused more on discoverability and observability. &lt;a href="https://agentgateway.dev/"&gt;agentgateway&lt;/a&gt; is also mostly focused on observability. &lt;a href="https://www.truefoundry.com/blog/introducing-truefoundry-mcp-gateway"&gt;TrueFoundry&lt;/a&gt; focuses on the M×N problem—M harnesses connecting to N MCP servers—and observability.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/meta-llama/PurpleLlama/blob/main/LlamaFirewall/README.md"&gt;LlamaFirewall&lt;/a&gt; is similar in that it can inspect traces of calls and detect malicious patterns. However, it does so using a BERT-style LLM, whereas Fronteira primarily supports deterministic analysis.&lt;/p&gt;
&lt;h3&gt;Comparison Summary&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;MCP proxying&lt;/th&gt;
&lt;th&gt;Content guards&lt;/th&gt;
&lt;th&gt;Behavioral / temporal guards&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://fronteira.alcidesfonseca.com"&gt;Fronteira&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://aws.amazon.com/blogs/opensource/introducing-dogwood-runtime-verification-for-ai-agents/"&gt;Dogwood + Strands Box&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://invariantlabs.ai/blog/guardrails"&gt;Invariant + MCP Scan&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://executor.sh"&gt;Executor.sh&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://getcordon.com"&gt;Cordon&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.mintmcp.com"&gt;Mintive / MintMCP&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/lasso-security/mcp-gateway"&gt;Lasso MCP Gateway&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://witness.ai/blog/introducing-witnessai-agentic-control-one-control-plane-for-every-agent-tool-and-mcp-server/"&gt;WitnessAI&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://mcpfw.dev"&gt;MCP Firewall&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.nvidia.com/nemo/guardrails/configure-guardrails/guardrail-catalog/tool-calling"&gt;NVIDIA NeMo Guardrails&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://app.endram.com/solutions/mcp-proxy"&gt;Endram&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://wso2.com/api-platform/policy-hub/policies/mcp-acl-list"&gt;WSO2 MCP ACL policy&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://learn.microsoft.com/en-us/entra/global-secure-access/how-to-configure-mcp-firewall"&gt;Microsoft GSA MCP firewall&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.agentcontrol.dev/examples/steer-action-demo"&gt;Agent Control&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://arxiv.org/pdf/2503.18666"&gt;AgentSpec&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/IBM/mcp-context-forge"&gt;IBM ContextForge&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://agentgateway.dev/"&gt;agentgateway&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🟡&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.truefoundry.com/blog/introducing-truefoundry-mcp-gateway"&gt;TrueFoundry&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/meta-llama/PurpleLlama/blob/main/LlamaFirewall/README.md"&gt;LlamaFirewall&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;🚫&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ (probabilistically)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;After this exercise, I no longer believe in MCP proxies as security boundaries for agents. MCP covers only part of an agent's interaction with the world. Another reason is that MCP is a leaky abstraction. Models are post-trained in specific MCP and skill contexts, so they will always prefer direct alternatives, creating friction for the user.&lt;/p&gt;
&lt;p&gt;However, I strongly believe in the need for logic-based policies to control agents. Those policies should be enforced at the agent boundary and should probably be developed alongside the harnesses and models. I would love this enforcement to be harness-independent and provided by a third party. However, given &lt;a href="https://nicolasbustamante.com/blog/model-harness-fit"&gt;how models are becoming increasingly harness-specific&lt;/a&gt;, I do not see that working in the long term.&lt;/p&gt;
&lt;p&gt;If you have read this far, I am looking for a new opportunity where I can apply my research experience in programming languages, systems and different areas of artificial intelligence to improve the safety of agentic systems. If you are looking for someone with that background, along with the agency and pace of someone who has worked at several startups, you can find my contact details on this website.&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Fri, 16 Oct 2026 12:35:39 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/lessons-learned-building-fronteira?utm_source=rss_all</guid></item><item><title>If I were a Bank CTO (part 2)</title><link>https://wiki.alcidesfonseca.com/blog/if-i-were-a-bank-cto-part-2?utm_source=rss_all</link><description>

&lt;p&gt;I certainly would not &lt;a href="https://www.cnbc.com/2026/10/14/anthropic-mythos-bank-of-america-hiring-cost.html"&gt;hire 1,000 third-party consultants to help fix patches&lt;/a&gt;. I would probably &lt;a href="http://wiki.alcidesfonseca.com/blog/if-i-were-a-bank-or-a-state-cto"&gt;rethink the architecture of the whole system and company&lt;/a&gt;, so that the exposed footprint is minimized. I would give proper training to the internal 3.000 people and power them with AI tooling (even if for monitoring and preventing attacks). And I would even consider open-sourcing the code.&lt;/p&gt;
&lt;p&gt;But hiring a lot of (most likely under qualified) people to patch vulnerabilities is a losing game.&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcides Fonseca</dc:creator><pubDate>Thu, 15 Oct 2026 08:03:32 +0000</pubDate><guid>https://wiki.alcidesfonseca.com/blog/if-i-were-a-bank-cto-part-2?utm_source=rss_all</guid></item></channel></rss>