DSPy can now optimize your program's code, in addition to the prompt.
It's insane: GEPA took one task from 90% accuracy to 95%…while making 75% FEWER LLM calls.
Introducing Flex: https://t.co/FHlPeF0Xto
Long-Running Session Management
Some agent workflows last minutes or hours.
Managing state and resources across long sessions is hard.
Here’s the Long-Running Session Framework I now use:
**Long-Running Session Management Framework**
1. Persist session state externally (not only in context)
2. Support pause, resume, and timeout
3. Clean up resources when sessions expire
4. Allow human takeover of long-running sessions
5. Track session age and resource consumption
6. Implement heartbeat / liveness checks
Core principle: A long-running agent without proper session management will eventually leak memory, money, or both.
Pro tip: Design every long session as if it might be interrupted at any moment.
How do you currently manage state for long-running agent sessions?
Reply below 👇
Follow @AiCamila_ for practical production AI patterns.
#SessionManagement #LongRunning #AgenticAI #ProductionAI #LLMOps #DevOps
Highest alpha move as an industry researcher: hire a great intern.
Kudos to @harshraj1728 for taking this from an idea to a finished paper in under 2 months.
Three Hermes agents on three different machines just ran as a collaborative team inside one Buzz workspace.
Bulls on a local PC, Hibana on a remote Spark over SSH and Admiral on a VPS, all three in one private Buzz group, same channel, different devices.
The demo had Hibana research recent Buzz updates, post findings to the channel and ask Bulls to verify. Bulls cross-checked every claim and flagged one correction. Two agents on two machines collaborating in one thread with no human copy-pasting between terminals.
The setup has one gotcha that trips everyone:
→ The Buzz CLI binary must be on your PATH before you start
→ Without it the gateway connects, the agent sees messages and you see "preparing to reply" in the log
→ But the reply never delivers, and the error message blames the wrong thing
→ Install the CLI first, then restart the gateway
One more thing worth knowing:
→ Memory persists across platforms so a conversation from the TUI carries into Buzz
→ Same agent, same memory, different surface
what we're building at Return My Time right now:
-a governed second brain organized by business function
-a protected data tier for confidential records
-reusable skill libraries for each domain
-seven role-specific agents with defined write scopes
-a cloneable customer template that keeps the method but removes our facts
-validation for structure, links, secrets, and agent boundaries
what we're NOT claiming:
that every agent is autonomous.
that every agent has passed acceptance.
that a pile of documents becomes useful context automatically.
this is the part of the AI services business I think gets skipped.
the impressive demo is such a small piece because the real product is the operating system that makes the demo reliable enough to use again tomorrow.
This is F*cking gold
andrej karpathy joined anthropic to lead a team using claude to accelerate its own pretraining research, teaching claude to help build the next version of itself.
that's real, confirmed directly. the "two anthropic seniors made his loop 1000x better with graph engineering" claim is not something i can verify anywhere, and i'm not going to invent a personal testimonial to make it sound more credible than it is.
what is genuinely worth reading: anthropic's own published claude cookbook on knowledge graph construction, extract, resolve, assemble, query, real and public, no leaked breakthrough required.
read that, then check the article below.
PII Detection & Output Redaction
Agents can easily leak personal data in their responses.
You need automatic detection and redaction before the user sees the output.
Here’s the PII Redaction Framework I now enforce:
**PII Detection & Output Redaction Framework**
1. Scan every agent output for PII patterns
2. Redact or mask sensitive fields automatically
3. Log redaction events for audit
4. Allow different redaction levels by user role
5. Never send raw PII to external tools when avoidable
6. Test redaction rules regularly
Core rule: If your agent can see PII, it can also leak PII unless you actively prevent it.
Pro tip: Run PII detection both on inputs and outputs.
Do you currently redact PII from agent responses automatically?
Reply below 👇
Follow @AiCamila_ for secure production AI patterns.
#PII #Redaction #Privacy #AgenticAI #ProductionAI #Security #DevOps
Agent Benchmarking & Regression Suites
You cannot improve agents if you only test them manually.
You need automated benchmarks that run on every change.
Here’s the Benchmarking Framework I now maintain:
**Agent Benchmarking & Regression Framework**
1. Build a fixed suite of realistic tasks
2. Measure success rate, latency, cost, and tool usage
3. Run the suite on every prompt or model change
4. Fail the pipeline if key metrics regress
5. Track benchmark scores over time
6. Include both happy-path and edge-case scenarios
Core rule: If a change is not measured against a benchmark, it is not ready for production.
Pro tip: Start with 20–30 high-value tasks and grow the suite gradually.
Do you currently run automated regression benchmarks on your agents?
Reply below 👇
Follow @AiCamila_ for production-grade AI patterns.
#Benchmarking #RegressionTesting #AgenticAI #ProductionAI #LLMOps #DevOps
Also 👉 the Stanford course recordings on 'Self-Improving AI Agents' by @Azaliamirh and @achowdhery are out 🧑🏫
Covering many developments throughout the last 2 years and some of our work @SakanaAILabs 🎏 on the AI Scientist 🧑🔬 and AB-MCTS 🌲
🎥: https://t.co/P5AvioO33D
📚: https://t.co/tqvhuotj5X
🛡️ What are Guardrails?
Guardrails are rules and checks that an AI application applies before, during, or after the LLM generates a response.
They help ensure the AI behaves in a way that's safe, reliable, and aligned with the application's requirements.
Think of them as the application's control layer, not the model itself.
Where can guardrails be applied? ✨
Guardrails can exist throughout the AI workflow.
Before the LLM :
→ Validate user input
→ Detect prompt injection attempts
→ Remove sensitive information
→ Check permissions
During the LLM interaction :
→ Restrict which tools the model can access
→ Limit function arguments
→ Enforce structured outputs
→ Control which context is provided
After the LLM responds :
→ Validate the generated output
→ Check JSON format
→ Filter harmful or sensitive content
→ Ask for human approval before taking important actions
Why are guardrails important? ✨
Without guardrails, an LLM might :
→ Call the wrong tool
→ Generate invalid JSON
→ Leak sensitive information
→ Execute actions the user isn't allowed to perform
→ Produce responses that don't follow business rules
The application, not the model, is responsible for preventing these situations.
🏗️ Real-world examples
Different AI applications use different types of guardrails.
→ Claude Code : Confirmation before executing terminal commands.
→ Cursor : User approval before applying code changes.
→ ChatGPT : Tool permissions and structured output validation.
→ GitHub Copilot : Workspace and extension permission boundaries.
→ Bug0 : Validation of generated testing workflows and artifacts before presenting results.
Guardrails aren't just about AI safety.
They're also about enforcing business rules, validating outputs, controlling tool usage, and making AI applications predictable in production.
They make the application more reliable.
Just like validation, authentication, and authorization are essential in traditional software, Guardrails are becoming an essential part of modern AI applications.
____________________
Thank you for reading 🙌
I've been working on an orchestration harness for a squad of agents. I want to have a squad leader agent that supervises a bevy of workers. The workers are analysts, reviewers, gherkin authors, QA authors, implementers, cleaners, code reviewers, hardeners, QA testers, architects, and senior implementers.
There is a fixed workflow from themes to stories to gherkin and QA, to code, unit tests, and acceptance tests, to cleaned code, to hardened code, to QA'd code, to architecture.
This fixed workflow can be described by a static FSM. So I had my agents build it. Then I had my agents build a simulator of my squad and drive the simulator through the FSM. Then I had them jitter the simulator, simulating delays and failures. I had them run monte-carlo testing for many runs.
The agents never would have thought of that kind of testing regime. They never would have build the simulator on their own and engaged in monte-carlo testing.
Don't tell me software engineering is dead.
Runtime Prompt Injection Defenses
Prompt injection is not just a research problem.
It happens in production.
Here’s the Runtime Defense Framework I now apply:
**Runtime Prompt Injection Defense Framework**
1. Separate system instructions from user input strictly
2. Detect known injection patterns before execution
3. Use output filtering and allow-lists for tools
4. Monitor for unexpected tool calls or data access
5. Sandbox high-risk tool execution
6. Alert on suspicious instruction overrides
Core principle: Assume every user input is hostile until proven otherwise.
Pro tip: Defense should live in the orchestration layer, not only inside the prompt.
How are you currently defending against prompt injection at runtime?
Reply below 👇
Follow @AiCamila_ for secure production AI patterns.
#PromptInjection #Security #AgenticAI #ProductionAI #LLMOps #DevOps
Finally a good paper testing whether self-reflection loops are worth it.
Setup: Seven methods, open models at 1.5B, 3B and 7B, two math benchmarks, 150 questions each.
Every generated token counted, including the ones spent on critiques, reflections, debate turns and checking. Each method compared against repeated sampling at its own measured cost, paired by question, with bootstrap intervals and multiplicity correction.
All 36 comparisons came back with no reliable win for any method. Ten are reliably worse, and every one of those is a method where the model inspects its own output. All 18 self-inspection comparisons are negative.
Self-Refine and a forced Reflexion sit 3.6 to 10.1 points below the baseline at 7B. Reflexion as published never triggered its own retry on the smallest model. It judged itself correct every time and quietly became a single chain of thought.
Worth knowing before you add another critique step to your agent loop.
Paper: https://t.co/rvAW4ut7U2
Track more trending AI papers in our academy: https://t.co/1e8RZKs4uX