Skip to content

Commit 89fae40

Browse files
committed
add docs.
1 parent 4bfceb1 commit 89fae40

83 files changed

Lines changed: 1712 additions & 1626 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/docs_en/api/agent/a2a_client_agent.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,33 +64,33 @@ The position of the class is:
6464
A simple usage of `A2AClientAgent` is like:
6565

6666
```python
67-
oxy.A2AClientAgent(
68-
name="remote_a2a_agent",
69-
desc="An agent that communicates with an A2A server",
70-
server_url="http://127.0.0.1:8082",
71-
),
67+
oxy.A2AClientAgent(
68+
name="remote_a2a_agent",
69+
desc="An agent that communicates with an A2A server",
70+
server_url="http://127.0.0.1:8082",
71+
),
7272
```
7373

7474
For streaming mode with task polling:
7575

7676
```python
77-
oxy.A2AClientAgent(
78-
name="streaming_a2a_agent",
79-
desc="Streaming A2A client",
80-
server_url="http://127.0.0.1:8082",
81-
streaming=True,
82-
enable_task_polling=True,
83-
task_poll_interval_seconds=2.0,
84-
task_poll_max_wait_seconds=30.0,
85-
),
77+
oxy.A2AClientAgent(
78+
name="streaming_a2a_agent",
79+
desc="Streaming A2A client",
80+
server_url="http://127.0.0.1:8082",
81+
streaming=True,
82+
enable_task_polling=True,
83+
task_poll_interval_seconds=2.0,
84+
task_poll_max_wait_seconds=30.0,
85+
),
8686
```
8787

8888
Or use the `minimal()` factory:
8989

9090
```python
91-
oxy.A2AClientAgent.minimal(
92-
name="quick_a2a",
93-
server_url="http://127.0.0.1:8082",
94-
streaming=True,
95-
),
91+
oxy.A2AClientAgent.minimal(
92+
name="quick_a2a",
93+
server_url="http://127.0.0.1:8082",
94+
streaming=True,
95+
),
9696
```

docs/docs_en/api/agent/chat_agent.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ The position of the class is:
4646

4747
A simple usage of `ChatAgent` is like:
4848
```python
49-
oxy.ChatAgent(
50-
name="planner_agent",
51-
desc="An agent capable of making plans",
52-
llm_model="default_llm",
53-
prompt="""
54-
For a given goal, create a simple and step-by-step executable plan. \
55-
The plan should be concise, with each step being an independent and complete functional module—not an atomic function—to avoid over-fragmentation. \
56-
The plan should consist of independent tasks that, if executed correctly, will lead to the correct answer. \
57-
Ensure that each step is actionable and includes all necessary information for execution. \
58-
The result of the final step should be the final answer. Make sure each step contains all the information required for its execution. \
59-
Do not add any redundant steps, and do not skip any necessary steps.
60-
""".strip(),
61-
),
49+
oxy.ChatAgent(
50+
name="planner_agent",
51+
desc="An agent capable of making plans",
52+
llm_model="default_llm",
53+
prompt="""
54+
For a given goal, create a simple and step-by-step executable plan. \
55+
The plan should be concise, with each step being an independent and complete functional module—not an atomic function—to avoid over-fragmentation. \
56+
The plan should consist of independent tasks that, if executed correctly, will lead to the correct answer. \
57+
Ensure that each step is actionable and includes all necessary information for execution. \
58+
The result of the final step should be the final answer. Make sure each step contains all the information required for its execution. \
59+
Do not add any redundant steps, and do not skip any necessary steps.
60+
""".strip(),
61+
),
6262
```

docs/docs_en/api/agent/parallel_agent.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ The position of the class is:
4646

4747
A simple usage of `ParallelAgent` is like:
4848
```python
49-
oxy.ParallelAgent(
50-
name="expert_panel",
51-
llm_model="default_llm",
52-
desc="Expert panel parallel evaluation",
53-
permitted_tool_name_list=[
54-
"tech_expert",
55-
"business_expert",
56-
"risk_expert",
57-
"legal_expert",
58-
],
59-
is_master=True,
60-
),
49+
oxy.ParallelAgent(
50+
name="expert_panel",
51+
llm_model="default_llm",
52+
desc="Expert panel parallel evaluation",
53+
permitted_tool_name_list=[
54+
"tech_expert",
55+
"business_expert",
56+
"risk_expert",
57+
"legal_expert",
58+
],
59+
is_master=True,
60+
),
6161
```

docs/docs_en/api/agent/plan_and_solve_agent.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ The position of the class is:
5353
A simple usage of `PlanAndSolveAgent` is like:
5454

5555
```python
56-
oxy.PlanAndSolveAgent(
57-
name="plan_solve_agent",
58-
desc="An agent that plans and solves complex tasks",
59-
llm_model="default_llm",
60-
planner_agent="planner",
61-
executor_agent="executor",
62-
max_replan_rounds=5,
63-
),
56+
oxy.PlanAndSolveAgent(
57+
name="plan_solve_agent",
58+
desc="An agent that plans and solves complex tasks",
59+
llm_model="default_llm",
60+
planner_agent="planner",
61+
executor_agent="executor",
62+
max_replan_rounds=5,
63+
),
6464
```
6565

