<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Koushik Sen</title>
    <description>The latest articles on Forem by Koushik Sen (@koushik_sen_d549bf321e6fb).</description>
    <link>https://forem.com/koushik_sen_d549bf321e6fb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3701476%2F7a3ad30f-9002-48ce-9441-e0a22a96cf91.jpg</url>
      <title>Forem: Koushik Sen</title>
      <link>https://forem.com/koushik_sen_d549bf321e6fb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/koushik_sen_d549bf321e6fb"/>
    <language>en</language>
    <item>
      <title>Repo Optimizer: I Let a KISS AI Agent Optimize Itself Overnight. It Cut Its Own Cost by 98%.</title>
      <dc:creator>Koushik Sen</dc:creator>
      <pubDate>Thu, 12 Feb 2026 15:32:22 +0000</pubDate>
      <link>https://forem.com/koushik_sen_d549bf321e6fb/repo-optimizer-i-let-a-kiss-ai-agent-optimize-itself-overnight-it-cut-its-own-cost-by-98-1ddi</link>
      <guid>https://forem.com/koushik_sen_d549bf321e6fb/repo-optimizer-i-let-a-kiss-ai-agent-optimize-itself-overnight-it-cut-its-own-cost-by-98-1ddi</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffua0wd1uhu227x18ohpz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffua0wd1uhu227x18ohpz.jpeg" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;No manual tuning. No architecture redesign. Just a plain-English instruction and a feedback loop.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;I maintain &lt;a href="https://github.com/ksenxx/kiss_ai" rel="noopener noreferrer"&gt;KISS&lt;/a&gt;, a minimalist multi-agent framework built on one principle: keep it simple, stupid. The framework's flagship coding agent, &lt;code&gt;RelentlessCodingAgent&lt;/code&gt;, is a single-agent system with smart auto-continuation — it runs sub-sessions of an LLM-powered coding loop, tracks progress across sessions, and keeps hammering at a task until it succeeds or exhausts its budget.  The agent was self-evolved to run relentlessly.&lt;/p&gt;

&lt;p&gt;It works. But it was expensive. A single run with Claude Sonnet 4.5 cost $3–5 and took 600–800 seconds. For an agent framework that preaches simplicity and efficiency, that felt like hypocrisy.&lt;/p&gt;

&lt;p&gt;So I built a 69-line Python script and told it, in plain English, to fix the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tool: &lt;code&gt;repo_optimizer.py&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The entire optimizer is a &lt;code&gt;RelentlessCodingAgent&lt;/code&gt; pointed at its own source code. Here is the core of it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;kiss.agents.coding_agents.relentless_coding_agent&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;RelentlessCodingAgent&lt;/span&gt;

&lt;span class="n"&gt;TASK&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
Your working directory is {work_dir}.

Can you run the command {command}
in the background so that you can monitor the output in real time,
and correct the code in the working directory if needed?  I MUST be able to
see the command output in real time.

If you observe any repeated errors in the output or the command is not able
to complete successfully, please fix the code in the working directory and run the
command again.  Repeat the process until the command can finish successfully.

After the command finishes successfully, run the command again
and monitor its output in real time. You can add diagnostic code which will print
metrics {metrics} information at finer level of granularity.
Check for opportunities to optimize the code
on the basis of the metrics information---you need to minimize the metrics.
If you discover any opportunities to minimize the metrics based on the code
and the command output, optimize the code and run the command again.
Note down the ideas you used to optimize the code and the metrics you achieved in a file,
so that you can use the file to not repeat ideas that have already been tried and failed.
You can also use the file to combine ideas that have been successful in the past.
Repeat the process.  Do not forget to remove the diagnostic
code after the optimization is complete....
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;RelentlessCodingAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RepoAgent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;prompt_template&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;TASK&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...,&lt;/span&gt; 
    &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude-opus-4-6&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="n"&gt;work_dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PROJECT_ROOT&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. The agent runs itself, watches the output, diagnoses problems, edits its own code, and runs itself again — in a loop — until the numbers drop.&lt;/p&gt;

&lt;p&gt;No gradient descent. No hyperparameter grid search. No reward model. Just an LLM reading logs and rewriting source files.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Optimizer Actually Does
&lt;/h2&gt;

