AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL unreviewed MIT Self-run

Ai Agent

skill-awesome-ai-dev-awesome-ai-dev-agent · by awesome-ai-dev

AI Agent - OpenAI Agents SDK/LangChain Agents/工具调用/记忆机制

No reviews yet
0 installs
15 views
0.0% view→install

Install

$ agentstack add skill-awesome-ai-dev-awesome-ai-dev-agent

Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.

Security review

⚠ Flagged

1 finding(s); flagged for manual review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures
  • high Dangerous shell/eval execution.

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution Used

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Reliability & compatibility

Not yet reviewed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Ai Agent? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

AI Agent 开发

OpenAI Agents SDK

import { Agent, tool } from '@openai/agents';

@tool
async function searchWeb(query: string) {
  // 搜索工具
  return `搜索结果: ${query}`;
}

@tool  
async function calculate(expr: string) {
  // 计算工具
  return eval(expr).toString();
}

const agent = Agent({
  name: 'assistant',
  instructions: '你是一个有帮助的助手',
  tools: [searchWeb, calculate]
});

const result = await agent.run('搜索今天的新闻,然后计算 2+2');

LangChain Agents

import { createOpenAIFunctionsAgent } from 'langchain/agents';
import { ChatOpenAI } from 'langchain/chat_models';
import { SerpAPI } from 'langchain/tools';
import { Calculator } from 'langchain/tools/calculator';

const tools = [new SerpAPI(), new Calculator()];

const agent = await createOpenAIFunctionsAgent({
  llm: new ChatOpenAI({ model: 'gpt-4o' }),
  tools
});

const result = await agent.invoke({
  input: '搜索 AI 新闻并计算 10+5'
});

工具定义

// 自定义工具
import { tool } from 'langchain/core/tools';

const getWeather = tool(
  async ({ city }: { city: string }) => {
    // 调用天气 API
    return `城市 ${city} 天气晴朗,25度`;
  },
  {
    name: 'get_weather',
    description: '获取城市天气信息',
    schema: z.object({
      city: z.string().describe('城市名称')
    })
  }
);

记忆机制

import { BufferMemory } from 'langchain/memory';

const memory = new BufferMemory({
  returnMessages: true,
  memoryKey: 'chat_history'
});

// 存储对话
await memory.saveContext(
  { input: '我叫张三' },
  { output: '你好张三,很高兴认识你' }
);

// 读取历史
const history = await memory.loadMemoryVariables({});

Agent 模式

| 模式 | 说明 | | --- | --- | | ReAct | 推理 + 行动 | | Plan-and-Execute | 计划后执行 | | Tool Use | 工具调用 | | Self-Reflection | 自我反思 |

最佳实践

  1. 工具设计要清晰
  2. 错误处理要完善
  3. 避免无限循环
  4. 合理使用记忆

参考

  • ai-tools/08-ai-platforms-api.md

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.