django-agent-studio 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django_agent_studio/agents/builder.py +68 -0
- {django_agent_studio-0.1.5.dist-info → django_agent_studio-0.1.6.dist-info}/METADATA +1 -1
- {django_agent_studio-0.1.5.dist-info → django_agent_studio-0.1.6.dist-info}/RECORD +5 -5
- {django_agent_studio-0.1.5.dist-info → django_agent_studio-0.1.6.dist-info}/WHEEL +0 -0
- {django_agent_studio-0.1.5.dist-info → django_agent_studio-0.1.6.dist-info}/top_level.txt +0 -0
|
@@ -40,6 +40,7 @@ You have access to tools that allow you to:
|
|
|
40
40
|
7. **Create multi-agent systems** by adding sub-agent tools
|
|
41
41
|
8. **Switch between agents and systems** in the UI
|
|
42
42
|
9. **Configure agent memory** (enable/disable the remember tool)
|
|
43
|
+
10. **Manage agent specifications** (human-readable behavior descriptions)
|
|
43
44
|
|
|
44
45
|
## IMPORTANT: Tool Usage
|
|
45
46
|
|
|
@@ -116,6 +117,28 @@ Agents have a built-in memory system that allows them to remember facts about us
|
|
|
116
117
|
- Support agents that benefit from knowing user history
|
|
117
118
|
- Any agent where personalization improves the experience
|
|
118
119
|
|
|
120
|
+
## Agent Specification (Spec)
|
|
121
|
+
|
|
122
|
+
Every agent can have a **spec** - a human-readable description of its intended behavior, separate from the technical system prompt.
|
|
123
|
+
|
|
124
|
+
**Why use a spec?**
|
|
125
|
+
- **Human oversight**: Non-technical stakeholders can review and approve agent behavior
|
|
126
|
+
- **Documentation**: Clear record of what the agent should and shouldn't do
|
|
127
|
+
- **Builder context**: You can reference the spec when crafting the system prompt
|
|
128
|
+
|
|
129
|
+
**What to include in a spec:**
|
|
130
|
+
- Purpose: What is this agent for?
|
|
131
|
+
- Capabilities: What can it do?
|
|
132
|
+
- Constraints: What should it NOT do?
|
|
133
|
+
- Tone/personality: How should it communicate?
|
|
134
|
+
- Edge cases: How should it handle unusual situations?
|
|
135
|
+
|
|
136
|
+
**Tools:**
|
|
137
|
+
- `get_agent_spec` - View the current spec
|
|
138
|
+
- `update_agent_spec` - Update the spec
|
|
139
|
+
|
|
140
|
+
**Best practice:** When building an agent, start by writing or reviewing the spec, then craft the system prompt to implement that spec. This ensures alignment between intended and actual behavior.
|
|
141
|
+
|
|
119
142
|
When helping users:
|
|
120
143
|
- Ask clarifying questions to understand what they want their agent to do
|
|
121
144
|
- Suggest appropriate system prompts based on the agent's purpose
|
|
@@ -232,6 +255,34 @@ BUILDER_TOOLS = [
|
|
|
232
255
|
},
|
|
233
256
|
},
|
|
234
257
|
},
|
|
258
|
+
{
|
|
259
|
+
"type": "function",
|
|
260
|
+
"function": {
|
|
261
|
+
"name": "get_agent_spec",
|
|
262
|
+
"description": "Get the agent's specification - a human-readable description of the agent's intended behavior, capabilities, and constraints. The spec is separate from the technical system prompt and is meant for human oversight and documentation.",
|
|
263
|
+
"parameters": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"properties": {},
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"type": "function",
|
|
271
|
+
"function": {
|
|
272
|
+
"name": "update_agent_spec",
|
|
273
|
+
"description": "Update the agent's specification. The spec should describe in plain English: what the agent does, what it should and shouldn't do, its personality/tone, and any important constraints. This is for human oversight - non-technical stakeholders can review and edit this.",
|
|
274
|
+
"parameters": {
|
|
275
|
+
"type": "object",
|
|
276
|
+
"properties": {
|
|
277
|
+
"spec": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"description": "The agent specification in plain English. Describe the agent's purpose, capabilities, constraints, and expected behavior.",
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
"required": ["spec"],
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
},
|
|
235
286
|
{
|
|
236
287
|
"type": "function",
|
|
237
288
|
"function": {
|
|
@@ -943,6 +994,23 @@ Knowledge: {len(config.get('knowledge', []))} sources
|
|
|
943
994
|
await create_revision(agent, comment=f"Renamed from '{old_name}' to '{agent.name}'")
|
|
944
995
|
return {"success": True, "message": "Agent name updated"}
|
|
945
996
|
|
|
997
|
+
elif tool_name == "get_agent_spec":
|
|
998
|
+
return {
|
|
999
|
+
"spec": agent.spec or "",
|
|
1000
|
+
"has_spec": bool(agent.spec),
|
|
1001
|
+
"message": "The agent spec describes intended behavior in plain English, separate from the technical system prompt.",
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
elif tool_name == "update_agent_spec":
|
|
1005
|
+
agent.spec = args["spec"]
|
|
1006
|
+
await sync_to_async(agent.save)()
|
|
1007
|
+
await create_revision(agent, comment="Updated agent specification")
|
|
1008
|
+
return {
|
|
1009
|
+
"success": True,
|
|
1010
|
+
"message": "Agent specification updated",
|
|
1011
|
+
"spec_preview": agent.spec[:200] + "..." if len(agent.spec) > 200 else agent.spec,
|
|
1012
|
+
}
|
|
1013
|
+
|
|
946
1014
|
elif tool_name == "update_model_settings":
|
|
947
1015
|
if version:
|
|
948
1016
|
changes = []
|
|
@@ -3,7 +3,7 @@ django_agent_studio/apps.py,sha256=L89QWn4XOvPBs2z6qHAhaE4uZQpasJntYD75aSd2p_k,6
|
|
|
3
3
|
django_agent_studio/urls.py,sha256=O_rrobaxpmg8gR0JmeUzQ0TI3E8mGdcz27p4OJlcI8s,743
|
|
4
4
|
django_agent_studio/views.py,sha256=bQxSIeL9-D4MzKwWkeHEFXrzo1CD911qicrt_A8t_6M,3153
|
|
5
5
|
django_agent_studio/agents/__init__.py,sha256=VYL_ato0DtggIo4BGRkyiz9cm1ARPXhhTQFzoG__NVM,800
|
|
6
|
-
django_agent_studio/agents/builder.py,sha256=
|
|
6
|
+
django_agent_studio/agents/builder.py,sha256=f8BLWCheLRNhnUhU6_oDzoCba0nrWCzpz3cCYYT6eHo,83753
|
|
7
7
|
django_agent_studio/agents/dynamic.py,sha256=KhmdAHkYUdfuuBgsKeY-Sf9sjDA-QiBVWHpw0NAgPX0,13939
|
|
8
8
|
django_agent_studio/api/__init__.py,sha256=vtBwuvBENyFFhFqCWyFsI6cYu4N9ZGqSMmHIRhr9a_U,45
|
|
9
9
|
django_agent_studio/api/permissions.py,sha256=MutmA8TxZb4ZwGfeEoolK-QI04Gbcxs7DPNzkXe_Bss,5302
|
|
@@ -26,7 +26,7 @@ django_agent_studio/templates/django_agent_studio/base.html,sha256=rpHmr7CAWGwRk
|
|
|
26
26
|
django_agent_studio/templates/django_agent_studio/builder.html,sha256=L2KX-RLVpnC2mmYsIl_aSeJIc6b63knTYVrDg8aaU1g,61425
|
|
27
27
|
django_agent_studio/templates/django_agent_studio/home.html,sha256=pgwKPjiQe9UxYYLGSsKT-6erEPDUdW9MZ5D-MOjIxK4,4385
|
|
28
28
|
django_agent_studio/templates/django_agent_studio/test.html,sha256=h9aTtTD1eYcgG-n410qMSryHdpXyKny0hjiKYAoGsic,3779
|
|
29
|
-
django_agent_studio-0.1.
|
|
30
|
-
django_agent_studio-0.1.
|
|
31
|
-
django_agent_studio-0.1.
|
|
32
|
-
django_agent_studio-0.1.
|
|
29
|
+
django_agent_studio-0.1.6.dist-info/METADATA,sha256=A3evUgzWVKgK5MtOlCRr2-9Fnl9NbTAJ96IKoTKSQpU,11294
|
|
30
|
+
django_agent_studio-0.1.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
31
|
+
django_agent_studio-0.1.6.dist-info/top_level.txt,sha256=O1kqZzXPOsJlqnPSAcB2fH5WpJNY8ZNfHEJzX9_SZ0A,20
|
|
32
|
+
django_agent_studio-0.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|