&lt;p&gt;The feedback loop works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run&lt;/strong&gt; the target agent on a benchmark task and capture the output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor&lt;/strong&gt; the logs in real time. If the agent crashes or hits repeated errors, fix the code and rerun.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyze&lt;/strong&gt; a successful run: wall-clock time, token count, dollar cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize&lt;/strong&gt; the source code using strategies specified in plain English — compress prompts, switch models, eliminate wasted steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repeat&lt;/strong&gt; until the metrics plateau or the target reduction is hit.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The strategies themselves are just bullet points in the task prompt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shorter system prompts that preserve meaning&lt;/li&gt;
&lt;li&gt;Remove redundant instructions&lt;/li&gt;
&lt;li&gt;Minimize conversation turns&lt;/li&gt;
&lt;li&gt;Batch operations, use early termination&lt;/li&gt;
&lt;li&gt;Search the web for agentic patterns that improve efficiency and reliability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The optimizer isn't hard-coded to apply any particular technique. It reads, reasons, experiments, and iterates. Which techniques it picks depend on what the logs reveal.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Results
&lt;/h2&gt;

&lt;p&gt;After running overnight, the optimizer produced this report:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Before (Claude Sonnet 4.5)&lt;/th&gt;
&lt;th&gt;After (Gemini 2.5 Flash)&lt;/th&gt;
&lt;th&gt;Reduction&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~600–800s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;169.5s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~75%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~$3–5&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.12&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~96–98%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;millions&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;300,729&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;massive&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All three benchmark tests passed after optimization: diamond dependency resolution, circular detection, and failure propagation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Optimizer Changed
&lt;/h2&gt;

&lt;p&gt;The optimizer made nine concrete modifications, all discovered autonomously:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Model switch&lt;/strong&gt;: Claude Sonnet 4.5 ($3/$15 per million tokens) to Gemini 2.5 Flash ($0.30/$2.50 per million tokens) — 10x cheaper input, 6x cheaper output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compressed prompts&lt;/strong&gt;: Stripped verbose &lt;code&gt;CODING_INSTRUCTIONS&lt;/code&gt; boilerplate, shortened &lt;code&gt;TASK_PROMPT&lt;/code&gt; and &lt;code&gt;CONTINUATION_PROMPT&lt;/code&gt; without losing meaning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Added &lt;code&gt;Write()&lt;/code&gt; tool&lt;/strong&gt;: The original agent only had &lt;code&gt;Edit()&lt;/code&gt;, which fails on uniqueness conflicts. Each failure wasted 2–3 steps. Adding &lt;code&gt;Write()&lt;/code&gt; eliminated that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stronger finish instruction&lt;/strong&gt;: "IMMEDIATELY call finish once tests pass. NO extra verification." — stopped the agent from burning tokens on redundant confirmation runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bash timeout guidance&lt;/strong&gt;: "set &lt;code&gt;timeout_seconds=120&lt;/code&gt; for test runs" — prevented hangs on parallel bash execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bounded poll loops&lt;/strong&gt;: "use bounded poll loops, never unbounded waits" — eliminated infinite-loop risks on background processes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced &lt;code&gt;max_steps&lt;/code&gt;&lt;/strong&gt;: 25 down to 15. Forced the agent to be efficient. Still enough to complete the task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplified step threshold&lt;/strong&gt;: Always &lt;code&gt;max_steps - 2&lt;/code&gt; instead of a complex adaptive calculation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Removed &lt;code&gt;CODING_INSTRUCTIONS&lt;/code&gt; import&lt;/strong&gt;: Eliminated unnecessary token overhead loaded into every prompt.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these changes are exotic. Each one is obvious in hindsight. But together they compound into a 98% cost reduction. The point is that no human sat down and applied them — the optimizer discovered and validated each one through experimentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Works
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;RelentlessCodingAgent&lt;/code&gt; is a general-purpose coding loop: it gets a task in natural language, has access to Bash, Read, Edit, and Write tools, and runs sub-sessions until it succeeds. The &lt;code&gt;repo_optimizer.py&lt;/code&gt; simply reuses this same loop, pointed inward.&lt;/p&gt;