6666
Where `planner` is an agent that returns a JSON list of task steps (e.g. `["step1", "step2"]`), and `executor` is an agent that executes each individual step.

docs/docs_en/api/agent/rag_agent.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ The position of the class is:
5252
A simple usage of `RAGAgent` is like:
5353

5454
```python
55-
async def retrieve_knowledge(oxy_request):
56-
query = oxy_request.get_query()
57-
# Your retrieval logic here (e.g., vector DB search)
58-
return "Retrieved context: ..."
59-
60-
oxy.RAGAgent(
61-
name="rag_agent",
62-
desc="A RAG-powered assistant",
63-
llm_model="default_llm",
64-
func_retrieve_knowledge=retrieve_knowledge,
65-
),
55+
async def retrieve_knowledge(oxy_request):
56+
query = oxy_request.get_query()
57+
# Your retrieval logic here (e.g., vector DB search)
58+
return "Retrieved context: ..."
59+
60+
oxy.RAGAgent(
61+
name="rag_agent",
62+
desc="A RAG-powered assistant",
63+
llm_model="default_llm",
64+
func_retrieve_knowledge=retrieve_knowledge,
65+
),
6666
```

docs/docs_en/api/agent/react_agent.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ The position of the class is:
6161
A simple usage of `ReActAgent` is like:
6262

6363
```python
64-
oxy.ReActAgent(
65-
name="time_agent",
66-
desc="A tool that can query the time",
67-
tools=["time_tools"],
68-
llm_model="default_llm",
69-
prompt=SYSTEM_PROMPT,
70-
timeout=30,
71-
is_multimodal_supported=False,
72-
semaphore=2
73-
),
64+
oxy.ReActAgent(
65+
name="time_agent",
66+
desc="A tool that can query the time",
67+
tools=["time_tools"],
68+
llm_model="default_llm",
69+
prompt=SYSTEM_PROMPT,
70+
timeout=30,
71+
is_multimodal_supported=False,
72+
semaphore=2
73+
),
7474
```

docs/docs_en/api/agent/shell_use_agent.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ The position of the class is:
5252
A simple usage of `ShellUseAgent` is like:
5353

5454
```python
55-
oxy.ShellUseAgent(
56-
name="shell_agent",
57-
desc="An agent that operates a remote Linux machine",
58-
llm_model="default_llm",
59-
prompt=SHELL_SYSTEM_PROMPT,
60-
auth_info={
61-
"hostname": "192.168.1.100",
62-
"username": "admin",
63-
"password": "password",
64-
},
65-
tools=["ssh_tool"],
66-
),
55+
oxy.ShellUseAgent(
56+
name="shell_agent",
57+
desc="An agent that operates a remote Linux machine",
58+
llm_model="default_llm",
59+
prompt=SHELL_SYSTEM_PROMPT,
60+
auth_info={
61+
"hostname": "192.168.1.100",
62+
"username": "admin",
63+
"password": "password",
64+
},
65+
tools=["ssh_tool"],
66+
),
6767
```

docs/docs_en/api/agent/skill_agent.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ The position of the class is:
6262
A simple usage of `SkillAgent` is like:
6363

6464
```python
65-
oxy.SkillAgent(
66-
name="skill_agent",
67-
desc="An agent with skill awareness",
68-
llm_model="default_llm",
69-
skills=["./skills/weather", "./skills/code_review"],
70-
tools=["time_tools"],
71-
),
65+
oxy.SkillAgent(
66+
name="skill_agent",
67+
desc="An agent with skill awareness",
68+
llm_model="default_llm",
69+
skills=["./skills/weather", "./skills/code_review"],
70+
tools=["time_tools"],
71+
),
7272
```
7373

7474
Each skill directory should contain a `SKILL.md` file with frontmatter:

docs/docs_en/api/agent/sse_oxy_agent.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ The position of the class is:
5252
A simple usage of `SSEOxyGent` is like:
5353

5454
```python
55-
oxy.SSEOxyGent(
56-
name="time_agent",
57-
desc="An tool for time query",
58-
server_url="http://127.0.0.1:8082",
59-
),
55+
oxy.SSEOxyGent(
56+
name="time_agent",
57+
desc="An tool for time query",
58+
server_url="http://127.0.0.1:8082",
59+
),
6060
```

docs/docs_en/api/agent/workflow_agent.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ The position of the class is:
5050
A simple usage of `WorkflowAgent` is like:
5151

5252
```python
53-
oxy.WorkflowAgent(
54-
name="workflow_agent",
55-
desc="An agent for executing workflows",
56-
func_workflow=my_workflow_function,
57-
),
53+
oxy.WorkflowAgent(
54+
name="workflow_agent",
55+
desc="An agent for executing workflows",
56+
func_workflow=my_workflow_function,
57+
),
5858
```
5959

6060
Where `my_workflow_function` is a callable that defines the workflow logic to be executed by the agent.

0 commit comments

Comments
 (0)