Skip to content

feat: Add Q&A Agent app for Issue #254#531

Open
SeasonPilot wants to merge 1 commit intoagentuniverse-ai:masterfrom
SeasonPilot:feature/simple-qa-agent-app-issue-254
Open

feat: Add Q&A Agent app for Issue #254#531
SeasonPilot wants to merge 1 commit intoagentuniverse-ai:masterfrom
SeasonPilot:feature/simple-qa-agent-app-issue-254

Conversation

@SeasonPilot
Copy link

@SeasonPilot SeasonPilot commented Dec 5, 2025

When submitting a PR, please confirm the following points and put [x] in the boxes one by one. | 在提出pr时,请确认了以下几点,并逐一使用[x]符号确认勾选。

Checklist | 检查项

  • I have read and understood the contributor guidelines. | 我已阅读并理解贡献者指南
  • I have checked for any duplicate features related to this request and communicated with the project maintainers. | 我已检查没有与此请求重复的功能并与项目维护者进行了沟通。
  • I accept the suggestion of the maintainers to make changes to or close this PR. | 我接受此PR配合维护人员的建议进行修改或关闭。
  • I have submitted the test files and can provide screenshots of the test results (required for feature or bug fixes) | 我已经提交了测试文件并可提供测试结果截图(功能修改、BUG修复类PR必须提供,其他按需)
  • I have added or modified the documentation related to this PR | 我已经添加或修改了本次pr对应的文档说明(非必要,根据实际PR内容按需添加)
  • I have added examples and notes if needed | 我已经添加了使用案例代码与文档说明(非必要,根据实际PR内容按需添加)

Please fill in the specific details of this PR: | 请详细填写本次PR的内容:

  • Add Simple Q&A Agent application as a minimal demonstration of agentUniverse framework for Issue Sample Apps Submission/案例提供 #254
  • 为 Issue Sample Apps Submission/案例提供 #254 添加简单问答智能体应用,作为 agentUniverse 框架的极简演示
  • Implement a complete yet minimal agent with bilingual documentation (English/Chinese)
  • 实现一个完整但极简的智能体,包含双语文档(英文/中文)
  • Include three usage modes: web server, Python API, and interactive testing
  • 包含三种使用模式:Web服务器、Python API 和交互式测试
  • Provide comprehensive bilingual comments and documentation for educational purposes
  • 提供全面的双语注释和文档,用于教学目的
  • Use ReAct agent template with Qwen 2.5 LLM (configurable for other LLMs)
  • 使用 ReAct 智能体模板和通义千问 2.5(可配置为其他LLM)
  • Total 19 files with 1,102 lines of code and documentation
  • 共19个文件,包含1,102行代码和文档

Please provide the path of test files and submit screenshots or files of the test results(fill in as needed): | 请填写测试文件路径并提供测试结果截图或文件(按需填写):

  • Test file path | 测试文件路径: examples/sample_apps/simple_qa_agent_app/intelligence/test/simple_qa_agent_test.py
  • Test includes both automated tests and interactive mode | 测试包含自动化测试和交互模式
  • To run tests | 运行测试:
    cd examples/sample_apps/simple_qa_agent_app
    python intelligence/test/simple_qa_agent_test.py
  • Interactive mode | 交互模式:
    python intelligence/test/simple_qa_agent_test.py -i
  • Web server test | Web服务器测试:
    python bootstrap/intelligence/server_application.py

Then test with curl or API client

curl -X POST http://localhost:8888/agent_run
-H "Content-Type: application/json"
-d '{"agent_name": "simple_qa_agent", "input": "What is AI?"}'

Please list the names of the docs that were added or modified in this PR (fill in as needed): | 请列出本次PR新增或修改的文档名称(按需填写):

  • examples/sample_apps/simple_qa_agent_app/README.md - Comprehensive bilingual documentation (431 lines) | 全面的双语文档(431行)
    • Installation and setup guide | 安装和设置指南
    • Three usage methods with examples | 三种使用方法及示例
    • Customization guide | 自定义指南
    • Troubleshooting section | 故障排除部分
    • Architecture explanation | 架构说明
  • Inline comments in all configuration files (YAML and TOML) | 所有配置文件中的内联注释(YAML和TOML)
    • config/config.toml - Application configuration | 应用配置
    • config/log_config.toml - Logging configuration | 日志配置
    • config/custom_key.toml - API keys template | API密钥模板
    • intelligence/agentic/agent/agent_instance/simple_qa_agent.yaml - Agent definition | 智能体定义
    • intelligence/agentic/llm/qwen_llm.yaml - LLM configuration | LLM配置
    • intelligence/agentic/prompt/simple_qa_prompt.yaml - Prompt template | 提示词模板
  • Python file docstrings and comments | Python文件的文档字符串和注释
    • bootstrap/intelligence/server_application.py - Application entry point | 应用入口点
    • intelligence/test/simple_qa_agent_test.py - Test script with usage examples | 带使用示例的测试脚本

Add a minimal demonstration application showcasing agentUniverse core functionality.

Features:
- Minimal setup with only essential files (19 files total)
- Bilingual support (Chinese and English)
- Comprehensive documentation with inline comments
- Three usage modes: web server, Python API, interactive testing
- Easy to extend and customize

Components:
- Agent: ReAct template-based Q&A agent
- LLM: Qwen 2.5 (configurable for other LLMs)
- Prompt: Friendly conversational assistant
- Test: Automated and interactive test scripts

This serves as:
- Learning resource for agentUniverse beginners
- Starting template for new projects
- Community contribution example for Issue agentuniverse-ai#254

Location: examples/sample_apps/simple_qa_agent_app/
@SeasonPilot
Copy link
Author

#254

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.

1 participant