&lt;p&gt;This is possible because of three properties of the KISS framework:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agents are just Python functions.&lt;/strong&gt; There's no config ceremony or deployment pipeline. An agent is a class you instantiate and call &lt;code&gt;.run()&lt;/code&gt; on. So an agent can instantiate and run another agent — or itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tools are just Python functions.&lt;/strong&gt; &lt;code&gt;Bash()&lt;/code&gt;, &lt;code&gt;Read()&lt;/code&gt;, &lt;code&gt;Edit()&lt;/code&gt;, &lt;code&gt;Write()&lt;/code&gt; — plain functions with type hints. The agent calls them natively. No wrappers, no adapters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tasks are just strings.&lt;/strong&gt; The optimization strategy, the constraints, the success criteria — all expressed in the task prompt. Changing what the optimizer does means editing a paragraph, not rewriting a pipeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is a self-improving system built from the same primitives as every other KISS agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bigger Picture: &lt;code&gt;repo_agent.py&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The optimizer is actually a specialization of an even simpler tool: &lt;code&gt;repo_agent.py&lt;/code&gt;. This is a 28-line script that takes any task as a command-line argument and executes it against your project root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv run python &lt;span class="nt"&gt;-m&lt;/span&gt; kiss.agents.coding_agents.repo_agent &lt;span class="s2"&gt;"Add retry logic to the API client."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repo agent and the repo optimizer share the same engine (&lt;code&gt;RelentlessCodingAgent&lt;/code&gt;) and the same interface (a string). The only difference is the task. The optimizer's task happens to be "optimize this agent for speed and cost." It could just as easily be "add comprehensive test coverage" or "migrate from REST to GraphQL."&lt;/p&gt;

&lt;p&gt;The agents in KISS don't care what you ask them to do. They care about doing it relentlessly until it's done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# [Install KISS](https://github.com/ksenxx/kiss_ai/README.md)&lt;/span&gt;
&lt;span class="c"&gt;# Run the repo optimizer on your own codebase&lt;/span&gt;
uv run python &lt;span class="nt"&gt;-m&lt;/span&gt; kiss.agents.coding_agents.repo_optimizer

&lt;span class="c"&gt;# Or give the repo agent any task in plain English&lt;/span&gt;
uv run python &lt;span class="nt"&gt;-m&lt;/span&gt; kiss.agents.coding_agents.repo_agent &lt;span class="s2"&gt;"Refactor the database layer for connection pooling."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The framework, the agents, and the optimizer are all open source: &lt;a href="https://github.com/ksenxx/kiss_ai" rel="noopener noreferrer"&gt;github.com/ksenxx/kiss_ai&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;KISS is built by &lt;a href="mailto:ksen@berkeley.edu"&gt;Koushik Sen&lt;/a&gt;. Contributions welcome.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Agent Evolver: The Darwin of AI Agents</title>
      <dc:creator>Koushik Sen</dc:creator>
      <pubDate>Mon, 26 Jan 2026 08:30:14 +0000</pubDate>
      <link>https://forem.com/koushik_sen_d549bf321e6fb/agent-evolver-the-darwin-of-ai-agents-4iio</link>
      <guid>https://forem.com/koushik_sen_d549bf321e6fb/agent-evolver-the-darwin-of-ai-agents-4iio</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffua0wd1uhu227x18ohpz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffua0wd1uhu227x18ohpz.jpeg" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can AI agents be systematically optimized for cost and latency using evolutionary methods?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As multi-agent systems grow in complexity, managing their operational cost and latency becomes a practical concern. Token usage and execution time scale with the number of agents, the length of prompts, and the depth of orchestration logic. Manual optimization of these systems is time-consuming and difficult to do systematically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ksenxx/kiss_ai/tree/main/src/kiss/agents/create_and_optimize_agent" rel="noopener noreferrer"&gt;&lt;strong&gt;Agent Evolver&lt;/strong&gt;&lt;/a&gt; applies genetic evolution to AI agent code, optimizing for &lt;strong&gt;cost and speed&lt;/strong&gt;. It is built using the &lt;a href="https://github.com/ksenxx/kiss_ai/" rel="noopener noreferrer"&gt;KISS&lt;/a&gt; framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Limits of Prompt Engineering
&lt;/h2&gt;

