Skip to content

Update examples - #187

Merged
anbuzin merged 13 commits into
mainfrom
update-examples
Jul 8, 2026
Merged

Update examples#187
anbuzin merged 13 commits into
mainfrom
update-examples

Conversation

@anbuzin

@anbuzin anbuzin commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Restructures examples and adds a couple new ones that seem sensible. The new layout mirrors the framework API, example apps are now all end-to-end agents with web (useChat), Slack, and Textual UI.

Details
  examples/
  ├── README.md
  ├── agents/                      # agent loops, tools, hooks
  │   ├── basic.py                 # model + tool, default loop
  │   ├── content_tool.py          # tool returning images the model can see
  │   ├── custom_hook.py           # pause a tool for external input
  │   ├── custom_loop.py           # hand-rolled stream + ToolRunner loop
  │   ├── mcp_tools.py             # MCP (Context7) tools
  │   ├── streaming_tool.py        # async-generator tool, streamed progress
  │   ├── subagent.py              # nested agent as a tool
  │   └── tool_approval.py         # require_approval: live + interrupted replay
  ├── models/                      # model layer: streaming, output, providers
  │   ├── stream.py
  │   ├── structured_output.py
  │   ├── prompt_caching.py
  │   ├── check_connection.py      # credential / model availability check
  │   ├── anthropic/               # stream, builtin web search
  │   ├── gateway/                 # stream, builtin web search, model params
  │   └── openai/                  # stream, chat completions, explicit client
  ├── media/                       # image/video generation, multimodal input
  │   ├── image_generation.py
  │   ├── image_edit.py
  │   ├── inline_image.py
  │   ├── multimodal_input.py
  │   └── video_generation.py
  └── apps/                        # end-to-end demos
      ├── coding_agent/            # one-file Textual TUI, bash tool + approvals
      ├── slack_agent/             # one-file Socket Mode bot, streams to threads
      ├── web_agent/               # FastAPI + React (AI SDK UI), HITL approval
      ├── durable_agent_temporal/  # agent turn as Temporal workflow + activities
      └── durable_agent_workflows/ # same agent on Vercel Workflows

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-python Ready Ready Preview, Comment Jul 8, 2026 5:47pm

@socket-security

socket-security Bot commented Jul 4, 2026

Copy link
Copy Markdown

Comment thread examples/.test_scripts/run-examples.py Outdated

@msullivan msullivan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview looks good. I haven't reviewed the examples in detail

Comment thread examples/.test_scripts/run-examples.py Outdated
Comment thread examples/.test_scripts/run-examples.py Outdated
# markdown; it has no public import path yet.
from textual.widgets._markdown import MarkdownStream

MODEL_ID = os.environ.get("MODEL_ID", "anthropic/claude-sonnet-4.6")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be a good example to demonstrate enabling thinking and caching, like tau does

@anbuzin
anbuzin force-pushed the update-examples branch from 938d9bd to 5838b0a Compare July 8, 2026 17:45
@anbuzin
anbuzin merged commit b6f41c2 into main Jul 8, 2026
7 checks passed
@anbuzin
anbuzin deleted the update-examples branch July 8, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants