intentkit 0.6.5.dev8__tar.gz → 0.6.7__tar.gz
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.
Potentially problematic release.
This version of intentkit might be problematic. Click here for more details.
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/PKG-INFO +1 -1
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/__init__.py +1 -1
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/abstracts/skill.py +59 -2
- intentkit-0.6.7/core/agent.py +464 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/core/engine.py +39 -12
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/core/skill.py +67 -2
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/agent.py +10 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/agent_data.py +30 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/app_setting.py +25 -1
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/credit.py +15 -5
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/pyproject.toml +1 -1
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/system/__init__.py +32 -0
- intentkit-0.6.7/skills/system/add_autonomous_task.py +93 -0
- intentkit-0.6.7/skills/system/delete_autonomous_task.py +56 -0
- intentkit-0.6.7/skills/system/edit_autonomous_task.py +116 -0
- intentkit-0.6.7/skills/system/list_autonomous_tasks.py +52 -0
- intentkit-0.6.7/skills/system/schema.json +109 -0
- intentkit-0.6.5.dev8/core/agent.py +0 -191
- intentkit-0.6.5.dev8/skills/system/schema.json +0 -53
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/.gitignore +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/LICENSE +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/MANIFEST.in +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/abstracts/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/abstracts/agent.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/abstracts/api.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/abstracts/engine.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/abstracts/exception.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/abstracts/graph.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/abstracts/twitter.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/clients/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/clients/cdp.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/clients/twitter.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/config/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/config/config.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/core/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/core/api.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/core/client.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/core/credit.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/core/node.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/core/prompt.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/agent_schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/chat.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/conversation.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/db.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/db_mig.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/generator.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/llm.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/redis.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/skill.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/models/user.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/acolyt/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/acolyt/acolyt.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/acolyt/ask.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/acolyt/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/acolyt/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/aixbt/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/aixbt/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/aixbt/aixbt.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/aixbt/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/aixbt/projects.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/aixbt/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/allora/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/allora/allora.jpeg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/allora/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/allora/price.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/allora/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/carv/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/carv/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/carv/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/carv/carv.webp +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/carv/fetch_news.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/carv/onchain_query.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/carv/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/carv/token_info_and_price.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cdp/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cdp/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cdp/cdp.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cdp/get_balance.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cdp/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cdp/swap.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/chainlist/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/chainlist/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/chainlist/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/chainlist/chain_lookup.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/chainlist/chainlist.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/chainlist/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/common/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/common/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/common/common.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/common/current_time.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/common/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/constants.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/cookiefun.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/get_account_details.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/get_account_feed.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/get_account_smart_followers.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/get_sectors.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cookiefun/search_accounts.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/api.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/cryptocompare.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/fetch_news.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/fetch_price.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/fetch_top_exchanges.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/fetch_top_market_cap.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/fetch_top_volume.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/fetch_trading_signals.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptocompare/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptopanic/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptopanic/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptopanic/cryptopanic.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptopanic/fetch_crypto_news.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptopanic/fetch_crypto_sentiment.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/cryptopanic/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dapplooker/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dapplooker/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dapplooker/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dapplooker/dapplooker.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dapplooker/dapplooker_token_data.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dapplooker/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/api.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/coins/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/coins/fetch_batch_historical_prices.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/coins/fetch_block.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/coins/fetch_current_prices.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/coins/fetch_first_price.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/coins/fetch_historical_prices.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/coins/fetch_price_chart.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/coins/fetch_price_percentage.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/config/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/config/chains.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/defillama.jpeg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/fees/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/fees/fetch_fees_overview.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/stablecoins/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/stablecoins/fetch_stablecoin_chains.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/stablecoins/fetch_stablecoin_charts.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/stablecoins/fetch_stablecoin_prices.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/stablecoins/fetch_stablecoins.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tests/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tests/api_integration.test.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tests/api_unit.test.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tvl/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tvl/fetch_chain_historical_tvl.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tvl/fetch_chains.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tvl/fetch_historical_tvl.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tvl/fetch_protocol.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tvl/fetch_protocol_current_tvl.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/tvl/fetch_protocols.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/volumes/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/volumes/fetch_dex_overview.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/volumes/fetch_dex_summary.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/volumes/fetch_options_overview.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/yields/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/yields/fetch_pool_chart.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/defillama/yields/fetch_pools.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dexscreener/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dexscreener/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dexscreener/dexscreener.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dexscreener/model/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dexscreener/model/search_token_response.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dexscreener/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dexscreener/search_token.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dune_analytics/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dune_analytics/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dune_analytics/dune.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dune_analytics/fetch_kol_buys.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dune_analytics/fetch_nation_metrics.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/dune_analytics/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/elfa/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/elfa/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/elfa/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/elfa/elfa.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/elfa/mention.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/elfa/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/elfa/stats.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/elfa/tokens.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/abi/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/abi/approval.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/abi/erc20.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/abi/route.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/best_yield.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/enso.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/networks.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/prices.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/route.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/tokens.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/enso/wallet.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/clear.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/crawl.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/firecrawl.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/query.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/scrape.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/firecrawl/utils.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/github/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/github/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/github/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/github/github.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/github/github_search.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/github/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/heurist.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/image_generation_animagine_xl.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/image_generation_arthemy_comics.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/image_generation_arthemy_real.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/image_generation_braindance.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/image_generation_cyber_realistic_xl.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/image_generation_flux_1_dev.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/image_generation_sdxl.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/heurist/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/http/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/http/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/http/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/http/get.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/http/http.svg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/http/post.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/http/put.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/http/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/lifi/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/lifi/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/lifi/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/lifi/lifi.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/lifi/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/lifi/token_execute.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/lifi/token_quote.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/lifi/utils.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/api.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/fetch_chain_portfolio.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/fetch_nft_portfolio.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/fetch_solana_portfolio.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/fetch_wallet_portfolio.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/moralis.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/tests/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/moralis/tests/test_wallet.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/nation/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/nation/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/nation/nation.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/nation/nft_check.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/nation/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/openai/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/openai/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/openai/dalle_image_generation.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/openai/gpt_image_generation.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/openai/gpt_image_to_image.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/openai/image_to_text.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/openai/openai.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/openai/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/constants.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/moralis.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/token_balances.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/wallet_approvals.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/wallet_defi_positions.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/wallet_history.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/wallet_net_worth.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/wallet_nfts.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/wallet_profitability.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/wallet_profitability_summary.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/wallet_stats.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/portfolio/wallet_swaps.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/skills.toml +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/slack/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/slack/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/slack/get_channel.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/slack/get_message.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/slack/schedule_message.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/slack/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/slack/send_message.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/slack/slack.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/delete_data.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/fetch_data.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/insert_data.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/invoke_function.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/supabase.svg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/update_data.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/supabase/upsert_data.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/system/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/system/read_agent_api_key.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/system/regenerate_agent_api_key.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/system/system.svg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/tavily/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/tavily/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/tavily/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/tavily/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/tavily/tavily.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/tavily/tavily_extract.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/tavily/tavily_search.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/constants.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/erc20_transfers.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/moralis.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/token_analytics.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/token_price.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/token/token_search.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/follow_user.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/get_mentions.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/get_timeline.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/get_user_by_username.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/get_user_tweets.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/like_tweet.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/post_tweet.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/reply_tweet.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/retweet.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/search_tweets.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/twitter/twitter.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/unrealspeech/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/unrealspeech/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/unrealspeech/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/unrealspeech/text_to_speech.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/unrealspeech/unrealspeech.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_audio/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_audio/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_audio/input.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_audio/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_audio/venice_audio.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_audio/venice_logo.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/api.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/config.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_enhance/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_enhance/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_enhance/image_enhance.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_enhance/image_enhance_base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_enhance/image_enhance_input.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/image_generation_base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/image_generation_fluently_xl.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/image_generation_flux_dev.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/image_generation_flux_dev_uncensored.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/image_generation_input.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/image_generation_lustify_sdxl.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/image_generation_pony_realism.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/image_generation_stable_diffusion_3_5.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_generation/image_generation_venice_sd35.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_upscale/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_upscale/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_upscale/image_upscale.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_upscale/image_upscale_base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_upscale/image_upscale_input.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_vision/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_vision/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_vision/image_vision.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_vision/image_vision_base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/image_vision/image_vision_input.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/utils.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/venice_image/venice_image.jpg +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/web_scraper/README.md +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/web_scraper/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/web_scraper/base.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/web_scraper/document_indexer.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/web_scraper/langchain.png +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/web_scraper/schema.json +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/web_scraper/scrape_and_index.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/web_scraper/utils.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/skills/web_scraper/website_indexer.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/utils/__init__.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/utils/chain.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/utils/error.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/utils/logging.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/utils/random.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/utils/s3.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/utils/slack_alert.py +0 -0
- {intentkit-0.6.5.dev8 → intentkit-0.6.7}/utils/tx.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intentkit
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.7
|
|
4
4
|
Summary: Intent-based AI Agent Platform - Core Package
|
|
5
5
|
Project-URL: Homepage, https://github.com/crestal-network/intentkit
|
|
6
6
|
Project-URL: Repository, https://github.com/crestal-network/intentkit
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
|
-
from typing import Any, Dict, Optional
|
|
2
|
+
from typing import Any, Dict, List, Optional
|
|
3
3
|
|
|
4
|
-
from intentkit.models.agent import Agent
|
|
4
|
+
from intentkit.models.agent import Agent, AgentAutonomous
|
|
5
5
|
from intentkit.models.agent_data import AgentData, AgentQuota
|
|
6
6
|
|
|
7
7
|
|
|
@@ -139,3 +139,60 @@ class SkillStoreABC(ABC):
|
|
|
139
139
|
data: JSON data to store
|
|
140
140
|
"""
|
|
141
141
|
pass
|
|
142
|
+
|
|
143
|
+
@staticmethod
|
|
144
|
+
@abstractmethod
|
|
145
|
+
async def list_autonomous_tasks(agent_id: str) -> List[AgentAutonomous]:
|
|
146
|
+
"""List all autonomous tasks for an agent.
|
|
147
|
+
|
|
148
|
+
Args:
|
|
149
|
+
agent_id: ID of the agent
|
|
150
|
+
|
|
151
|
+
Returns:
|
|
152
|
+
List[AgentAutonomous]: List of autonomous task configurations
|
|
153
|
+
"""
|
|
154
|
+
pass
|
|
155
|
+
|
|
156
|
+
@staticmethod
|
|
157
|
+
@abstractmethod
|
|
158
|
+
async def add_autonomous_task(
|
|
159
|
+
agent_id: str, task: AgentAutonomous
|
|
160
|
+
) -> AgentAutonomous:
|
|
161
|
+
"""Add a new autonomous task to an agent.
|
|
162
|
+
|
|
163
|
+
Args:
|
|
164
|
+
agent_id: ID of the agent
|
|
165
|
+
task: Autonomous task configuration
|
|
166
|
+
|
|
167
|
+
Returns:
|
|
168
|
+
AgentAutonomous: The created task
|
|
169
|
+
"""
|
|
170
|
+
pass
|
|
171
|
+
|
|
172
|
+
@staticmethod
|
|
173
|
+
@abstractmethod
|
|
174
|
+
async def delete_autonomous_task(agent_id: str, task_id: str) -> None:
|
|
175
|
+
"""Delete an autonomous task from an agent.
|
|
176
|
+
|
|
177
|
+
Args:
|
|
178
|
+
agent_id: ID of the agent
|
|
179
|
+
task_id: ID of the task to delete
|
|
180
|
+
"""
|
|
181
|
+
pass
|
|
182
|
+
|
|
183
|
+
@staticmethod
|
|
184
|
+
@abstractmethod
|
|
185
|
+
async def update_autonomous_task(
|
|
186
|
+
agent_id: str, task_id: str, task_updates: dict
|
|
187
|
+
) -> AgentAutonomous:
|
|
188
|
+
"""Update an autonomous task for an agent.
|
|
189
|
+
|
|
190
|
+
Args:
|
|
191
|
+
agent_id: ID of the agent
|
|
192
|
+
task_id: ID of the task to update
|
|
193
|
+
task_updates: Dictionary containing fields to update
|
|
194
|
+
|
|
195
|
+
Returns:
|
|
196
|
+
AgentAutonomous: The updated task
|
|
197
|
+
"""
|
|
198
|
+
pass
|
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import time
|
|
3
|
+
from datetime import datetime, timedelta, timezone
|
|
4
|
+
from decimal import Decimal
|
|
5
|
+
from typing import Dict, List
|
|
6
|
+
|
|
7
|
+
from sqlalchemy import func, select, text, update
|
|
8
|
+
|
|
9
|
+
from intentkit.models.agent import Agent, AgentAutonomous, AgentTable
|
|
10
|
+
from intentkit.models.agent_data import AgentQuotaTable
|
|
11
|
+
from intentkit.models.credit import CreditEventTable, EventType, UpstreamType
|
|
12
|
+
from intentkit.models.db import get_session
|
|
13
|
+
from intentkit.utils.error import IntentKitAPIError
|
|
14
|
+
|
|
15
|
+
logger = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
async def agent_action_cost(agent_id: str) -> Dict[str, Decimal]:
|
|
19
|
+
"""
|
|
20
|
+
Calculate various action cost metrics for an agent based on past three days of credit events.
|
|
21
|
+
|
|
22
|
+
Metrics calculated:
|
|
23
|
+
- avg_action_cost: average cost per action
|
|
24
|
+
- min_action_cost: minimum cost per action
|
|
25
|
+
- max_action_cost: maximum cost per action
|
|
26
|
+
- low_action_cost: average cost of the lowest 20% of actions
|
|
27
|
+
- medium_action_cost: average cost of the middle 60% of actions
|
|
28
|
+
- high_action_cost: average cost of the highest 20% of actions
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
agent_id: ID of the agent
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
Dict[str, Decimal]: Dictionary containing all calculated cost metrics
|
|
35
|
+
"""
|
|
36
|
+
start_time = time.time()
|
|
37
|
+
default_value = Decimal("0")
|
|
38
|
+
|
|
39
|
+
agent = await Agent.get(agent_id)
|
|
40
|
+
if not agent:
|
|
41
|
+
raise IntentKitAPIError(
|
|
42
|
+
400, "AgentNotFound", f"Agent with ID {agent_id} does not exist."
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
async with get_session() as session:
|
|
46
|
+
# Calculate the date 3 days ago from now
|
|
47
|
+
three_days_ago = datetime.now(timezone.utc) - timedelta(days=3)
|
|
48
|
+
|
|
49
|
+
# First, count the number of distinct start_message_ids to determine if we have enough data
|
|
50
|
+
count_query = select(
|
|
51
|
+
func.count(func.distinct(CreditEventTable.start_message_id))
|
|
52
|
+
).where(
|
|
53
|
+
CreditEventTable.agent_id == agent_id,
|
|
54
|
+
CreditEventTable.created_at >= three_days_ago,
|
|
55
|
+
CreditEventTable.user_id != agent.owner,
|
|
56
|
+
CreditEventTable.upstream_type == UpstreamType.EXECUTOR,
|
|
57
|
+
CreditEventTable.event_type.in_([EventType.MESSAGE, EventType.SKILL_CALL]),
|
|
58
|
+
CreditEventTable.start_message_id.is_not(None),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
result = await session.execute(count_query)
|
|
62
|
+
record_count = result.scalar_one()
|
|
63
|
+
|
|
64
|
+
# If we have fewer than 10 records, return default values
|
|
65
|
+
if record_count < 10:
|
|
66
|
+
time_cost = time.time() - start_time
|
|
67
|
+
logger.info(
|
|
68
|
+
f"agent_action_cost for {agent_id}: using default values (insufficient records: {record_count}) timeCost={time_cost:.3f}s"
|
|
69
|
+
)
|
|
70
|
+
return {
|
|
71
|
+
"avg_action_cost": default_value,
|
|
72
|
+
"min_action_cost": default_value,
|
|
73
|
+
"max_action_cost": default_value,
|
|
74
|
+
"low_action_cost": default_value,
|
|
75
|
+
"medium_action_cost": default_value,
|
|
76
|
+
"high_action_cost": default_value,
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
# Calculate the basic metrics (avg, min, max) directly in PostgreSQL
|
|
80
|
+
basic_metrics_query = text("""
|
|
81
|
+
WITH action_sums AS (
|
|
82
|
+
SELECT start_message_id, SUM(total_amount) AS action_cost
|
|
83
|
+
FROM credit_events
|
|
84
|
+
WHERE agent_id = :agent_id
|
|
85
|
+
AND created_at >= :three_days_ago
|
|
86
|
+
AND upstream_type = :upstream_type
|
|
87
|
+
AND event_type IN (:event_type_message, :event_type_skill_call)
|
|
88
|
+
AND start_message_id IS NOT NULL
|
|
89
|
+
GROUP BY start_message_id
|
|
90
|
+
)
|
|
91
|
+
SELECT
|
|
92
|
+
AVG(action_cost) AS avg_cost,
|
|
93
|
+
MIN(action_cost) AS min_cost,
|
|
94
|
+
MAX(action_cost) AS max_cost
|
|
95
|
+
FROM action_sums
|
|
96
|
+
""")
|
|
97
|
+
|
|
98
|
+
# Calculate the percentile-based metrics (low, medium, high) using window functions
|
|
99
|
+
percentile_metrics_query = text("""
|
|
100
|
+
WITH action_sums AS (
|
|
101
|
+
SELECT
|
|
102
|
+
start_message_id,
|
|
103
|
+
SUM(total_amount) AS action_cost,
|
|
104
|
+
NTILE(5) OVER (ORDER BY SUM(total_amount)) AS quintile
|
|
105
|
+
FROM credit_events
|
|
106
|
+
WHERE agent_id = :agent_id
|
|
107
|
+
AND created_at >= :three_days_ago
|
|
108
|
+
AND upstream_type = :upstream_type
|
|
109
|
+
AND event_type IN (:event_type_message, :event_type_skill_call)
|
|
110
|
+
AND start_message_id IS NOT NULL
|
|
111
|
+
GROUP BY start_message_id
|
|
112
|
+
)
|
|
113
|
+
SELECT
|
|
114
|
+
(SELECT AVG(action_cost) FROM action_sums WHERE quintile = 1) AS low_cost,
|
|
115
|
+
(SELECT AVG(action_cost) FROM action_sums WHERE quintile IN (2, 3, 4)) AS medium_cost,
|
|
116
|
+
(SELECT AVG(action_cost) FROM action_sums WHERE quintile = 5) AS high_cost
|
|
117
|
+
FROM action_sums
|
|
118
|
+
LIMIT 1
|
|
119
|
+
""")
|
|
120
|
+
|
|
121
|
+
# Bind parameters to prevent SQL injection and ensure correct types
|
|
122
|
+
params = {
|
|
123
|
+
"agent_id": agent_id,
|
|
124
|
+
"three_days_ago": three_days_ago,
|
|
125
|
+
"upstream_type": UpstreamType.EXECUTOR,
|
|
126
|
+
"event_type_message": EventType.MESSAGE,
|
|
127
|
+
"event_type_skill_call": EventType.SKILL_CALL,
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
# Execute the basic metrics query
|
|
131
|
+
basic_result = await session.execute(basic_metrics_query, params)
|
|
132
|
+
basic_row = basic_result.fetchone()
|
|
133
|
+
|
|
134
|
+
# Execute the percentile metrics query
|
|
135
|
+
percentile_result = await session.execute(percentile_metrics_query, params)
|
|
136
|
+
percentile_row = percentile_result.fetchone()
|
|
137
|
+
|
|
138
|
+
# If no results, return the default values
|
|
139
|
+
if not basic_row or basic_row[0] is None:
|
|
140
|
+
time_cost = time.time() - start_time
|
|
141
|
+
logger.info(
|
|
142
|
+
f"agent_action_cost for {agent_id}: using default values (no action costs found) timeCost={time_cost:.3f}s"
|
|
143
|
+
)
|
|
144
|
+
return {
|
|
145
|
+
"avg_action_cost": default_value,
|
|
146
|
+
"min_action_cost": default_value,
|
|
147
|
+
"max_action_cost": default_value,
|
|
148
|
+
"low_action_cost": default_value,
|
|
149
|
+
"medium_action_cost": default_value,
|
|
150
|
+
"high_action_cost": default_value,
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
# Extract and convert the values to Decimal for consistent precision
|
|
154
|
+
avg_cost = Decimal(str(basic_row[0] or 0)).quantize(Decimal("0.0001"))
|
|
155
|
+
min_cost = Decimal(str(basic_row[1] or 0)).quantize(Decimal("0.0001"))
|
|
156
|
+
max_cost = Decimal(str(basic_row[2] or 0)).quantize(Decimal("0.0001"))
|
|
157
|
+
|
|
158
|
+
# Extract percentile-based metrics
|
|
159
|
+
low_cost = (
|
|
160
|
+
Decimal(str(percentile_row[0] or 0)).quantize(Decimal("0.0001"))
|
|
161
|
+
if percentile_row and percentile_row[0] is not None
|
|
162
|
+
else default_value
|
|
163
|
+
)
|
|
164
|
+
medium_cost = (
|
|
165
|
+
Decimal(str(percentile_row[1] or 0)).quantize(Decimal("0.0001"))
|
|
166
|
+
if percentile_row and percentile_row[1] is not None
|
|
167
|
+
else default_value
|
|
168
|
+
)
|
|
169
|
+
high_cost = (
|
|
170
|
+
Decimal(str(percentile_row[2] or 0)).quantize(Decimal("0.0001"))
|
|
171
|
+
if percentile_row and percentile_row[2] is not None
|
|
172
|
+
else default_value
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
# Create the result dictionary
|
|
176
|
+
result = {
|
|
177
|
+
"avg_action_cost": avg_cost,
|
|
178
|
+
"min_action_cost": min_cost,
|
|
179
|
+
"max_action_cost": max_cost,
|
|
180
|
+
"low_action_cost": low_cost,
|
|
181
|
+
"medium_action_cost": medium_cost,
|
|
182
|
+
"high_action_cost": high_cost,
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
time_cost = time.time() - start_time
|
|
186
|
+
logger.info(
|
|
187
|
+
f"agent_action_cost for {agent_id}: avg={avg_cost}, min={min_cost}, max={max_cost}, "
|
|
188
|
+
f"low={low_cost}, medium={medium_cost}, high={high_cost} "
|
|
189
|
+
f"(records: {record_count}) timeCost={time_cost:.3f}s"
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
return result
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
async def update_agent_action_cost():
|
|
196
|
+
"""
|
|
197
|
+
Update action costs for all agents.
|
|
198
|
+
|
|
199
|
+
This function processes agents in batches of 100 to avoid memory issues.
|
|
200
|
+
For each agent, it calculates various action cost metrics:
|
|
201
|
+
- avg_action_cost: average cost per action
|
|
202
|
+
- min_action_cost: minimum cost per action
|
|
203
|
+
- max_action_cost: maximum cost per action
|
|
204
|
+
- low_action_cost: average cost of the lowest 20% of actions
|
|
205
|
+
- medium_action_cost: average cost of the middle 60% of actions
|
|
206
|
+
- high_action_cost: average cost of the highest 20% of actions
|
|
207
|
+
|
|
208
|
+
It then updates the corresponding record in the agent_quotas table.
|
|
209
|
+
"""
|
|
210
|
+
logger.info("Starting update of agent average action costs")
|
|
211
|
+
start_time = time.time()
|
|
212
|
+
batch_size = 100
|
|
213
|
+
last_id = None
|
|
214
|
+
total_updated = 0
|
|
215
|
+
|
|
216
|
+
while True:
|
|
217
|
+
# Get a batch of agent IDs ordered by ID
|
|
218
|
+
async with get_session() as session:
|
|
219
|
+
query = select(AgentTable.id).order_by(AgentTable.id)
|
|
220
|
+
|
|
221
|
+
# Apply pagination if we have a last_id from previous batch
|
|
222
|
+
if last_id:
|
|
223
|
+
query = query.where(AgentTable.id > last_id)
|
|
224
|
+
|
|
225
|
+
query = query.limit(batch_size)
|
|
226
|
+
result = await session.execute(query)
|
|
227
|
+
agent_ids = [row[0] for row in result]
|
|
228
|
+
|
|
229
|
+
# If no more agents, we're done
|
|
230
|
+
if not agent_ids:
|
|
231
|
+
break
|
|
232
|
+
|
|
233
|
+
# Update last_id for next batch
|
|
234
|
+
last_id = agent_ids[-1]
|
|
235
|
+
|
|
236
|
+
# Process this batch of agents
|
|
237
|
+
logger.info(
|
|
238
|
+
f"Processing batch of {len(agent_ids)} agents starting with ID {agent_ids[0]}"
|
|
239
|
+
)
|
|
240
|
+
batch_start_time = time.time()
|
|
241
|
+
|
|
242
|
+
for agent_id in agent_ids:
|
|
243
|
+
try:
|
|
244
|
+
# Calculate action costs for this agent
|
|
245
|
+
costs = await agent_action_cost(agent_id)
|
|
246
|
+
|
|
247
|
+
# Update the agent's quota record
|
|
248
|
+
async with get_session() as session:
|
|
249
|
+
update_stmt = (
|
|
250
|
+
update(AgentQuotaTable)
|
|
251
|
+
.where(AgentQuotaTable.id == agent_id)
|
|
252
|
+
.values(
|
|
253
|
+
avg_action_cost=costs["avg_action_cost"],
|
|
254
|
+
min_action_cost=costs["min_action_cost"],
|
|
255
|
+
max_action_cost=costs["max_action_cost"],
|
|
256
|
+
low_action_cost=costs["low_action_cost"],
|
|
257
|
+
medium_action_cost=costs["medium_action_cost"],
|
|
258
|
+
high_action_cost=costs["high_action_cost"],
|
|
259
|
+
)
|
|
260
|
+
)
|
|
261
|
+
await session.execute(update_stmt)
|
|
262
|
+
await session.commit()
|
|
263
|
+
|
|
264
|
+
total_updated += 1
|
|
265
|
+
except Exception as e:
|
|
266
|
+
logger.error(
|
|
267
|
+
f"Error updating action costs for agent {agent_id}: {str(e)}"
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
batch_time = time.time() - batch_start_time
|
|
271
|
+
logger.info(f"Completed batch in {batch_time:.3f}s")
|
|
272
|
+
|
|
273
|
+
total_time = time.time() - start_time
|
|
274
|
+
logger.info(
|
|
275
|
+
f"Finished updating action costs for {total_updated} agents in {total_time:.3f}s"
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
async def list_autonomous_tasks(agent_id: str) -> List[AgentAutonomous]:
|
|
280
|
+
"""
|
|
281
|
+
List all autonomous tasks for an agent.
|
|
282
|
+
|
|
283
|
+
Args:
|
|
284
|
+
agent_id: ID of the agent
|
|
285
|
+
|
|
286
|
+
Returns:
|
|
287
|
+
List[AgentAutonomous]: List of autonomous task configurations
|
|
288
|
+
|
|
289
|
+
Raises:
|
|
290
|
+
IntentKitAPIError: If agent is not found
|
|
291
|
+
"""
|
|
292
|
+
agent = await Agent.get(agent_id)
|
|
293
|
+
if not agent:
|
|
294
|
+
raise IntentKitAPIError(
|
|
295
|
+
400, "AgentNotFound", f"Agent with ID {agent_id} does not exist."
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
if not agent.autonomous:
|
|
299
|
+
return []
|
|
300
|
+
|
|
301
|
+
return agent.autonomous
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
async def add_autonomous_task(agent_id: str, task: AgentAutonomous) -> AgentAutonomous:
|
|
305
|
+
"""
|
|
306
|
+
Add a new autonomous task to an agent.
|
|
307
|
+
|
|
308
|
+
Args:
|
|
309
|
+
agent_id: ID of the agent
|
|
310
|
+
task: Autonomous task configuration (id will be generated if not provided)
|
|
311
|
+
|
|
312
|
+
Returns:
|
|
313
|
+
AgentAutonomous: The created task with generated ID
|
|
314
|
+
|
|
315
|
+
Raises:
|
|
316
|
+
IntentKitAPIError: If agent is not found
|
|
317
|
+
"""
|
|
318
|
+
agent = await Agent.get(agent_id)
|
|
319
|
+
if not agent:
|
|
320
|
+
raise IntentKitAPIError(
|
|
321
|
+
400, "AgentNotFound", f"Agent with ID {agent_id} does not exist."
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
# Get current autonomous tasks
|
|
325
|
+
current_tasks = agent.autonomous or []
|
|
326
|
+
if not isinstance(current_tasks, list):
|
|
327
|
+
current_tasks = []
|
|
328
|
+
|
|
329
|
+
# Add the new task
|
|
330
|
+
current_tasks.append(task)
|
|
331
|
+
|
|
332
|
+
# Convert all AgentAutonomous objects to dictionaries for JSON serialization
|
|
333
|
+
serializable_tasks = [task_item.model_dump() for task_item in current_tasks]
|
|
334
|
+
|
|
335
|
+
# Update the agent in the database
|
|
336
|
+
async with get_session() as session:
|
|
337
|
+
update_stmt = (
|
|
338
|
+
update(AgentTable)
|
|
339
|
+
.where(AgentTable.id == agent_id)
|
|
340
|
+
.values(autonomous=serializable_tasks)
|
|
341
|
+
)
|
|
342
|
+
await session.execute(update_stmt)
|
|
343
|
+
await session.commit()
|
|
344
|
+
|
|
345
|
+
logger.info(f"Added autonomous task {task.id} to agent {agent_id}")
|
|
346
|
+
return task
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
async def delete_autonomous_task(agent_id: str, task_id: str) -> None:
|
|
350
|
+
"""
|
|
351
|
+
Delete an autonomous task from an agent.
|
|
352
|
+
|
|
353
|
+
Args:
|
|
354
|
+
agent_id: ID of the agent
|
|
355
|
+
task_id: ID of the task to delete
|
|
356
|
+
|
|
357
|
+
Raises:
|
|
358
|
+
IntentKitAPIError: If agent is not found or task is not found
|
|
359
|
+
"""
|
|
360
|
+
agent = await Agent.get(agent_id)
|
|
361
|
+
if not agent:
|
|
362
|
+
raise IntentKitAPIError(
|
|
363
|
+
400, "AgentNotFound", f"Agent with ID {agent_id} does not exist."
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
# Get current autonomous tasks
|
|
367
|
+
current_tasks = agent.autonomous or []
|
|
368
|
+
if not isinstance(current_tasks, list):
|
|
369
|
+
current_tasks = []
|
|
370
|
+
|
|
371
|
+
# Find and remove the task
|
|
372
|
+
task_found = False
|
|
373
|
+
updated_tasks = []
|
|
374
|
+
for task_data in current_tasks:
|
|
375
|
+
if task_data.id == task_id:
|
|
376
|
+
task_found = True
|
|
377
|
+
continue
|
|
378
|
+
updated_tasks.append(task_data)
|
|
379
|
+
|
|
380
|
+
if not task_found:
|
|
381
|
+
raise IntentKitAPIError(
|
|
382
|
+
404, "TaskNotFound", f"Autonomous task with ID {task_id} not found."
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
# Convert remaining AgentAutonomous objects to dictionaries for JSON serialization
|
|
386
|
+
serializable_tasks = [task_item.model_dump() for task_item in updated_tasks]
|
|
387
|
+
|
|
388
|
+
# Update the agent in the database
|
|
389
|
+
async with get_session() as session:
|
|
390
|
+
update_stmt = (
|
|
391
|
+
update(AgentTable)
|
|
392
|
+
.where(AgentTable.id == agent_id)
|
|
393
|
+
.values(autonomous=serializable_tasks)
|
|
394
|
+
)
|
|
395
|
+
await session.execute(update_stmt)
|
|
396
|
+
await session.commit()
|
|
397
|
+
|
|
398
|
+
logger.info(f"Deleted autonomous task {task_id} from agent {agent_id}")
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
async def update_autonomous_task(
|
|
402
|
+
agent_id: str, task_id: str, task_updates: dict
|
|
403
|
+
) -> AgentAutonomous:
|
|
404
|
+
"""
|
|
405
|
+
Update an autonomous task for an agent.
|
|
406
|
+
|
|
407
|
+
Args:
|
|
408
|
+
agent_id: ID of the agent
|
|
409
|
+
task_id: ID of the task to update
|
|
410
|
+
task_updates: Dictionary containing fields to update
|
|
411
|
+
|
|
412
|
+
Returns:
|
|
413
|
+
AgentAutonomous: The updated task
|
|
414
|
+
|
|
415
|
+
Raises:
|
|
416
|
+
IntentKitAPIError: If agent is not found or task is not found
|
|
417
|
+
"""
|
|
418
|
+
agent = await Agent.get(agent_id)
|
|
419
|
+
if not agent:
|
|
420
|
+
raise IntentKitAPIError(
|
|
421
|
+
400, "AgentNotFound", f"Agent with ID {agent_id} does not exist."
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
# Get current autonomous tasks
|
|
425
|
+
current_tasks: List[AgentAutonomous] = agent.autonomous or []
|
|
426
|
+
|
|
427
|
+
# Find and update the task
|
|
428
|
+
task_found = False
|
|
429
|
+
updated_tasks: List[AgentAutonomous] = []
|
|
430
|
+
updated_task = None
|
|
431
|
+
|
|
432
|
+
for task_data in current_tasks:
|
|
433
|
+
if task_data.id == task_id:
|
|
434
|
+
task_found = True
|
|
435
|
+
# Create a dictionary with current task data
|
|
436
|
+
task_dict = task_data.model_dump()
|
|
437
|
+
# Update with provided fields
|
|
438
|
+
task_dict.update(task_updates)
|
|
439
|
+
# Create new AgentAutonomous instance
|
|
440
|
+
updated_task = AgentAutonomous.model_validate(task_dict)
|
|
441
|
+
updated_tasks.append(updated_task)
|
|
442
|
+
else:
|
|
443
|
+
updated_tasks.append(task_data)
|
|
444
|
+
|
|
445
|
+
if not task_found:
|
|
446
|
+
raise IntentKitAPIError(
|
|
447
|
+
404, "TaskNotFound", f"Autonomous task with ID {task_id} not found."
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
# Convert all AgentAutonomous objects to dictionaries for JSON serialization
|
|
451
|
+
serializable_tasks = [task_item.model_dump() for task_item in updated_tasks]
|
|
452
|
+
|
|
453
|
+
# Update the agent in the database
|
|
454
|
+
async with get_session() as session:
|
|
455
|
+
update_stmt = (
|
|
456
|
+
update(AgentTable)
|
|
457
|
+
.where(AgentTable.id == agent_id)
|
|
458
|
+
.values(autonomous=serializable_tasks)
|
|
459
|
+
)
|
|
460
|
+
await session.execute(update_stmt)
|
|
461
|
+
await session.commit()
|
|
462
|
+
|
|
463
|
+
logger.info(f"Updated autonomous task {task_id} for agent {agent_id}")
|
|
464
|
+
return updated_task
|
|
@@ -221,6 +221,45 @@ async def create_agent(
|
|
|
221
221
|
):
|
|
222
222
|
entrypoint_prompt = agent.telegram_entrypoint_prompt
|
|
223
223
|
logger.debug("telegram entrypoint prompt added")
|
|
224
|
+
elif entrypoint == AuthorType.TRIGGER.value:
|
|
225
|
+
task_id = (
|
|
226
|
+
config["configurable"]
|
|
227
|
+
.get("chat_id", "")
|
|
228
|
+
.removeprefix("autonomous-")
|
|
229
|
+
)
|
|
230
|
+
# Find the autonomous task by task_id
|
|
231
|
+
autonomous_task = None
|
|
232
|
+
if agent.autonomous:
|
|
233
|
+
for task in agent.autonomous:
|
|
234
|
+
if task.id == task_id:
|
|
235
|
+
autonomous_task = task
|
|
236
|
+
break
|
|
237
|
+
|
|
238
|
+
if autonomous_task:
|
|
239
|
+
# Build detailed task info - always include task_id
|
|
240
|
+
if autonomous_task.name:
|
|
241
|
+
task_info = f"You are running an autonomous task '{autonomous_task.name}' (ID: {task_id})"
|
|
242
|
+
else:
|
|
243
|
+
task_info = (
|
|
244
|
+
f"You are running an autonomous task (ID: {task_id})"
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
# Add description if available
|
|
248
|
+
if autonomous_task.description:
|
|
249
|
+
task_info += f": {autonomous_task.description}"
|
|
250
|
+
|
|
251
|
+
# Add cycle info
|
|
252
|
+
if autonomous_task.minutes:
|
|
253
|
+
task_info += f". This task runs every {autonomous_task.minutes} minute(s)"
|
|
254
|
+
elif autonomous_task.cron:
|
|
255
|
+
task_info += (
|
|
256
|
+
f". This task runs on schedule: {autonomous_task.cron}"
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
entrypoint_prompt = f"{task_info}. "
|
|
260
|
+
else:
|
|
261
|
+
# Fallback if task not found
|
|
262
|
+
entrypoint_prompt = f"You are running an autonomous task. The task id is {task_id}. "
|
|
224
263
|
if entrypoint_prompt:
|
|
225
264
|
entrypoint_prompt = await explain_prompt(entrypoint_prompt)
|
|
226
265
|
final_system_prompt = f"{final_system_prompt}## Entrypoint rules\n\n{entrypoint_prompt}\n\n"
|
|
@@ -1012,15 +1051,3 @@ async def thread_stats(agent_id: str, chat_id: str) -> list[BaseMessage]:
|
|
|
1012
1051
|
return snap.values["messages"]
|
|
1013
1052
|
else:
|
|
1014
1053
|
return []
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
async def is_payment_required(input: ChatMessageCreate, agent: Agent) -> bool:
|
|
1018
|
-
if not config.payment_enabled:
|
|
1019
|
-
return False
|
|
1020
|
-
payment_settings = await AppSetting.payment()
|
|
1021
|
-
if payment_settings.agent_whitelist_enabled:
|
|
1022
|
-
if agent.id not in payment_settings.agent_whitelist:
|
|
1023
|
-
return False
|
|
1024
|
-
if input.user_id and agent.owner:
|
|
1025
|
-
return True
|
|
1026
|
-
return False
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
from typing import Any, Dict, Optional
|
|
1
|
+
from typing import Any, Dict, List, Optional
|
|
2
2
|
|
|
3
3
|
from intentkit.abstracts.skill import SkillStoreABC
|
|
4
4
|
from intentkit.config.config import config
|
|
5
|
-
from intentkit.
|
|
5
|
+
from intentkit.core.agent import (
|
|
6
|
+
add_autonomous_task as _add_autonomous_task,
|
|
7
|
+
)
|
|
8
|
+
from intentkit.core.agent import (
|
|
9
|
+
delete_autonomous_task as _delete_autonomous_task,
|
|
10
|
+
)
|
|
11
|
+
from intentkit.core.agent import (
|
|
12
|
+
list_autonomous_tasks as _list_autonomous_tasks,
|
|
13
|
+
)
|
|
14
|
+
from intentkit.core.agent import (
|
|
15
|
+
update_autonomous_task as _update_autonomous_task,
|
|
16
|
+
)
|
|
17
|
+
from intentkit.models.agent import Agent, AgentAutonomous
|
|
6
18
|
from intentkit.models.agent_data import AgentData, AgentQuota
|
|
7
19
|
from intentkit.models.skill import (
|
|
8
20
|
AgentSkillData,
|
|
@@ -131,5 +143,58 @@ class SkillStore(SkillStoreABC):
|
|
|
131
143
|
)
|
|
132
144
|
await skill_data.save()
|
|
133
145
|
|
|
146
|
+
@staticmethod
|
|
147
|
+
async def list_autonomous_tasks(agent_id: str) -> List[AgentAutonomous]:
|
|
148
|
+
"""List all autonomous tasks for an agent.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
agent_id: ID of the agent
|
|
152
|
+
|
|
153
|
+
Returns:
|
|
154
|
+
List[AgentAutonomous]: List of autonomous task configurations
|
|
155
|
+
"""
|
|
156
|
+
return await _list_autonomous_tasks(agent_id)
|
|
157
|
+
|
|
158
|
+
@staticmethod
|
|
159
|
+
async def add_autonomous_task(
|
|
160
|
+
agent_id: str, task: AgentAutonomous
|
|
161
|
+
) -> AgentAutonomous:
|
|
162
|
+
"""Add a new autonomous task to an agent.
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
agent_id: ID of the agent
|
|
166
|
+
task: Autonomous task configuration
|
|
167
|
+
|
|
168
|
+
Returns:
|
|
169
|
+
AgentAutonomous: The created task
|
|
170
|
+
"""
|
|
171
|
+
return await _add_autonomous_task(agent_id, task)
|
|
172
|
+
|
|
173
|
+
@staticmethod
|
|
174
|
+
async def delete_autonomous_task(agent_id: str, task_id: str) -> None:
|
|
175
|
+
"""Delete an autonomous task from an agent.
|
|
176
|
+
|
|
177
|
+
Args:
|
|
178
|
+
agent_id: ID of the agent
|
|
179
|
+
task_id: ID of the task to delete
|
|
180
|
+
"""
|
|
181
|
+
await _delete_autonomous_task(agent_id, task_id)
|
|
182
|
+
|
|
183
|
+
@staticmethod
|
|
184
|
+
async def update_autonomous_task(
|
|
185
|
+
agent_id: str, task_id: str, task_updates: dict
|
|
186
|
+
) -> AgentAutonomous:
|
|
187
|
+
"""Update an autonomous task for an agent.
|
|
188
|
+
|
|
189
|
+
Args:
|
|
190
|
+
agent_id: ID of the agent
|
|
191
|
+
task_id: ID of the task to update
|
|
192
|
+
task_updates: Dictionary containing fields to update
|
|
193
|
+
|
|
194
|
+
Returns:
|
|
195
|
+
AgentAutonomous: The updated task
|
|
196
|
+
"""
|
|
197
|
+
return await _update_autonomous_task(agent_id, task_id, task_updates)
|
|
198
|
+
|
|
134
199
|
|
|
135
200
|
skill_store = SkillStore()
|