&lt;p&gt;Prompt engineering is a common approach to improving agent behavior, but it addresses only one dimension of agent performance. An agent's efficiency also depends on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How the orchestrator delegates to sub-agents&lt;/li&gt;
&lt;li&gt;Whether operations are batched or run sequentially&lt;/li&gt;
&lt;li&gt;Which tools are created dynamically vs. hardcoded&lt;/li&gt;
&lt;li&gt;How checkpointing affects recovery time&lt;/li&gt;
&lt;li&gt;Whether task management adds overhead or saves tokens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are &lt;strong&gt;code-level concerns&lt;/strong&gt;, not prompt-level ones, and they require a different optimization approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evolutionary Optimization
&lt;/h2&gt;

&lt;p&gt;Agent Evolver applies principles from evolutionary computation—specifically, mutation, crossover, and Pareto-based selection—to agent codebases.&lt;/p&gt;

&lt;p&gt;Here is how the process works:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Seed the Population
&lt;/h3&gt;

&lt;p&gt;You provide a task description specifying what you want the agent system to accomplish. Agent Evolver then uses a coding agent to generate an initial agent implementation. This produces complete, runnable code including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Orchestrator patterns for long-running tasks&lt;/li&gt;
&lt;li&gt;Dynamic todo list management&lt;/li&gt;
&lt;li&gt;Tool creation at runtime&lt;/li&gt;
&lt;li&gt;Checkpointing for resilience&lt;/li&gt;
&lt;li&gt;Sub-agent delegation strategies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The coding agent searches the web for current patterns in building efficient agents, incorporating publicly available techniques.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Mutate and Crossover
&lt;/h3&gt;

&lt;p&gt;Each generation, Agent Evolver applies two evolutionary operations:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mutation&lt;/strong&gt;: A successful agent variant is selected, its code is analyzed, and targeted improvements are applied—shortening prompts, adding caching, batching operations, or optimizing algorithms. The improver agent reads the code, understands the architecture, and makes specific modifications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Crossover&lt;/strong&gt;: Two high-performing variants are selected, and their respective strengths are combined. For example, if Variant A has effective caching logic and Variant B has more compact prompt structures, crossover produces offspring that incorporate both.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Pareto Frontier Selection
&lt;/h3&gt;

&lt;p&gt;Agent Evolver optimizes for multiple objectives simultaneously using a &lt;strong&gt;Pareto frontier&lt;/strong&gt; of non-dominated solutions.&lt;/p&gt;

&lt;p&gt;Consider two agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agent A: 5,000 tokens, 10 seconds&lt;/li&gt;
&lt;li&gt;Agent B: 3,000 tokens, 15 seconds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither dominates the other. Agent A is faster; Agent B is cheaper. Both represent valid trade-offs, so both remain on the frontier.&lt;/p&gt;

&lt;p&gt;An agent is removed only when another agent is &lt;strong&gt;both&lt;/strong&gt; cheaper and faster. This preserves diversity in the population and avoids premature convergence to a local optimum.&lt;/p&gt;

&lt;p&gt;The system uses crowding distance to maintain diversity, ensuring that when the frontier needs trimming, solutions remain distributed across the trade-off curve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison with Prompt Optimization
&lt;/h2&gt;

&lt;p&gt;Prompt optimization tools tune prompt text while leaving agent code unchanged. Agent Evolver operates on both prompts and code:&lt;/p&gt;




