Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.

Commit a6ec40e

Browse files
Merge remote-tracking branch 'origin/main' into next
2 parents c50a0e0 + a83b1c3 commit a6ec40e

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

CODE_OF_CONDUCT.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
This Code of Conduct also applies outside the project spaces when there is a
56+
reasonable belief that an individual's behavior may have a negative impact on
57+
the project or its community.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported by contacting the project team at <[email protected]>. All
63+
complaints will be reviewed and investigated and will result in a response that
64+
is deemed necessary and appropriate to the circumstances. The project team is
65+
obligated to maintain confidentiality with regard to the reporter of an incident.
66+
Further details of specific enforcement policies may be posted separately.
67+
68+
Project maintainers who do not follow or enforce the Code of Conduct in good
69+
faith may face temporary or permanent repercussions as determined by other
70+
members of the project's leadership.
71+
72+
## Attribution
73+
74+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
75+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
76+
77+
[homepage]: https://www.contributor-covenant.org
78+
79+
For answers to common questions about this code of conduct, see
80+
https://www.contributor-covenant.org/faq

src/llama_stack_client/lib/agents/agent.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def get_agent_config(
7979
output_shields: Optional[List[str]] = None,
8080
response_format: Optional[ResponseFormat] = None,
8181
enable_session_persistence: Optional[bool] = None,
82+
name: str | None = None,
8283
) -> AgentConfig:
8384
# Create a minimal valid AgentConfig with required fields
8485
if model is None or instructions is None:
@@ -106,6 +107,8 @@ def get_agent_config(
106107
agent_config["sampling_params"] = sampling_params
107108
if tool_config is not None:
108109
agent_config["tool_config"] = tool_config
110+
if name is not None:
111+
agent_config["name"] = name
109112
if tools is not None:
110113
toolgroups: List[Toolgroup] = []
111114
for tool in tools:
@@ -139,6 +142,7 @@ def __init__(
139142
response_format: Optional[ResponseFormat] = None,
140143
enable_session_persistence: Optional[bool] = None,
141144
extra_headers: Headers | None = None,
145+
name: str | None = None,
142146
):
143147
"""Construct an Agent with the given parameters.
144148
@@ -164,6 +168,7 @@ def __init__(
164168
:param response_format: The response format for the agent.
165169
:param enable_session_persistence: Whether to enable session persistence.
166170
:param extra_headers: Extra headers to add to all requests sent by the agent.
171+
:param name: Optional name for the agent, used in telemetry and identification.
167172
"""
168173
self.client = client
169174

@@ -185,6 +190,7 @@ def __init__(
185190
output_shields=output_shields,
186191
response_format=response_format,
187192
enable_session_persistence=enable_session_persistence,
193+
name=name,
188194
)
189195
client_tools = AgentUtils.get_client_tools(tools)
190196

@@ -389,6 +395,7 @@ def __init__(
389395
response_format: Optional[ResponseFormat] = None,
390396
enable_session_persistence: Optional[bool] = None,
391397
extra_headers: Headers | None = None,
398+
name: str | None = None,
392399
):
393400
"""Construct an Agent with the given parameters.
394401
@@ -414,6 +421,7 @@ def __init__(
414421
:param response_format: The response format for the agent.
415422
:param enable_session_persistence: Whether to enable session persistence.
416423
:param extra_headers: Extra headers to add to all requests sent by the agent.
424+
:param name: Optional name for the agent, used in telemetry and identification.
417425
"""
418426
self.client = client
419427

@@ -435,6 +443,7 @@ def __init__(
435443
output_shields=output_shields,
436444
response_format=response_format,
437445
enable_session_persistence=enable_session_persistence,
446+
name=name,
438447
)
439448
client_tools = AgentUtils.get_client_tools(tools)
440449

0 commit comments

Comments
 (0)