Skip to content

Commit 8a2b267

Browse files
Merge pull request #4 from MaryamZi/dev
Add the agent template file
2 parents ff2222b + f3bea83 commit 8a2b267

File tree

2 files changed

+131
-0
lines changed

2 files changed

+131
-0
lines changed
File renamed without changes.

templates/agent_template.afm.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
# ============================================================================
3+
# AGENT DETAILS - All fields OPTIONAL
4+
# ============================================================================
5+
spec_version: "0.3.0" # AFM specification version
6+
name: "Agent Name" # Human-readable agent name
7+
description: "Brief description of the agent's purpose and functionality"
8+
version: "1.0.0" # Semantic version (MAJOR.MINOR.PATCH)
9+
10+
# Single author format (use 'authors' for multiple)
11+
author: "Name <email@example.com>"
12+
13+
# Multiple authors (takes precedence over 'author' if both exist)
14+
authors:
15+
- "Jane Smith <jane@example.com>"
16+
- "John Doe <john@example.com>"
17+
18+
provider:
19+
name: "Organization Name"
20+
url: "https://organization.com"
21+
22+
icon_url: "https://example.com/icons/agent-icon.png"
23+
license: "MIT"
24+
25+
# ============================================================================
26+
# AGENT MODEL - All fields OPTIONAL
27+
# ============================================================================
28+
model:
29+
provider: "openai" # Model provider (openai, anthropic, etc.)
30+
name: "gpt-4-turbo" # Model identifier
31+
url: "https://api.openai.com/v1/chat/completions"
32+
authentication:
33+
type: "api-key"
34+
api_key: "${env:MODEL_API_KEY}"
35+
36+
# ============================================================================
37+
# AGENT EXECUTION - OPTIONAL
38+
# ============================================================================
39+
max_iterations: 50 # Maximum iterations per agent run
40+
41+
# ============================================================================
42+
# AGENT INTERFACES - OPTIONAL (defaults to consolechat)
43+
# ============================================================================
44+
interfaces:
45+
# Console Chat Interface
46+
- type: consolechat
47+
48+
# Web Chat Interface
49+
- type: webchat
50+
exposure:
51+
http:
52+
path: "/chat" # Default: /chat for webchat
53+
54+
# Webhook Interface
55+
- type: webhook
56+
prompt: |
57+
Analyze the following event that was received.
58+
59+
Event Details:
60+
- Type: ${http:payload.event}
61+
- Timestamp: ${http:payload.timestamp}
62+
- Source: ${http:payload.source}
63+
- Header: ${http:header.X-Event-Type}
64+
65+
Payload:
66+
${http:payload}
67+
subscription:
68+
protocol: "websub" # REQUIRED
69+
hub: "https://example.com/websub-hub"
70+
topic: "https://example.com/events/agent"
71+
callback: "${env:CALLBACK_URL}"
72+
secret: "${env:WEBHOOK_SECRET}"
73+
authentication:
74+
type: "bearer"
75+
token: "${env:WEBHOOK_AUTH_TOKEN}"
76+
exposure:
77+
http:
78+
path: "/webhook" # Default: /webhook for webhook
79+
80+
# ============================================================================
81+
# TOOLS - OPTIONAL
82+
# ============================================================================
83+
tools:
84+
mcp:
85+
# MCP Server with bearer authentication
86+
- name: "github_mcp_server"
87+
transport:
88+
type: "http" # Only "http" is currently supported
89+
url: "${env:GITHUB_MCP_URL}"
90+
authentication:
91+
type: "bearer"
92+
token: "${env:GITHUB_OAUTH_TOKEN}"
93+
tool_filter:
94+
allow: # Whitelist of tools
95+
- "issues.create"
96+
- "repos.list"
97+
deny: # Blacklist (applied after allow)
98+
- "repos.delete"
99+
100+
# MCP Server with basic authentication
101+
- name: "database_server"
102+
transport:
103+
type: "http"
104+
url: "${env:DATABASE_MCP_URL}"
105+
authentication:
106+
type: "basic"
107+
username: "${env:DB_USERNAME}"
108+
password: "${env:DB_PASSWORD}"
109+
tool_filter:
110+
deny:
111+
- "delete"
112+
- "drop_table"
113+
114+
# MCP Server without authentication
115+
- name: "public_tools"
116+
transport:
117+
type: "http"
118+
url: "https://public-mcp.example.com"
119+
---
120+
121+
# Role
122+
123+
You are [describe the agent's purpose and responsibilities here]. This section
124+
defines what the agent does and the context in which it operates. This content
125+
typically forms the opening context of the system prompt.
126+
127+
# Instructions
128+
129+
[Provide directives that shape the agent's behavior, capabilities, and
130+
operational guidelines here. This section contains the core logic and rules
131+
that govern how the agent processes inputs and generates outputs.]

0 commit comments

Comments
 (0)