&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Traditional Prompt Optimization&lt;/th&gt;
&lt;th&gt;Agent Evolver&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tunes prompt text&lt;/td&gt;
&lt;td&gt;Optimizes prompts AND code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Single objective (accuracy)&lt;/td&gt;
&lt;td&gt;Multi-objective (cost + speed)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Static architecture&lt;/td&gt;
&lt;td&gt;Evolves architecture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manual iteration&lt;/td&gt;
&lt;td&gt;Automated generations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local improvements&lt;/td&gt;
&lt;td&gt;Global search via genetics&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;The improver agent analyzes control flow, identifies redundant API calls, finds opportunities for parallelization, and restructures agent delegation hierarchies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;The system follows this structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                           Task Description                                               │
└─────────────────────────────────────────────────────────────┬────────────────────────────────────────────┘
                                                              │
                                                              ▼
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│         Initial Agent Creation (Relentless Coding Agent) + Web Search for Best Practices                 │
└─────────────────────────────────────────────────────────────┬────────────────────────────────────────────┘
                                                              │
                                                              ▼
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                          Evolution Loop                                                  │
│  ┌────────────────────────────────────────────────────────────────────────────────────────────────◄──┐   │
│  │    Mutation (80%): Single parent, Targeted changes   │   Crossover (20%): Two parents, Combine │  │   │
│  └───────────────────────────────────────────────┬────────────────────────────────────────────────┘  │   │
│                                                  ▼                                                   │   │ 
│  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐  │   │
│  │                         Evaluation: Measure tokens_used, execution_time                        │  │   │
│  └───────────────────────────────────────────────┬────────────────────────────────────────────────┘  │   │
│                                                  ▼                                                   │   │
│  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐  │   │
│  │            Pareto Frontier Update: Keep non-dominated solutions, Trim by crowding distance     │  │   │
│  └───────────────────────────────────────────────┬────────────────────────────────────────────────┘  │   │
│                                                  └───────────────── More generations? ───────────────┘   │
└─────────────────────────────────────────────────────┬────────────────────────────────────────────────────┘
                                                      │ Done
                                                      ▼
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                            Optimal Agent Output: Best trade-off on Pareto frontier                       │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each generation, the system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Samples from the Pareto frontier&lt;/li&gt;
&lt;li&gt;Applies mutation or crossover&lt;/li&gt;
&lt;li&gt;Evaluates the offspring&lt;/li&gt;
&lt;li&gt;Updates the frontier with any non-dominated variants&lt;/li&gt;
&lt;li&gt;Copies the current best to an &lt;code&gt;optimal_agent&lt;/code&gt; directory&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The best agent is always available, even while evolution continues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;kiss.agents.create_and_optimize_agent&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;AgentEvolver&lt;/span&gt;

&lt;span class="n"&gt;evolver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;AgentEvolver&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;best_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;evolver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;task_description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    Build a code review agent that can:
    1. Analyze pull requests for bugs and style issues
    2. Suggest improvements with explanations  
    3. Auto-fix simple issues when confident
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_generations&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;initial_frontier_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_frontier_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;mutation_probability&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Optimal agent: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;best_agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;folder_path&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tokens used: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;best_agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tokens_used&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Execution time: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;best_agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;execution_time&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;s&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Success: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;best_agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;success&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result is a complete agent package including code, config, tests, and documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Agent Evolver automates the optimization of AI agent systems by treating agent code as an evolvable artifact. Rather than manually iterating on prompts and code, you define a task and let the evolutionary loop search for efficient implementations across both cost and latency dimensions.&lt;/p&gt;

&lt;p&gt;Each generation of evolution incorporates current publicly available knowledge about building efficient agents, so improvements from the broader community can be absorbed automatically.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Agent Evolver is part of the &lt;a href="https://github.com/ksenxx/kiss_ai/" rel="noopener noreferrer"&gt;KISS&lt;/a&gt; (Keep It Simple, Stupid) agent framework. It is open-source and available on GitHub.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>automation</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Meet KISS Agent Framework</title>
      <dc:creator>Koushik Sen</dc:creator>
      <pubDate>Fri, 09 Jan 2026 02:13:03 +0000</pubDate>
      <link>https://forem.com/koushik_sen_d549bf321e6fb/meet-the-kiss-agent-framework-2ij6</link>
      <guid>https://forem.com/koushik_sen_d549bf321e6fb/meet-the-kiss-agent-framework-2ij6</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F818u234myu55pxt0wi7j.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F818u234myu55pxt0wi7j.jpeg" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  When Simplicity Becomes Your Superpower: Meet KISS Agent Framework
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;"Everything should be made as simple as possible, but not simpler." — Albert Einstein&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem with AI Agent Frameworks Today
&lt;/h2&gt;

&lt;p&gt;The AI agent ecosystem has grown increasingly complex. New frameworks appear weekly, each layered with abstractions, sprawling configuration files, and dependency trees that rival any large-scale web project. Getting a simple tool call working often requires more effort than the task itself.&lt;/p&gt;

&lt;p&gt;There is another way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KISS&lt;/strong&gt; — the &lt;em&gt;Keep It Simple, Stupid&lt;/em&gt; Agent Framework — takes a fundamentally different approach.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Philosophy: Radical Simplicity
&lt;/h2&gt;

&lt;p&gt;KISS is more than a clever acronym. It is a design philosophy that shapes every line of code in the framework.&lt;/p&gt;

