Skip to content

feat(examples): create initial examples and tests#1865

Open
aleskalfas wants to merge 14 commits intomainfrom
1777-Make-default-agents-executable-tested-examples
Open

feat(examples): create initial examples and tests#1865
aleskalfas wants to merge 14 commits intomainfrom
1777-Make-default-agents-executable-tested-examples

Conversation

@aleskalfas
Copy link
Contributor

@aleskalfas aleskalfas commented Jan 21, 2026

Summary

This pull request establishes a foundational examples directory within the repository, complete with a robust scaffolding script to streamline the creation of new agent examples. It introduces initial examples focusing on multi-turn conversation history management, along with their corresponding end-to-end tests. The changes also include necessary development environment configurations and minor dependency updates to support these new additions.

Highlights

  • New Examples Directory and Scaffolding: A new examples directory has been introduced, along with a create-example.sh script and .template files to facilitate the scaffolding of new agent examples and their corresponding end-to-end tests.
  • Multi-Turn Conversation History Examples: Two new Python-based conversational agent examples, basic-history and advanced-history, have been added to demonstrate different approaches to managing conversation history in multi-turn interactions.
  • Development Environment Integration: The agentstack.code-workspace file has been updated to include the new example projects, enhancing the developer experience in VS Code. Additionally, VS Code settings for apps/agentstack-server now configure Ruff as the default Python formatter and linter.
  • Dependency and Configuration Updates: The .dockerignore file has been modified to explicitly include the new examples directory. The default LLM model in apps/agentstack-server/tests/conftest.py has been updated from llama3.1:8b to granite4:latest.
  • New End-to-End Tests: New end-to-end test files have been added for the initial-form-rendering, advanced-history, and basic-history examples, ensuring their functionality and integration.

Linked Issues

#1777

Documentation

  • No Docs Needed:

If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.

@gemini-code-assist

This comment was marked as outdated.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces new examples for the agent stack, including a Docker setup to run them. The changes are a good starting point. My review includes suggestions to improve the robustness of shell scripts in the Dockerfile and entrypoint, align dependency versions and tool configurations in the pyproject.toml files, and simplify some of the agent implementation code for better maintainability.

@aleskalfas aleskalfas force-pushed the 1777-Make-default-agents-executable-tested-examples branch from 974b406 to 03d93e1 Compare January 28, 2026 19:03
@aleskalfas
Copy link
Contributor Author

/gemini summary

@gemini-code-assist
Copy link
Contributor

Summary of Changes

This pull request establishes a foundational examples directory within the repository, complete with a robust scaffolding script to streamline the creation of new agent examples. It introduces initial examples focusing on multi-turn conversation history management, along with their corresponding end-to-end tests. The changes also include necessary development environment configurations and minor dependency updates to support these new additions.

