These projects are not isolated tools but rather facets of a broader exploration into AI autonomy. The presence of these three distinct yet related projects reveals a cohesive vision. My work is not merely about code but about exploring the potential of agentic AI to interact with and reason about the real world in increasingly sophisticated ways. The repository's associated topics, such as AI governance, ethics, and simulation, underscore this focus on the higher-order implications of autonomous systems.
Multi-Agent AI Comic Strip Generator
ComicBook produces a daily AI-generated comic strip on the OpenAI Agents SDK, orchestrated as a handoff chain: Director → Storyteller → Cartoonist → Reteller. A single Runner.run(Director) drives the whole episode; each agent calls its transfer_to_<next> tool to pass control on, and a deterministic recovery runs any stage a missed handoff skipped — so a comic always ships. The Director also consults an OriginalityCritic sub-agent (via as_tool) before starting a new arc.
Read more
📐 Architecture: Technical flow and Mermaid diagrams
- Director (temp 1.2) — Invents original story arcs. For a new arc it web-searches for fresh inspiration, forms a candidate, calls
check_arc_originality, and retries until it's distinct from recent arcs; decides arc length organically; writes the story outline; plans each episode's panels and tone. Then hands off to the Storyteller. - OriginalityCritic (temp 0.2,
as_tool) — Reads recent arcs and judges a candidate's core story (plot shape, conflict, archetypes, setting, art style), returningok/too_similar+ retry guidance.start_new_arcadditionally refuses a recently-used art style. - Storyteller (temp 0.5) — Transforms the Director's plan into a panel-by-panel script (dialogue, captions, SFX, camera angles, per-panel size), then hands off to the Cartoonist.
- Cartoonist — Pulls the full arc roster, generates a character reference sheet for visual consistency, then draws each panel sequentially using the reference via Azure OpenAI image editing, assembles the English HTML page, and hands off to the Reteller.
- Reteller (temp 0.9) — In one run, retells the episode natively in Italian and Persian over the same fixed images (not a translation), adapting + saving the localized outline on episode 1 and maintaining a per-language glossary.
- Dynamic Story Arcs: arcs run for as many episodes as they need (3, 8, 15…), then close and a completely fresh arc begins. A three-layer originality guard (prompt-mandated search + the OriginalityCritic + an art-style refusal) keeps each arc genuinely different.
- Character Consistency: one character reference sheet per arc (cached), then every panel is drawn sequentially with that reference (plus mid-arc key panels and prior-episode anchors).
- Multi-language editions: English is native; the Reteller produces it/fa over the shared art. The main title comes from the arc (consistent every episode) with the episode's native title shown as a subtitle.
- Readability guard: the page's color theme is contrast-checked at render time — any low-contrast text is auto-flipped to near-black/near-white, so a box is never light-on-light or dark-on-dark.
- Local debug mode:
DEBUG=trueisolates all reads/writes to a separatearc_debugpartition (and lock) so local tests never touch production;DEBUG_SAVE=falseis a pure dry run. - Arc Memory: Azure Table Storage tracks arc metadata, outlines, glossaries, key panels, and episode summaries so each strip honors continuity.
- Responsive Comic Layout: comic-book styling (speech bubbles, caption boxes, SFX) that adapts to mobile and desktop.
- Frontend:
/comicbookfetches the latest strip (or a selected date) and renders the comic page.
- OpenAI Agents SDK (
openai-agents) — agent definitions,@function_tooltools (deterministic only), handoffs withinput_filter+prompt_with_handoff_instructions, sub-agents viaAgent.as_tool,Runner.run() - Azure OpenAI — chat model (configurable, e.g.
gpt-5.4) for the agents,gpt-imagefor image generation (1-hour client timeouts, override viaCOMICBOOK_LLM_TIMEOUT/COMICBOOK_IMAGE_TIMEOUT) - Azure Table & Blob Storage — arc/episode persistence (with
DEBUGpartition isolation), image and HTML hosting
Autonomous Creative Mathematician & Deep-Research Agent
AI Open Problem Solver extends the LangGraph infrastructure with a creative autonomous mathematician that actively attempts to solve open mathematical problems — including the Millennium Prize Problems. Rather than just searching the internet for existing work, the agent formulates original conjectures, runs computational experiments, develops proof strategies, and uses web research only as a supplement. Each daily iteration is recorded as a rich HTML lab notebook entry. Read more
📐 Architecture: Technical flow and Mermaid diagrams
- Creative Problem Solving: The agent thinks independently — formulating hypotheses, testing conjectures computationally, building proof sketches, and pivoting when approaches fail, rather than passively summarizing existing research.
- Python Math Sandbox: A dedicated computational tool gives the agent a full mathematical laboratory with SymPy (symbolic algebra/calculus), NumPy (numerical computation), SciPy (optimization, integration, special functions), and Matplotlib — enabling it to run experiments, verify proofs numerically, and search for counterexamples.
- Symbolic Calculator: A lightweight tool for quick symbolic operations (simplify, factor, solve, integrate, differentiate, series expansion) without writing full Python scripts.
- Deep Search Agent: Uses LangGraph's deep-search workflow (with a ReAct fallback) to supplement its own thinking with web research — looking up specific theorems, checking whether an approach has been tried, or finding relevant papers.
- Tuned for Creativity: Higher LLM temperature (configurable via
AIOPS_LLM_TEMPERATURE) encourages novel and diverse mathematical thinking across iterations. - Persistent Research Memory: Stores every daily update, plus structured summaries, next steps, and citations in Azure Table Storage.
- Resume & Continue: On each run, the agent ingests the historical context and advances the same problem instead of starting from scratch.
- Infinite Timeline UI: A Flask route (
/ai-open-problem-solver) serves an infinite-scroll page that streams the latest findings first and lazily loads earlier milestones from storage. - Dynamic Problem Picker: The UI queries Azure Table Storage to populate a dropdown of all tracked problems, so you can switch research threads instantly.
- Problem Catalog Table: Configure
aiops_problem_table_namefor the dedicated problem registry table; add or remove problems there to control which threads are available in the UI.
Set up the storage names (aiops_table_name, aiops_blob_name) and optionally define AIOPS_DEFAULT_PROBLEM in .env to choose the default unsolved problem tackled by the agent. Tune creativity with AIOPS_LLM_TEMPERATURE (default 0.8) and sandbox execution time with AIOPS_SANDBOX_TIMEOUT (default 120 seconds).
Live Demo View the daily progress of AI open problems solver: https://sandboxes.live/ai-open-problem-solver
An Autonomous AI Researcher That Writes About AI AIBlog is an autonomous agent that discovers new developments in machine learning and generative AI, performs multi-source research, and publishes a daily blog post written entirely by AI. It uses a ReAct agent wrapped in a LangGraph state machine to orchestrate web search, academic reading, synthesis, and final composition into clean HTML.
- Researched via arXiv, OpenAI, DeepMind, HuggingFace, and other credible sources.
- Enriched with citations, code snippets, tables, and technical diagrams.
- Published as a fully responsive, styled HTML article.
- Illustrated with a custom banner image generated by DALL·E 3 and hosted on Azure Blob Storage.
AIBlog showcases the potential of recursive agent architectures to create high-quality, verifiable technical content without any human-in-the-loop. Read more
📐 Architecture: Technical flow and Mermaid diagrams
Live Demo View the daily AI-written blog: https://SandBoxes.Live/aiblog
AI-Driven News Prediction and Decision-Making TomorrowNews is an experimental open-source project that uses LangChain Agents and Azure OpenAI to generate speculative, AI-driven news predictions based on real-world events. The project aims to simulate decision-making for the future, providing a creative glimpse into what might happen in various sectors, such as politics, economy, society, and the environment.
By feeding real news as input, this project generates predictions and outcomes for the following day, creating speculative headlines and decisions related to global topics. Read more
📐 Architecture: Technical flow and Mermaid diagrams
- Autonomous AI Predictions: Uses real-time news data to predict plausible future events.
- Generative AI Agents: Powered by Azure OpenAI, the system creates detailed and imaginative newspaper articles.
- Responsive HTML Layout: The final output is a beautifully designed newspaper page optimized for both desktop and mobile screens.
- Dynamic Image Generation: Incorporates AI-generated images that complement the headlines, ensuring a cohesive and engaging visual experience.
LangGraph is the backbone of this project, providing a stateful, multi-actor environment for building agent workflows. Key features of LangGraph include:
- Cycles and Branching: Allows the implementation of loops and conditionals within the application.
- Persistence: Saves the state of the application after each step, supporting error recovery and human-in-the-loop workflows.
- Human-in-the-Loop: Enables interruption of graph execution for human approval or edits.
- Streaming Support: Outputs are streamed as they are generated by each node.
- Integration with LangChain: Seamlessly integrates with LangChain and LangSmith for enhanced functionality.
The project leverages Azure OpenAI for generating news content and images. Using GPT-4, the AI models analyze current events and generate predictions for the next day's newspaper.
- News Feed Tool: Fetches the latest news to provide the AI with the necessary context for predictions.
- Image Generation Tool: Creates realistic images based on detailed prompts to enhance the newspaper's visual appeal.
- Agent Workflow: The agent processes the news feed, generates predictions, and formats the output into an HTML page. This process involves multiple iterations and decision-making steps to ensure high-quality content.
- News Collection: The system fetches the latest news every hour using the News Feed Tool.
- AI Analysis and Prediction: The generative AI agent analyzes the current news and predicts potential future events.
- Content Creation: The agent creates detailed articles and generates appropriate images using the Image Generation Tool.
- HTML Newspaper Generation: The content is formatted into an HTML page that resembles a traditional newspaper layout, complete with headlines, articles, and images.
- Output Delivery: The HTML page is ready to be rendered in a browser, providing users with a speculative look at tomorrow’s news.
Note: All content generated by this project is purely speculative, based on AI's interpretation of current events, and should not be viewed as factual or actual news predictions.
Live Demo You can view the live version of the project here: https://SandBoxes.Live/tomorrownews
This experimental project explores the potential of AI as an autonomous decision-maker for a virtual world. Using Azure OpenAI and a structured prompt-response loop, the system generates daily high-level decisions on critical areas such as economy, society, environment, and global politics. Each decision is designed to be realistic, impactful, and ethically informed, balancing immediate outcomes with long-term sustainability. The goal is to create an engaging and evolving narrative that demonstrates the capabilities of generative AI while inviting users to reflect on governance and the complexities of decision-making in a simulated world. Read more
Grounded in the real world: each decision is built in two phases. First the AI picks a fresh topic for the day (diversified away from recent ones). Once the topic is set — but before writing the decision — GenBox runs an internet research step using the model's native web search (the Azure OpenAI Responses API web_search tool, the same approach AIBlog and ComicBook use), gathering the current real-world achievements, challenges, blockers, and limits on that topic. That briefing is fed into the second phase, so the AI's decision proposes concrete, actionable solutions to real current problems rather than abstract policy; the chosen topic and the source URLs it grounded on are saved alongside the decision. The research is best-effort: if web search is unavailable, the decision is still produced (just ungrounded).
The decisions are presented on a retro CRT television: the classic experience scrolls the day's decision as green terminal text, and the four physical knobs let you step backward/forward through the timeline and pause or reverse the scroll.
📐 Architecture: Technical flow and Mermaid diagrams
I invite you to explore the very simple interface at https://SandBoxes.Live/genbox, where you can witness the AI’s daily decisions and follow the evolving narrative of this virtual world.
GenBox now broadcasts each daily decision as an AI-generated TV news segment that plays on the CRT in place of the scrolling text. Instead of reading the (often long) decision verbatim, it's covered like a real bulletin — a short anchor headline ("The AI Government today decided to…"), a field report with b-roll, and a brief interview — all with natively generated speech and lip-sync from Sora 2 on Azure OpenAI. When a video is available it becomes the default display mode; the original scrolling text is always one button-press away.
- News-Bulletin Format: An OpenAI Agents SDK "Producer" agent distills the decision (not a verbatim read) into a segmented shot list — anchor lead → field report → interview → sign-off — with every spoken line sized to Sora's 4/8/12-second clip limits.
- Anchor, Reporter & Interviewee: Beyond the studio anchor, the segment features an on-location correspondent and an interviewee (an official, expert, or citizen), each rendered as their own on-camera speaker.
- Native Speech & B-Roll: Sora 2 generates synchronized audio and dialogue directly, so each speaker actually talks. The producer interleaves face-free b-roll cutaways (cityscapes, factories, solar farms, maps) to illustrate the report.
- Scene Consistency (via remix): Sora 2 has no seed and rejects human faces in
input_reference, so each speaker's first clip is a fresh generation and every later clip of that same speaker is a remix of it — reusing the source's layout, wardrobe, and lighting so the anchor/reporter/interviewee stay recognizable. Face-free b-roll is additionally chained via last-frame→first-frame (input_reference). - Seamless Stitching: All clips are merged with a bundled static
ffmpeg(viaimageio-ffmpeg, no system package required) into a single MP4 stored in Azure Blob Storage and streamed back to the TV. - Non-Blocking Generation: Both the decision text (topic + web research + write) and the video/narration run in background threads guarded by single-flight table locks, so the page never hangs. While today's bulletin is still being prepared the TV shows no-signal static ("Tuning in…") and re-polls
/get-stringuntil the text is ready; it then switches to video automatically once the segment is ready. Status is polled via/genbox-video-statusand cached per day. - CRT Controls, Now for Video: The lowest knob toggles between the classic scrolling text and the news video. The back/next knobs move through the timeline (loading each day's video when available), and the pause knob pauses/plays the clip. Older, text-only decisions keep working exactly as before.
Video is generated for new dates only (configurable cutoff). Point GenBox at a dedicated Sora 2 deployment and storage container via .env:
AZURE_OPENAI_ENDPOINT_SORA # Sora 2 resource endpoint(s)
AZURE_OPENAI_API_KEY_SORA # matching API key(s)
AZURE_OPENAI_MODEL_SORA=sora-2 # deployment name(s)
AZURE_OPENAI_API_VERSION_SORA=preview
AZURE_OPENAI_MODEL_TTS=tts # text-to-speech deployment on the SAME resources
genbox_video_blob_name=genbox-video # blob container for merged MP4s + narration
GENBOX_VIDEO_CUTOFF_DATE=2026-06-05 # only dates >= this get video + narration
GENBOX_VIDEO_ENABLED=true
GENBOX_VIDEO_MAX_CLIPS=6 # cost cap on clips per segment
GENBOX_TTS_VOICE=onyx # narration voice (optional)
When AZURE_OPENAI_MODEL_TTS is set, GenBox also narrates the daily decision in a government-spokesperson tone (via the same resources' TTS deployment). The narration renders quickly — well before the video — and plays over the scrolling text, with the scroll slowed to match the speech length. It's gated, cached, stored (in the video blob container), and referenced in the table just like the video, and served same-origin via /genbox-audio.
Multiple Sora resources / distributed credits. Sora's API is job-scoped: a create call returns a video id that only exists on the resource that served it, so the follow-up poll {id} and download {id} must hit that same resource — a round-robin gateway in front of several resources breaks this affinity. To spread load across resources instead, list them directly (not behind a balancer) as comma-separated values aligned by index; GenBox round-robins at the job level and pins each clip's whole create→poll→download lifecycle to the resource it picked (and fails a clip over to the next resource on error):
AZURE_OPENAI_ENDPOINT_SORA=https://res1.openai.azure.com,https://res2.openai.azure.com,https://res3.openai.azure.com
AZURE_OPENAI_API_KEY_SORA=key1,key2,key3
AZURE_OPENAI_MODEL_SORA=sora-2 # single value applies to all, or give one per resource
- OpenAI Agents SDK (
openai-agents) — the Producer agent that scripts the segment - Sora 2 on Azure OpenAI — text/image-to-video with native audio (
/openai/v1/videos) - imageio-ffmpeg — bundled static
ffmpegfor last-frame extraction and clip concatenation - Azure Table & Blob Storage — per-date video status/metadata and merged MP4 hosting
gunicorn --bind=0.0.0.0 --timeout 3600 --workers 4 --threads 2 main:app
(The 1-hour worker timeout matches the ComicBook generation budget so a long comic run is not cut off; see startup.sh.)