&lt;p&gt;Born from frustration with overly complex agent architectures, KISS strips away the unnecessary and focuses on what matters: &lt;strong&gt;getting intelligent agents to solve real problems&lt;/strong&gt;. The API is simple enough that a coding agent can write complex AI pipelines — called &lt;strong&gt;AI programs&lt;/strong&gt; — from natural language descriptions. You can also optimize an agent program using a builtin optimizer.&lt;/p&gt;

&lt;p&gt;Every KISS agent is a ReAct agent by default:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. You give the agent a prompt
2. The agent thinks and calls tools
3. Repeat until done
4. That's it. That's the framework.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No workflow graphs. No state machines.&lt;/p&gt;




&lt;h2&gt;
  
  
  Your First Agent in 30 Seconds
&lt;/h2&gt;

&lt;p&gt;Here is a minimal working example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;kiss.core.kiss_agent&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;KISSAgent&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;calculate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;expression&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Evaluate a math expression.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;eval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;expression&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;KISSAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Math Buddy&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-3-flash-preview&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;prompt_template&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Calculate: {question}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;question&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What is 15% of 847?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;calculate&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# 127.05
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a fully functional AI agent with tool use — no boilerplate, no annotations, no big setup.&lt;/p&gt;

&lt;p&gt;KISS uses &lt;strong&gt;native function calling&lt;/strong&gt; from the LLM providers. Python functions become tools automatically. Type hints become schemas. Docstrings become descriptions. Everything composes naturally.&lt;/p&gt;




&lt;h2&gt;
  
  
  Multi-Agent Orchestration is Function Composition
&lt;/h2&gt;

&lt;p&gt;Here's where KISS really shines — composing multiple agents into systems greater than the sum of their parts.&lt;/p&gt;

&lt;p&gt;Since agents are just functions, you orchestrate them with plain Python. Here's a complete &lt;strong&gt;research-to-article pipeline&lt;/strong&gt; with three agents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;kiss.core.kiss_agent&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;KISSAgent&lt;/span&gt;

&lt;span class="c1"&gt;# Agent 1: Research a topic
&lt;/span&gt;&lt;span class="n"&gt;researcher&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;KISSAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Researcher&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;research&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;researcher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;prompt_template&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;List 3 key facts about {topic}. Be concise.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;topic&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Python asyncio&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;is_agentic&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;  &lt;span class="c1"&gt;# Simple generation, no tools
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Agent 2: Write a draft using the research
&lt;/span&gt;&lt;span class="n"&gt;writer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;KISSAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Writer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;draft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude-sonnet-4-5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;prompt_template&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Write a 2-paragraph intro based on:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;{research}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;research&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;research&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;is_agentic&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Agent 3: Polish the draft
&lt;/span&gt;&lt;span class="n"&gt;editor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;KISSAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Editor&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;final&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;editor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;prompt_template&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Improve clarity and fix any errors:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;{draft}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;draft&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;draft&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;is_agentic&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;final&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;That's it.&lt;/strong&gt; Each agent can use a different model. Each agent saves its own trajectory. And you compose them with the most powerful orchestration tool ever invented: &lt;strong&gt;regular Python code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No special orchestration framework needed. No message buses. No complex state machines. Just Python functions calling Python functions.&lt;/p&gt;




&lt;h2&gt;
  
  
  GEPA: Teaching Your Agents to Evolve
&lt;/h2&gt;

&lt;p&gt;KISS goes beyond simplicity — it offers &lt;em&gt;intelligent&lt;/em&gt; simplicity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GEPA&lt;/strong&gt; (Genetic-Pareto Prompt Evolution) is a prompt optimization system built into the framework.&lt;/p&gt;

&lt;p&gt;Traditional prompt engineering is largely manual: make changes, evaluate, iterate, and hope for convergence. GEPA automates this process:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Run your agent
2. Reflect on what went wrong (using AI)
3. Evolve the prompt based on insights
4. Maintain a Pareto frontier of best performers
5. Combine winning strategies through crossover
6. Repeat until convergence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not just iteration — it is &lt;strong&gt;evolution&lt;/strong&gt;. GEPA maintains multiple prompt candidates, each optimized for different objectives. Need an agent that is both accurate and concise? GEPA finds the optimal trade-off on the Pareto frontier.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;kiss.agents.gepa&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;GEPA&lt;/span&gt;