Highlights

  • New Examples Directory and Scaffolding: A new examples directory has been introduced, along with a create-example.sh script and .template files to facilitate the scaffolding of new agent examples and their corresponding end-to-end tests.
  • Multi-Turn Conversation History Examples: Two new Python-based conversational agent examples, basic-history and advanced-history, have been added to demonstrate different approaches to managing conversation history in multi-turn interactions.
  • Development Environment Integration: The agentstack.code-workspace file has been updated to include the new example projects, enhancing the developer experience in VS Code. Additionally, VS Code settings for apps/agentstack-server now configure Ruff as the default Python formatter and linter.
  • Dependency and Configuration Updates: The .dockerignore file has been modified to explicitly include the new examples directory. The default LLM model in apps/agentstack-server/tests/conftest.py has been updated from llama3.1:8b to granite4:latest.
  • New End-to-End Tests: New end-to-end test files have been added for the initial-form-rendering, advanced-history, and basic-history examples, ensuring their functionality and integration.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .dockerignore
    • Added !/examples/ to explicitly include the new examples directory in Docker builds.
  • agentstack.code-workspace
    • Added workspace folders for basic-history-example and advanced-history-example.
  • apps/agentstack-server/.vscode/settings.json
    • Configured Ruff as the default Python formatter.
    • Added Ruff interpreter path to VS Code settings.
  • apps/agentstack-server/tests/conftest.py
    • Changed the default llm_model from llama3.1:8b to granite4:latest.
  • apps/agentstack-server/tests/e2e/examples/agent-integration/forms/test_initial_form_rendering.py
    • Added a new e2e test file for the initial-form-rendering example.
  • apps/agentstack-server/tests/e2e/examples/agent-integration/multi-turn/test_advanced_history.py
    • Added a new e2e test file for the advanced-history example.
  • apps/agentstack-server/tests/e2e/examples/agent-integration/multi-turn/test_basic_history.py
    • Added a new e2e test file for the basic-history example.
  • apps/agentstack-server/tests/e2e/examples/conftest.py
    • Added a new conftest file with utilities for running examples and extracting final tasks from streams.
  • examples/.template/example/.vscode/launch.json
    • Added a new template for VS Code launch configurations for examples.
  • examples/.template/example/pyproject.toml
    • Added a new template for pyproject.toml for examples, including project metadata, dependencies, and Ruff configuration.
  • examples/.template/example/src/example_name/init.py
    • Added an empty __init__.py template.
  • examples/.template/example/src/example_name/agent.py
    • Added a basic agent template with Server and RunContext integration.
  • examples/.template/test.py
    • Added a new template for e2e test files for examples.
  • examples/README.md
    • Added a new README providing instructions on creating new examples using create-example.sh and explaining template placeholders.
  • examples/agent-integration/forms/initial-form-rendering/.vscode/launch.json
    • Added VS Code launch configuration for the initial-form-rendering example.
  • examples/agent-integration/forms/initial-form-rendering/pyproject.toml
    • Added pyproject.toml for the initial-form-rendering example.
  • examples/agent-integration/forms/initial-form-rendering/src/initial_form_rendering/init.py
    • Added __init__.py for the initial-form-rendering example.
  • examples/agent-integration/forms/initial-form-rendering/src/initial_form_rendering/agent.py
    • Added the agent implementation for the initial-form-rendering example.
  • examples/agent-integration/multi-turn/advanced-history/.vscode/launch.json
    • Added VS Code launch configuration for the advanced-history example.
  • examples/agent-integration/multi-turn/advanced-history/pyproject.toml
    • Added pyproject.toml for the advanced-history example, including beeai-framework dependencies.
  • examples/agent-integration/multi-turn/advanced-history/src/advanced_history/init.py
    • Added __init__.py for the advanced-history example.
  • examples/agent-integration/multi-turn/advanced-history/src/advanced_history/agent.py
    • Added the agent implementation for the advanced-history example, demonstrating conversation memory and LLM integration.
  • examples/agent-integration/multi-turn/basic-history/.vscode/launch.json
    • Added VS Code launch configuration for the basic-history example.
  • examples/agent-integration/multi-turn/basic-history/pyproject.toml
    • Added pyproject.toml for the basic-history example.
  • examples/agent-integration/multi-turn/basic-history/src/basic_history/init.py
    • Added __init__.py for the basic-history example.
  • examples/agent-integration/multi-turn/basic-history/src/basic_history/agent.py
    • Added the agent implementation for the basic-history example, demonstrating basic conversation history access.
  • examples/agent-integration/multi-turn/basic-history/uv.lock
    • Added uv.lock file for the basic-history example, listing pinned dependencies.
  • examples/create-example.sh
    • Added a new shell script to scaffold new examples and their e2e tests from templates.
Activity
  • An initial summary of the pull request was provided by gemini-code-assist[bot].
  • gemini-code-assist[bot] suggested updating the agentstack-sdk version and Ruff's target-version in pyproject.toml files for consistency and compatibility.
  • gemini-code-assist[bot] recommended a more robust method for iterating through directories in a shell script, specifically for Dockerfile and example creation.
  • aleskalfas acknowledged and addressed a suggestion regarding iterating directories by removing the problematic code.
  • aleskalfas clarified that the purpose of this PR is to test existing examples, not to modify their internal logic, in response to a suggestion to simplify a function.

@aleskalfas aleskalfas force-pushed the 1777-Make-default-agents-executable-tested-examples branch from 5844a7a to dc09218 Compare February 2, 2026 15:46
@aleskalfas aleskalfas requested a review from jezekra1 February 2, 2026 15:53
@aleskalfas aleskalfas changed the title feat(examples): init feat(examples): create tests Feb 2, 2026
@aleskalfas aleskalfas changed the title feat(examples): create tests feat(examples): create initial examples and tests Feb 2, 2026
@aleskalfas aleskalfas force-pushed the 1777-Make-default-agents-executable-tested-examples branch from dc09218 to f5e7463 Compare February 3, 2026 11:39
Signed-off-by: Aleš Kalfas <[email protected]>
Signed-off-by: Aleš Kalfas <[email protected]>
@aleskalfas aleskalfas marked this pull request as ready for review February 4, 2026 13:55
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 4, 2026
Signed-off-by: Aleš Kalfas <[email protected]>
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants