Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@marklysze
Copy link
Collaborator

@marklysze marklysze commented Feb 24, 2025

Why are these changes needed?

Develop out documentation for how AG2 works under the hood to assist agent and tool builders.

This is still in the works but will cover:

  • initiate_chat
  • generate_reply
  • hooks
  • How to create an agent
  • How to create a tool

UPDATE: Have implemented 2 agents and a tool under contrib as an example for future contributors:

  • TimeReplyAgent (reply-based agent)
  • TimeToolAgent (tool-based agent)
  • TimeTool (tool)

Related issue number

Closes #1097

Checks

@marklysze marklysze added the documentation Improvements or additions to documentation label Feb 24, 2025
@marklysze marklysze self-assigned this Feb 24, 2025
@marklysze marklysze marked this pull request as draft February 24, 2025 04:30
@marklysze
Copy link
Collaborator Author

This is what the new pages look like:
Screenshot 2025-02-25 at 3 20 53 pm

@marklysze marklysze marked this pull request as ready for review February 25, 2025 04:22
@marklysze marklysze marked this pull request as draft February 25, 2025 04:22
@marklysze
Copy link
Collaborator Author

Documentation pretty much done, just working out with @davorrunje how to establish a base contrib set of folders and agents/tools.

@davorrunje
Copy link
Collaborator

@marklysze I would add an example of a tool with dependency injection as this is a very common case. E.g. a Discord tool that require username and password.

@marklysze marklysze marked this pull request as ready for review February 26, 2025 02:27
@marklysze
Copy link
Collaborator Author

@marklysze I would add an example of a tool with dependency injection as this is a very common case. E.g. a Discord tool that require username and password.

Thanks @davorrunje, the DiscordSendTool is included in this documentation and I've added sections in both "creating an agent" and "creating a tool" on dependency injection.

@marklysze marklysze requested a review from davorrunje February 26, 2025 02:33
@davorrunje davorrunje added this pull request to the merge queue Feb 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2025
@davorrunje davorrunje added this pull request to the merge queue Feb 27, 2025
@davorrunje davorrunje removed this pull request from the merge queue due to a manual request Feb 27, 2025
@davorrunje davorrunje enabled auto-merge February 27, 2025 00:20
@davorrunje davorrunje added this pull request to the merge queue Feb 27, 2025
github-merge-queue bot pushed a commit that referenced this pull request Feb 27, 2025
* How AG2 Works documentation - started

* Added Hooks

* Hooks updated and tidy initiate_chat

* Creating an agent, creating a tool, registering a reply function

* Reply-based agent example

* TimeReplyAgent, TimeToolAgent, TimeTool

* Added links to new contrib agents and tools

* Added links to test code

* mypy fix

---------

Co-authored-by: Davor Runje <[email protected]>
Merged via the queue into main with commit 84537e7 Feb 27, 2025
17 checks passed
@davorrunje davorrunje deleted the underthehooddocs branch February 27, 2025 00:49
@github-project-automation github-project-automation bot moved this to Done in ag2 Feb 27, 2025
@codecov
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ There is a different number of reports uploaded between BASE (0790aae) and HEAD (d90c941). Click for more details.

HEAD has 1273 uploads less than BASE
Flag BASE (0790aae) HEAD (d90c941)
core-without-llm 15 1
3.9 78 0
ubuntu-latest 147 1
3.13 88 0
macos-latest 108 0
3.11 67 1
3.10 97 0
commsagent-discord 9 0
optional-deps 139 0
3.12 39 0
browser-use 7 0
windows-latest 114 0
commsagent-slack 9 0
commsagent-telegram 9 0
crawl4ai 13 0
docs 6 0
graph-rag-falkor-db 6 0
interop 13 0
interop-crewai 9 0
interop-langchain 9 0
interop-pydantic-ai 9 0
jupyter-executor 9 0
twilio 9 0
retrievechat 10 0
retrievechat-pgvector 10 0
websockets 9 0
retrievechat-mongodb 10 0
retrievechat-qdrant 11 0
agent-eval 1 0
gpt-assistant-agent 3 0
lmm 4 0
teachable 4 0
gemini 15 0
websurfer 15 0
anthropic 16 0
bedrock 14 0
cerebras 14 0
llama-index-agent 3 0
retrievechat-couchbase 3 0
cohere 15 0
groq 14 0
ollama 14 0
mistral 14 0
together 14 0
swarm 14 0
reasoning 14 0
long-context 3 0
integration 12 0
falkordb 2 0
autobuild 1 0
core-llm 4 0
neo4j 2 0
deepseek 1 0
openai 1 0
Files with missing lines Coverage Δ
autogen/agents/contrib/__init__.py 100.00% <100.00%> (ø)
autogen/agents/contrib/time/__init__.py 100.00% <100.00%> (ø)
autogen/agents/contrib/time/time_reply_agent.py 100.00% <100.00%> (ø)
autogen/agents/contrib/time/time_tool_agent.py 100.00% <100.00%> (ø)
autogen/tools/contrib/__init__.py 100.00% <100.00%> (ø)
autogen/tools/contrib/time/__init__.py 100.00% <100.00%> (ø)
autogen/tools/contrib/time/time.py 100.00% <100.00%> (ø)

... and 63 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Docs]: Agent and Tool builder support documentation

3 participants