&lt;span class="n"&gt;gepa&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;GEPA&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;agent_wrapper&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;my_agent_function&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;initial_prompt_template&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You are a helpful assistant...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;evaluation_fn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;score_the_result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_generations&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;population_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;best_prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gepa&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;optimize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;task&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;solve problems&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our research behind this approach: &lt;a href="https://arxiv.org/pdf/2507.19457" rel="noopener noreferrer"&gt;"GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning"&lt;/a&gt;. The paper demonstrates that prompt evolution can outperform RL on several benchmarks.&lt;/p&gt;




&lt;h2&gt;
  
  
  KISSEvolve: When Algorithms Write Themselves
&lt;/h2&gt;

&lt;p&gt;What if you could start with a bubble sort and end up with quicksort — without writing a single line of sorting code yourself?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KISSEvolve&lt;/strong&gt; is an evolutionary algorithm discovery framework. You provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Starting code (even a naive implementation)&lt;/li&gt;
&lt;li&gt;A fitness function&lt;/li&gt;
&lt;li&gt;An LLM to guide mutations&lt;/li&gt;
&lt;li&gt;It includes features of OpenEvolve and several new ideas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;KISSEvolve handles the rest:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;kiss.agents.kiss_evolve.kiss_evolve&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;KISSEvolve&lt;/span&gt;

&lt;span class="c1"&gt;# Start with O(n²) bubble sort
&lt;/span&gt;&lt;span class="n"&gt;initial_code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
def sort_array(arr):
    n = len(arr)
    for i in range(n):
        for j in range(n - i - 1):
            if arr[j] &amp;gt; arr[j + 1]:
                arr[j], arr[j + 1] = arr[j + 1], arr[j]
    return arr
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

&lt;span class="n"&gt;optimizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;KISSEvolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;initial_code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;initial_code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;evaluation_fn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;measure_performance&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model_names&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemni-3-flash-preview&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;),(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemni-3-pro-preview&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;)],&lt;/span&gt;
    &lt;span class="n"&gt;population_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_generations&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;best&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;optimizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evolve&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="c1"&gt;# Discovers O(n log n) algorithms like quicksort or mergesort
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The framework includes several advanced features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Island-Based Evolution&lt;/strong&gt;: Multiple populations evolving in parallel with periodic migration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Novelty Rejection Sampling&lt;/strong&gt;: Ensures diversity by filtering redundant solutions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Power-Law and Performance-Novelty Sampling&lt;/strong&gt;: Sophisticated parent selection strategies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Model Support&lt;/strong&gt;: Use different LLMs with configurable probabilities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The included &lt;code&gt;kissevolve_bubblesort.py&lt;/code&gt; script demonstrates the discovery of O(n log n) sorting algorithms from a naive starting point.&lt;/p&gt;




&lt;h2&gt;
  
  
  Model Agnostic: Your LLM, Your Choice
&lt;/h2&gt;

&lt;p&gt;KISS is not locked to any single provider. Out of the box, it supports:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Models&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OpenAI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;GPT-4.1, GPT-4o, GPT-5 series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Anthropic&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Claude Opus 4.5, Sonnet 4.5, Haiku 4.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Google&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gemini 2.5/3 Pro, Gemini Flash&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Together AI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Llama 4, Qwen 3, DeepSeek R1/V3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OpenRouter&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;400+ models from all providers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each model includes accurate pricing, context length limits, and capability flags. Token usage and costs are tracked automatically across all agent runs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Switch models with a single parameter
&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude-sonnet-4-5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-3-pro-preview&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openrouter/x-ai/grok-4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Docker Integration: Safe Sandboxing
&lt;/h2&gt;

&lt;p&gt;Giving AI agents the ability to execute code is powerful but risky. KISS includes a &lt;code&gt;DockerManager&lt;/code&gt; that makes sandboxing straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;kiss.docker.docker_manager&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DockerManager&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;DockerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ubuntu:latest&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;KISSAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Safe Agent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-3-flash-preview&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;prompt_template&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Install nginx and configure it&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;run_bash_command&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent can execute any bash command within the container. When the context manager exits, the container is destroyed. The host system remains untouched.&lt;/p&gt;




