Skip to content

Commit 7bfb4ee

Browse files
committed
fix: docs
1 parent 2d58d1e commit 7bfb4ee

File tree

3 files changed

+125
-6
lines changed

3 files changed

+125
-6
lines changed

tasks.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from invoke import task, run
1+
from invoke import task
22

33
@task
44
def build(c, version: str):
@@ -7,7 +7,7 @@ def build(c, version: str):
77
@task
88
def test(c, test_path: str = "vanilla_aiagents/tests/", test_case: str = ""):
99
test_case_option = f"-k {test_case}" if test_case else ""
10-
coverage_option = f"--cov-append" if test_case else ""
10+
coverage_option = "--cov-append" if test_case else ""
1111

1212
# Run tests with coverage
1313
c.run(f"pytest --cov=vanilla_aiagents --cov-report=term-missing --cov-report=html {coverage_option} --cov-config=.coveragerc {test_case_option} {test_path}")
@@ -23,12 +23,10 @@ def build_grpc(c):
2323
proto_path = "vanilla_aiagents/vanilla_aiagents/remote"
2424
proto_file = f"{proto_path}/remote.proto"
2525
c.run(f"python -m grpc_tools.protoc -I{proto_path} --python_out={proto_path} --grpc_python_out={proto_path} {proto_file}")
26-
# Replace the import in remote_pb2_grpc.py
27-
# c.run("sed -i 's/from vanilla_aiagents.vanilla_aiagents.remote import remote_pb2/from vanilla_aiagents.remote import remote_pb2/' vanilla_aiagents/vanilla_aiagents/remote/remote_pb2_grpc.py")
2826

2927
@task
3028
def docs(c):
31-
c.run("cd vanilla_aiagents && pdoc --output-dir docs -d markdown vanilla_aiagents !vanilla_aiagents.remote.grpc")
29+
c.run("cd vanilla_aiagents && pdoc --output-dir docs -d markdown --logo https://raw.githubusercontent.com/Azure-Samples/vanilla-aiagents/main/logo.png vanilla_aiagents !vanilla_aiagents.remote.grpc")
3230

3331
@task
3432
def check_lint(c):

vanilla_aiagents/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vanilla AI Agents
22

3-
Sample package demonstrating how to create a simple agenting application without using any specific framework.
3+
A library demonstrating how to create a simple agenting application without using any specific framework.
44

55
## Features
66

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
"""
2+
Lightweight library demonstrating how to create a simple agenting application without using any specific framework.
3+
4+
## Table of Contents
5+
6+
- [Features](#features)
7+
- [Future work](#future-work)
8+
- [Getting Started](#getting-started)
9+
- [Demos](#demos)
10+
- [Testing](#testing)
11+
- [License](#license)
12+
- [Contributing](#contributing)
13+
14+
## Features
15+
16+
This project framework provides the following features:
17+
18+
- Multi-agent chat
19+
- Agent routing (including option to look for available tools to decide)
20+
- Agent state management
21+
- Custom stop conditions
22+
- Interactive or unattended user input
23+
- Chat resumability
24+
- Function calling on agents
25+
- Constrained agent routing
26+
- Sub-workflows
27+
- Simple RAG via function calls
28+
- Image input support
29+
- Ability to run pre and post steps via Sequence
30+
- Conversation context "hidden" variables, which are not displayed to the user but agents can read and write to access additional information
31+
- Usage metrics tracking per conversation, plus internal log for debuggability
32+
- Multiple strategies for agent to filter conversation messages (All, last N, top K and Last N, summarize, etc..)
33+
- LLMLingua (`extras` module) support to compress system prompts via strategies
34+
- LLM support for Structured Output
35+
- Remoting support ((`remote` module)), allowing agents to be run on a remote server and accessed elsewhere
36+
- REST and gRPC channels supported
37+
- Default implementation to run hosts with agent discovery and registration
38+
- Generated Code execution locally and via ACA Dynamic Sessions
39+
- Streaming support, even over REST or gRPC agents
40+
41+
## Future work
42+
43+
- Plugins
44+
- Azure AI Search plugin
45+
- DB plugin
46+
- API plugin
47+
- DAPR integration
48+
- Multi-agent chat with multiple users
49+
50+
## Getting Started
51+
52+
### Prerequisites
53+
54+
Python 3.11 or later is required to run this project.
55+
56+
### Quickstart
57+
58+
```powershell
59+
git clone https://github.com/Azure-Samples/vanilla-aiagents
60+
61+
cd "vanilla-aiagents"
62+
63+
# Create a virtual environment
64+
python -m venv .venv
65+
66+
# Activate the virtual environment
67+
68+
# On Windows
69+
.\.venv\Scripts\activate
70+
# On Unix or MacOS
71+
source .venv/bin/activate
72+
73+
# Install the required dependencies
74+
pip install -r requirements.txt
75+
76+
# Clone .env.sample to .env and update the values
77+
cp .env.sample .env
78+
```
79+
80+
Here is a simple example of how to use the framework:
81+
82+
```python
83+
import os
84+
from vanilla_aiagents.llm import AzureOpenAILLM
85+
from vanilla_aiagents.agent import Agent
86+
from vanilla_aiagents.team import Team
87+
from vanilla_aiagents.workflow import Workflow
88+
89+
llm = AzureOpenAILLM({
90+
"azure_deployment": os.getenv("AZURE_OPENAI_MODEL"),
91+
"azure_endpoint": os.getenv("AZURE_OPENAI_ENDPOINT"),
92+
"api_key": os.getenv("AZURE_OPENAI_KEY"),
93+
"api_version": os.getenv("AZURE_OPENAI_API_VERSION"),
94+
})
95+
96+
# Initialize agents and team
97+
sales = Agent(id="sales", llm=llm, description="A sales agent", system_message=\"""
98+
You are a sales assistant. You provide information about our products and services.
99+
100+
# PRODUCTS
101+
- Product 1: $100, description
102+
- Product 2: $200, description
103+
- Product 3: $300, description
104+
\""")
105+
support = Agent(id="support", llm=llm, description="A support agent", system_message=\"""
106+
You are a support assistant. You provide help with technical issues and account management.
107+
108+
# SUPPORT GUIDELINES
109+
- For technical issues, please provide the following information: ...
110+
- For account management, please provide the following information: ...
111+
\""")
112+
team = Team(id="team", description="Contoso team", members=[sales, support], llm=llm)
113+
114+
# Create a workflow
115+
workflow = Workflow(askable=team)
116+
117+
# Run the workflow
118+
result = workflow.run("Hello, I'd like to know more about your products.")
119+
print(workflow.conversation.messages)
120+
```
121+
"""

0 commit comments

Comments
 (0)