&lt;h2&gt;
  
  
  Trajectory Visualization: See What Your Agents Think
&lt;/h2&gt;

&lt;p&gt;Debugging AI agents is notoriously difficult. What was the agent reasoning about? Why did it make that tool call?&lt;/p&gt;

&lt;p&gt;KISS automatically saves complete trajectories to YAML files. For easier analysis, the framework includes a &lt;strong&gt;web-based trajectory visualizer&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv run python &lt;span class="nt"&gt;-m&lt;/span&gt; kiss.viz_trajectory.server artifacts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The visualizer provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dark-themed modern UI&lt;/li&gt;
&lt;li&gt;Markdown rendering with syntax highlighting&lt;/li&gt;
&lt;li&gt;Complete message history with timestamps&lt;/li&gt;
&lt;li&gt;Token usage and budget tracking per step&lt;/li&gt;
&lt;li&gt;Tool calls and their results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It turns agent debugging from guesswork into structured analysis.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdsvaylst4o0mpmg737kb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdsvaylst4o0mpmg737kb.png" alt=" " width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Built-in Budget Tracking
&lt;/h2&gt;

&lt;p&gt;AI API calls cost money. KISS tracks every token:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_budget&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# USD limit for this run
&lt;/span&gt;    &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Budget used: $&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;budget_used&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tokens used: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;total_tokens_used&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Global budget: $&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;KISSAgent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;global_budget_used&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set per-agent limits or global limits. Cost calculation is automatic, based on actual model pricing. No more surprise API bills.&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install uv (modern Python package manager)&lt;/span&gt;
curl &lt;span class="nt"&gt;-LsSf&lt;/span&gt; https://astral.sh/uv/install.sh | sh

&lt;span class="c"&gt;# Clone and setup&lt;/span&gt;
git clone https://github.com/your-repo/kiss_ai.git
&lt;span class="nb"&gt;cd &lt;/span&gt;kiss_ai
uv venv &lt;span class="nt"&gt;--python&lt;/span&gt; 3.13
uv &lt;span class="nb"&gt;sync&lt;/span&gt; &lt;span class="nt"&gt;--group&lt;/span&gt; dev

&lt;span class="c"&gt;# Set your API keys&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-key"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-key"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GEMINI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-key"&lt;/span&gt;

&lt;span class="c"&gt;# Run your first agent&lt;/span&gt;
uv run python &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"
from kiss.core.kiss_agent import KISSAgent
agent = KISSAgent('Hello World')
print(agent.run('gpt-4o', 'Say hello!', is_agentic=False))
"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why KISS?
&lt;/h2&gt;

&lt;p&gt;In a landscape increasingly defined by complexity, KISS offers a principled alternative.&lt;/p&gt;

&lt;p&gt;It is for developers who believe that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simplicity is a feature&lt;/strong&gt;, not a limitation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code should be readable&lt;/strong&gt; by humans, not just machines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agents should be tools&lt;/strong&gt;, not black boxes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evolution beats manual engineering&lt;/strong&gt; when the search space is vast&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;KISS does not try to be everything. It aims to be &lt;strong&gt;exactly what you need&lt;/strong&gt; — a clean, powerful foundation for building AI agents that work.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;KISS is actively evolving. The roadmap includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Additional benchmark integrations&lt;/li&gt;
&lt;li&gt;Enhanced multi-agent orchestration&lt;/li&gt;
&lt;li&gt;Improved evolution strategies&lt;/li&gt;
&lt;li&gt;Community-contributed tools and agents&lt;/li&gt;
&lt;li&gt;Asynchronous tool calling support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The core philosophy will remain unchanged: &lt;strong&gt;Keep It Simple, Stupid&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/ksenxx/kiss_ai" rel="noopener noreferrer"&gt;KISS Agent Framework&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GEPA Paper&lt;/strong&gt;: &lt;a href="https://arxiv.org/pdf/2507.19457" rel="noopener noreferrer"&gt;arXiv:2507.19457&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built by Koushik Sen (&lt;a href="mailto:ksen@berkeley.edu"&gt;ksen@berkeley.edu&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Because the best code is the code you don't have to write.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;License&lt;/strong&gt;: Apache-2.0&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt;: ≥3.13&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Philosophy&lt;/strong&gt;: KISS&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
